Skip to content

Commit 5ceea0e

Browse files
committed
demo PCA and scree plot
1 parent 1a268f5 commit 5ceea0e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/PDL/Demos/Stats.pm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ $w->plot(
5252
);
5353
|],
5454

55+
[act => q|
56+
# There's also a principal component analysis (PCA) clustering function
57+
$data = qsort random 10, 5; # 10 obs on 5 variables
58+
%r = $data->pca( { plot=>1, win=>$w } );
59+
# Here we can see that very nearly all the variance is in the first component.
60+
|],
61+
5562
[comment => q|
5663
This concludes the demo.
5764

0 commit comments

Comments
 (0)