source: orange/Orange/doc/modules/PCA3.py @ 9671:a7b056375472

Revision 9671:a7b056375472, 734 bytes checked in by anze <anze.staric@…>, 2 years ago (diff)

Moved orange to Orange (part 2)

Line 
1# Description: setting number of retained components and variance covered, using generalized eigenvectors
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, standardize = True, attributes = attributes,
13          maxNumberOfComponents = -1, varianceCovered = 1.0)
14print "Retain all vectors and full variance:"
15print pca
16
17pca = orngPCA.PCA(data, standardize = True, maxNumberOfComponents = -1,
18                  varianceCovered = 1.0, useGeneralizedVectors = 1)
19print "As above, only with generalized vectors:"
20print pca
21
Note: See TracBrowser for help on using the repository browser.