| Home | Trees | Indices | Help |
|
|---|
|
|
Compute least-square, multivariate linear regression on the input
data, i.e., learn coefficients ``b_j`` so that::
y_i = b_0 + b_1 x_1 + ... b_N x_N ,
for ``i = 1 ... M``, minimizes the square error given the training ``x``'s
and ``y``'s.
This is a supervised learning node, and requires input data ``x`` and
target data ``y`` to be supplied during training (see ``train``
docstring).
**Internal variables of interest**
``self.beta``
The coefficients of the linear regression
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
| Inherited from Node | |||
|---|---|---|---|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| Inherited from Node | |||
|---|---|---|---|
|
|||
|
|||
|
Inherited from |
|||
| Inherited from Node | |||
|---|---|---|---|
|
_train_seq List of tuples:: |
|||
|
dtype dtype |
|||
|
input_dim Input dimensions |
|||
|
output_dim Output dimensions |
|||
|
supported_dtypes Supported dtypes |
|||
|
|||
:Arguments:
with_bias
If true, the linear model includes a constant term
- True: y_i = b_0 + b_1 x_1 + ... b_N x_N
- False: y_i = b_1 x_1 + ... b_N x_N
If present, the constant term is stored in the first
column of ``self.beta``.
use_pinv
If true, uses the pseudo-inverse function to compute
the linear regression coefficients, which is more robust
in some cases
|
Add a constant term to the vector 'x'. x -> [1 x] |
|
|
|
**Additional input arguments** y array of size (x.shape[0], output_dim) that contains the observed output to the input x's.
|
Process the data contained in `x`. If the object is still in the training phase, the function `stop_training` will be called. `x` is a matrix having different variables on different columns and observations on the rows. By default, subclasses should overwrite `_execute` to implement their execution phase. The docstring of the `_execute` method overwrites this docstring.
|
Return True if the node can be inverted, False otherwise.
|
Stop the training phase. By default, subclasses should overwrite `_stop_training` to implement this functionality. The docstring of the `_stop_training` method overwrites this docstring.
|
**Additional input arguments** y array of size (x.shape[0], output_dim) that contains the observed output to the input x's.
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu Mar 10 15:27:41 2016 | http://epydoc.sourceforge.net |