File: regression.rst

package info (click to toggle)
orange3 3.40.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 15,912 kB
  • sloc: python: 162,745; ansic: 622; makefile: 322; sh: 93; cpp: 77
file content (159 lines) | stat: -rw-r--r-- 3,545 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
###########################
Regression (``regression``)
###########################

.. automodule:: Orange.regression


.. index:: .. index:: linear fitter
   pair: regression; linear fitter

Linear Regression
-----------------

Linear regression is a statistical regression method which tries to
predict a value of a continuous response (class) variable based on
the values of several predictors. The model assumes that the response
variable is a linear combination of the predictors, the task of
linear regression is therefore to fit the unknown coefficients.


Example
=======

    >>> from Orange.regression.linear import LinearRegressionLearner
    >>> mpg = Orange.data.Table('auto-mpg')
    >>> mean_ = LinearRegressionLearner()
    >>> model = mean_(mpg[40:110])
    >>> print(model)
    LinearModel LinearRegression(copy_X=True, fit_intercept=True, normalize=False)
    >>> mpg[20]
    Value('mpg', 25.0)
    >>> model(mpg[0])
    Value('mpg', 24.6)

.. autoclass:: Orange.regression.linear.LinearRegressionLearner
.. autoclass:: Orange.regression.linear.RidgeRegressionLearner
.. autoclass:: Orange.regression.linear.LassoRegressionLearner
.. autoclass:: Orange.regression.linear.SGDRegressionLearner
.. autoclass:: Orange.regression.linear.LinearModel



.. index:: mean fitter
   pair: regression; mean fitter


Polynomial
----------

*Polynomial model* is a wrapper that constructs polynomial features of
a specified degree and learns a model on them.

.. autoclass:: Orange.regression.linear.PolynomialLearner


Mean
----

*Mean model* predicts the same value (usually the distribution mean) for all
data instances. Its accuracy can serve as a baseline for other regression
models.

The model learner (:class:`MeanLearner`) computes the mean of the given data or
distribution. The model is stored as an instance of :class:`MeanModel`.

Example
=======

    >>> from Orange.data import Table
    >>> from Orange.regression import MeanLearner
    >>> data = Table('auto-mpg')
    >>> learner = MeanLearner()
    >>> model = learner(data)
    >>> print(model)
    MeanModel(23.51457286432161)
    >>> model(data[:4])
    array([ 23.51457286,  23.51457286,  23.51457286,  23.51457286])

.. autoclass:: MeanLearner
   :members:



.. index:: random forest
   pair: regression; random forest

Random Forest
-------------
.. autoclass:: RandomForestRegressionLearner
   :members:



.. index:: random forest (simple)
   pair: regression; simple random forest

Simple Random Forest
--------------------

.. autoclass:: SimpleRandomForestLearner
   :members:



.. index:: regression tree
   pair: regression; tree

Regression Tree
-------------------

Orange includes two implemenations of regression tres: a home-grown one, and one
from scikit-learn. The former properly handles multinominal and missing values,
and the latter is faster.

.. autoclass:: TreeLearner
   :members:

.. autoclass:: SklTreeRegressionLearner
   :members:


.. index:: neural network
   pair: regression; neural network

Neural Network
--------------
.. autoclass:: NNRegressionLearner
   :members:


Gradient Boosted Trees
----------------------

.. automodule:: Orange.regression.gb

.. autoclass:: GBRegressor
   :members:

.. automodule:: Orange.regression.catgb

.. autoclass:: CatGBRegressor
   :members:

.. automodule:: Orange.regression.xgb

.. autoclass:: XGBRegressor
   :members:

.. autoclass:: XGBRFRegressor
   :members:


Curve Fit
----------------------

.. automodule:: Orange.regression.curvefit

.. autoclass:: CurveFitLearner
   :members: