correcting typos

This commit is contained in:
Morten Hjorth-Jensen
2024-09-03 05:58:08 +02:00
parent b01d1a6706
commit 48d4efe695
56 changed files with 477 additions and 465 deletions
+4 -2
View File
@@ -1,4 +1,4 @@
TITLE: Week 36: Linear Rgeression and Statistical interpretations
TITLE: Week 36: Linear Regression and Statistical interpretations
AUTHOR: Morten Hjorth-Jensen {copyright, 1999-present|CC BY-NC} at Department of Physics, University of Oslo & Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University
DATE: September 2-6, 2024
@@ -61,6 +61,8 @@ If you need to scale the data, not doing so will give an *unfair*
penalization of the parameters since their magnitude depends on the
scale of their corresponding predictor.
The _Scikit-Learn_ site URL:"https://scikit-learn.org/stable/auto_examples/preprocessing/plot_all_scaling.html#plot-all-scaling-standard-scaler-section" has a good discussion of different ways of preprocessing data.
Suppose as an example that you
you have an input variable given by the heights of different persons.
Human height might be measured in inches or meters or
@@ -293,7 +295,7 @@ beta = fit_beta(X - X_offset, y - y_offset)
intercept = np.mean(y_offset - X_offset @ beta)
print(f"Manual intercept: {intercept}")
print(f"Fitted beta (wiothout intercept): {beta}")
print(f"Fitted beta (without intercept): {beta}")
print(f"Sklearn intercept: {skl.intercept_}")
print(f"Sklearn fitted beta (without intercept): {skl.coef_}")
ypredictOwn = X @ beta