source: orange/docs/reference/rst/code/freeviz-classify.py @ 10473:43bcceb3726d

Revision 10473:43bcceb3726d, 536 bytes checked in by Matija Polajnar <matija.polajnar@…>, 2 years ago (diff)

Regression test for FreeVizClassifier.

Line 
1# Description: FreeViz classifier
2# Category:    projection
3# Uses:        zoo
4# Referenced:  Orange.projection.linear
5# Classes:     Orange.projection.linear.FreeViz, Orange.projection.linear.FreeVizLearner, Orange.projection.linear.FreeVizClassifier
6
7import Orange
8zoo = Orange.data.Table('zoo')
9
10ind = Orange.data.sample.SubsetIndices2(p0=0.9)(zoo)
11train, test = zoo.select(ind, 0), zoo.select(ind, 1)
12
13l = Orange.projection.linear.FreeVizLearner()
14c = l(train)
15for e in test:
16    print c(e, Orange.classification.Classifier.GetBoth)
Note: See TracBrowser for help on using the repository browser.