Skip to content

Commit d849a72

Browse files
Apply suggestions from code review
Co-authored-by: Frits Hermans <post@fritshermans.nl>
1 parent ccf3814 commit d849a72

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

python_scripts/dimred_ex_01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# ---
1313

1414
# %% [markdown]
15-
# # Solution for Exercise M8.01
15+
# # Exercise M8.01
1616
#
1717
# In the Chapter on Linear Models we saw that feature engineering using
1818
# `PolynomialFeatures` can give a linear model the flexibility to capture

python_scripts/dimred_intuitions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
ax.bar_label(bars)
126126
ax.set_xlim([0, 14])
127127
ax.set_yticks([1, 2], labels=["PC1", "PC2"])
128-
ax.set_xlabel("eigenvalues")
128+
ax.set_xlabel("Explained variance")
129129
ax.set_ylabel("PCA features")
130130
ax.set_title("Variance Explained by Principal Components (PCA)", y=1.05)
131131
plt.show()

python_scripts/dimred_preprocessing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def plot_sq_loadings(ax, pca, feature_names, col_order=None, decimals=2):
220220
# with each other. Two strongly correlated features will jointly define a
221221
# direction with much higher variance than either one alone, and the explained
222222
# variance ratios across components will still be very unequal. Scaling removes
223-
# the unit bias; it does not make all directions equally important.
223+
# the magnitude bias; it does not make all directions equally important.
224224
#
225225
# There is a subtler issue too. `StandardScaler` estimates the standard
226226
# deviation from all samples, **including outliers**. `LotArea` (lot size in sq

0 commit comments

Comments
 (0)