程序包 weka.core.matrix
类 LinearRegression
java.lang.Object
weka.core.matrix.LinearRegression
- 所有已实现的接口:
RevisionHandler
Class for performing (ridged) linear regression using Tikhonov
regularization.
- 版本:
- $Revision: 9768 $
- 作者:
- Fracpete (fracpete at waikato dot ac dot nz)
-
构造器概要
构造器构造器说明LinearRegression
(Matrix a, Matrix y, double ridge) Performs a (ridged) linear regression.LinearRegression
(Matrix a, Matrix y, double[] w, double ridge) Performs a weighted (ridged) linear regression. -
方法概要
修饰符和类型方法说明final double[]
returns the calculated coefficientsReturns the revision string.toString()
returns the coefficients in a string representation
-
构造器详细资料
-
LinearRegression
Performs a (ridged) linear regression.- 参数:
a
- the matrix to perform the regression ony
- the dependent variable vectorridge
- the ridge parameter- 抛出:
IllegalArgumentException
- if not successful
-
LinearRegression
Performs a weighted (ridged) linear regression.- 参数:
a
- the matrix to perform the regression ony
- the dependent variable vectorw
- the array of data point weightsridge
- the ridge parameter- 抛出:
IllegalArgumentException
- if the wrong number of weights were provided.
-
-
方法详细资料
-
getCoefficients
public final double[] getCoefficients()returns the calculated coefficients- 返回:
- the coefficients
-
toString
returns the coefficients in a string representation -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-