public class LinearL1SCD extends StochasticSTLinearL1
StochasticSTLinearL1.setReScale(boolean)
StochasticSTLinearL1.Loss
bias, DEFAULT_EPOCHS, DEFAULT_LOSS, DEFAULT_REG, epochs, lambda, loss, maxScaled, minScaled, obvMax, obvMin, reScale, w
Constructor and Description |
---|
LinearL1SCD()
Creates a new SCD L1 learner using default settings.
|
LinearL1SCD(int epochs,
double lambda,
StochasticSTLinearL1.Loss loss)
Creates a new SCD L1 learner.
|
LinearL1SCD(int epochs,
double lambda,
StochasticSTLinearL1.Loss loss,
boolean reScale)
Creates a new SCD L1 learner.
|
Modifier and Type | Method and Description |
---|---|
CategoricalResults |
classify(DataPoint data)
Performs classification on the given data point.
|
LinearL1SCD |
clone() |
double |
regress(DataPoint data) |
boolean |
supportsWeightedData()
Indicates whether the model knows how to train using weighted data points.
|
void |
train(RegressionDataSet dataSet) |
void |
train(RegressionDataSet dataSet,
ExecutorService threadPool) |
void |
trainC(ClassificationDataSet dataSet)
Trains the classifier and constructs a model for classification using the
given data set.
|
void |
trainC(ClassificationDataSet dataSet,
ExecutorService threadPool)
Trains the classifier and constructs a model for classification using the
given data set.
|
getBias, getBias, getEpochs, getLambda, getLoss, getMaxScaled, getMinScaled, getParameter, getParameters, getRawWeight, getRawWeight, getW, getWRaw, isReScale, numWeightsVecs, setEpochs, setLambda, setLoss, setMaxScaled, setMinScaled, setReScale, wDot
public LinearL1SCD()
public LinearL1SCD(int epochs, double lambda, StochasticSTLinearL1.Loss loss)
epochs
- the number of learning iterationslambda
- the regularization penaltyloss
- the loss function to usepublic LinearL1SCD(int epochs, double lambda, StochasticSTLinearL1.Loss loss, boolean reScale)
epochs
- the number of learning iterationslambda
- the regularization penaltyloss
- the loss function to usereScale
- whether or not to rescale the feature valuespublic CategoricalResults classify(DataPoint data)
Classifier
data
- the data point to classifypublic double regress(DataPoint data)
public void train(RegressionDataSet dataSet, ExecutorService threadPool)
public void train(RegressionDataSet dataSet)
public void trainC(ClassificationDataSet dataSet, ExecutorService threadPool)
Classifier
dataSet
- the data set to train onthreadPool
- the source of threads to use.public void trainC(ClassificationDataSet dataSet)
Classifier
dataSet
- the data set to train onpublic boolean supportsWeightedData()
Classifier
public LinearL1SCD clone()
clone
in interface Classifier
clone
in interface Regressor
clone
in class StochasticSTLinearL1
Copyright © 2017. All rights reserved.