Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noob question: How do I project my data into the PCA space? #11

Closed
factoidforrest opened this issue Jun 19, 2017 · 3 comments
Closed

Noob question: How do I project my data into the PCA space? #11

factoidforrest opened this issue Jun 19, 2017 · 3 comments
Assignees

Comments

@factoidforrest
Copy link

For instance check out how this simple ruby library works.

https://github.com/gbuesing/pca

It outputs the dataset in the desired number of dimensions, ready to graph. Is this easy with your library and I am just missing something obvious?

Thanks!

@targos
Copy link
Member

targos commented Jun 20, 2017

To project a dataset into the PCA space, you should use the predict method. You can call it with the original data that was passed to the PCA constructor.

See https://github.com/mljs/pca#usage for a code example (replace newPoints with dataset)

@factoidforrest
Copy link
Author

factoidforrest commented Jun 20, 2017 via email

@transitive-bullshit
Copy link

I also found this confusing 😂 Since the example uses newPoints, I thought it meant the projection was already computed for the original data somewhere, but I was having a hard time figuring out where.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants