程序包 weka.core.matrix

类 LinearRegression

java.lang.Object
weka.core.matrix.LinearRegression
所有已实现的接口:
RevisionHandler

public class LinearRegression extends Object implements RevisionHandler
Class for performing (ridged) linear regression using Tikhonov regularization.
版本:
$Revision: 9768 $
作者:
Fracpete (fracpete at waikato dot ac dot nz)
  • 构造器详细资料

    • LinearRegression

      public LinearRegression(Matrix a, Matrix y, double ridge)
      Performs a (ridged) linear regression.
      参数:
      a - the matrix to perform the regression on
      y - the dependent variable vector
      ridge - the ridge parameter
      抛出:
      IllegalArgumentException - if not successful
    • LinearRegression

      public LinearRegression(Matrix a, Matrix y, double[] w, double ridge)
      Performs a weighted (ridged) linear regression.
      参数:
      a - the matrix to perform the regression on
      y - the dependent variable vector
      w - the array of data point weights
      ridge - the ridge parameter
      抛出:
      IllegalArgumentException - if the wrong number of weights were provided.
  • 方法详细资料

    • getCoefficients

      public final double[] getCoefficients()
      returns the calculated coefficients
      返回:
      the coefficients
    • toString

      public String toString()
      returns the coefficients in a string representation
      覆盖:
      toString 在类中 Object
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      返回:
      the revision