source: orange/docs/reference/rst/code/linear-example.py @ 9638:eb3af38491f2

Revision 9638:eb3af38491f2, 446 bytes checked in by umek@…, 2 years ago (diff)

Changed table to data or name of the data set.

For example - instead of

table = Orange.data.Table("housing")

is changed to

housing = Orange.data.Table("housing")

Line 
1# Description: Linear regression
2# Category:    regression
3# Uses:        housing
4# Referenced:  Orange.regression.linear
5# Classes:     Orange.regression.linear.LinearRegressionLearner Orange.regression.linear.LinearRegression
6
7import Orange
8
9housing = Orange.data.Table("housing")
10learner = Orange.regression.linear.LinearRegressionLearner()
11classifier = learner(housing)
12
13for ins in housing[:5]:
14    print classifier(ins)
15
16print classifier   
Note: See TracBrowser for help on using the repository browser.