Orange Forum • View topic - Selecting the top principal components

Selecting the top principal components

A place to ask questions about methods in Orange and how they are used and other general support.

Selecting the top principal components

Postby giorgosera » Thu Feb 09, 2012 15:57

Hey,

I am using PCA to perform dimensionality reduction using the Orange scripting.
Is is possible to select the top n proncipal components programatically?

Thanks

Re: Selecting the top principal components

Postby Anze » Mon Feb 13, 2012 9:40

You can pass max_components=10 to constructor of PCA and it will keep top 10 principal components.

Code: Select all
import Orange
ds = Orange.data.Table("imports-85")
pca = Orange.projection.pca.Pca(max_components=10)
projection = pca(ds)
transformed_ds = projection(ds)


Return to Questions & Support



cron