Skip to content

Commit 9d8ea28

Browse files
committed
Adding side-by-side to PCovC comparison example
1 parent 234f668 commit 9d8ea28

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

examples/pcovc/PCovC_Comparison.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,18 @@
9494
fig, axis = plt.subplots()
9595
axis.scatter(T_pcovc[:, 0], T_pcovc[:, 1], c=y)
9696
axis.set(xlabel="PCov$_1$", ylabel="PCov$_2$")
97+
98+
# %%
99+
#
100+
# A side-by-side comparison of the
101+
# three techniques (PCA, LDA, and PCovC):
102+
103+
n_models = 3
104+
105+
fig, axes = plt.subplots(1, n_models, figsize=(6 * n_models, 5))
106+
axes[0].scatter(T_pca[:, 0], T_pca[:, 1], c=y)
107+
axes[0].set_title("PCA")
108+
axes[1].scatter(-T_lda[:], np.zeros(len(T_lda[:])), c=y)
109+
axes[1].set_title("LDA")
110+
axes[2].scatter(T_pcovc[:, 0], T_pcovc[:, 1], c=y)
111+
axes[2].set_title("PCovC")

0 commit comments

Comments
 (0)