Skip to content

Commit 5f32b89

Browse files
authored
DOC Fix terminology in PCA example (scikit-learn#32211)
1 parent 5e2775b commit 5f32b89

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

examples/decomposition/plot_pca_iris.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Plot a PCA representation
5656
# -------------------------
5757
# Let's apply a Principal Component Analysis (PCA) to the iris dataset
58-
# and then plot the irises across the first three PCA dimensions.
58+
# and then plot the irises across the first three principal components.
5959
# This will allow us to better differentiate among the three types!
6060

6161
import matplotlib.pyplot as plt
@@ -78,10 +78,10 @@
7878
)
7979

8080
ax.set(
81-
title="First three PCA dimensions",
82-
xlabel="1st Eigenvector",
83-
ylabel="2nd Eigenvector",
84-
zlabel="3rd Eigenvector",
81+
title="First three principal components",
82+
xlabel="1st Principal Component",
83+
ylabel="2nd Principal Component",
84+
zlabel="3rd Principal Component",
8585
)
8686
ax.xaxis.set_ticklabels([])
8787
ax.yaxis.set_ticklabels([])
@@ -101,5 +101,4 @@
101101
# %%
102102
# PCA will create 3 new features that are a linear combination of the 4 original
103103
# features. In addition, this transformation maximizes the variance. With this
104-
# transformation, we see that we can identify each species using only the first feature
105-
# (i.e., first eigenvector).
104+
# transformation, we can identify each species using only the first principal component.

0 commit comments

Comments
 (0)