Changeset 9533:5e2933bb156a in orange
 Timestamp:
 01/16/12 09:08:25 (2 years ago)
 Branch:
 default
 Convert:
 f4fb04c5536eeae5e6f07d961dea83fdf17b1d14
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

orange/Orange/regression/pls.py
r9523 r9533 13 13 14 14 >>> import Orange 15 >>> 16 >>> table= Orange.data.Table("testpls.tab")15 >>> from Orange.regression import pls 16 >>> data = Orange.data.Table("testpls.tab") 17 17 >>> # set independent and response variables 18 >>> x = [var for var in table.domain if var.name[0]=="X"]19 >>> y = [var for var in table.domain if var.name[0]=="Y"]18 >>> x = data.domain.features 19 >>> y = data.domain.class_vars 20 20 >>> print x 21 21 [FloatVariable 'X1', FloatVariable 'X2', FloatVariable 'X3'] … … 28 28 >>> # In such situation x and y do not need to be specified. 29 29 >>> l = pls.PLSRegressionLearner() 30 >>> c = l( table, x_vars=x, y_vars=y)31 >>> c.print_pls_regression_coefficients()30 >>> c = l(data, x_vars=x, y_vars=y) 31 >>> print c 32 32 Y1 Y2 Y3 Y4 33 33 X1 0.513 0.915 0.341 0.069 … … 486 486 l = pls.PLSRegressionLearner() 487 487 488 x = [var for var in data.domain.features if var.name[0]=="X"]489 y = [var for var in data.domain.class_vars if var.name[0]=="Y"]488 x = data.domain.features 489 y = data.domain.class_vars 490 490 print x, y 491 #c = l(data, x_vars=x, y_vars=y)491 # c = l(data, x_vars=x, y_vars=y) 492 492 c = l(data) 493 494 493 print c
Note: See TracChangeset
for help on using the changeset viewer.