source: orange/orange/doc/modules/PCA4.py @ 6252:c67310ac6363

Revision 6252:c67310ac6363, 461 bytes checked in by nejc <nejc@…>, 5 years ago (diff)
Line 
1# Description: projecting data with trained PCA
2# Category:    projection
3# Uses:        iris
4# Referenced:  orngPCA.htm
5# Classes:     orngPCA.PCA
6
7import orange, orngPCA
8
9data = orange.ExampleTable("iris.tab")
10
11attributes = ['sepal length', 'sepal width', 'petal length', 'petal width']
12pca = orngPCA.PCA(data, attributes = attributes, standardize = True)
13
14projected = pca(data)
15print "Projection on first two components:"
16for d in projected[:5]:
17    print d
Note: See TracBrowser for help on using the repository browser.