public class MultipleLinearRegression extends Object implements Regressor, SingleWeightVectorModel
Constructor and Description |
---|
MultipleLinearRegression() |
MultipleLinearRegression(boolean useWeights) |
Modifier and Type | Method and Description |
---|---|
MultipleLinearRegression |
clone() |
double |
getBias()
Returns the bias term used for the model, or 0 of the model does not
support or was not trained with a bias term.
|
double |
getBias(int index)
Returns the bias term used with the weight vector for the given class
index.
|
Vec |
getRawWeight()
Returns the only weight vector used for the model
|
Vec |
getRawWeight(int index)
Returns the raw weight vector associated with the given class index.
|
int |
numWeightsVecs()
Returns the number of weight vectors that can be returned.
|
double |
regress(DataPoint data) |
boolean |
supportsWeightedData() |
void |
train(RegressionDataSet dataSet) |
void |
train(RegressionDataSet dataSet,
ExecutorService threadPool) |
public MultipleLinearRegression()
public MultipleLinearRegression(boolean useWeights)
public void train(RegressionDataSet dataSet, ExecutorService threadPool)
public void train(RegressionDataSet dataSet)
public boolean supportsWeightedData()
supportsWeightedData
in interface Regressor
public Vec getRawWeight()
SingleWeightVectorModel
getRawWeight
in interface SingleWeightVectorModel
public double getBias()
SingleWeightVectorModel
getBias
in interface SingleWeightVectorModel
public Vec getRawWeight(int index)
SimpleWeightVectorModel
ConstantVector
object may be returned. index = 0
should be usedgetRawWeight
in interface SimpleWeightVectorModel
index
- the class index to get the weight vector forpublic double getBias(int index)
SimpleWeightVectorModel
0
will be returned.index = 0
should be usedgetBias
in interface SimpleWeightVectorModel
index
- the class index to get the weight vector forpublic int numWeightsVecs()
SimpleWeightVectorModel
numWeightsVecs
in interface SimpleWeightVectorModel
SimpleWeightVectorModel.getRawWeight(int)
can be called.public MultipleLinearRegression clone()
Copyright © 2017. All rights reserved.