pca icon indicating copy to clipboard operation
pca copied to clipboard

Scores

Open paolaguarasci opened this issue 5 years ago • 1 comments

A getScores() method would be useful. To do this I used:

let scores = pca.predict(dataset)

I made several attempts before being able to get what I needed (the scores) but I'm not a statistician, it's true. Even a reference to the scores also in the documentation can help those who are not in the field, like me.

paolaguarasci avatar Oct 25 '19 22:10 paolaguarasci

I'd also like to add. How do i get the principal components?

The U matrix produces the principal directions. From there do i simply, first create the PCA space,

genePCA = new ML.PCA(geneMat)

Then compute the principal components like this?

genePCA.predict(geneMat)

Also, once I've computed this, is each Float64Array a row or a column?

leeleavitt avatar Nov 12 '19 05:11 leeleavitt