public class LibLinearRegression extends Object implements LinearMethod, RegressionLearningAlgorithm, BinaryLearningAlgorithm
Further details can be found in:
[Fan et al, 2008] R.-E. Fan, K.-W. Chang, C.-J. Hsieh, X.-R. Wang, and C.-J. Lin. LIBLINEAR: A Library for Large Linear Classification, Journal of Machine Learning Research 9(2008), 1871-1874. Software available at
The original LIBLINEAR code:
http://www.csie.ntu.edu.tw/~cjlin/liblinear
The original JAVA porting (v 1.94): http://liblinear.bwaldvogel.de
| Constructor and Description |
|---|
LibLinearRegression() |
LibLinearRegression(double c,
double p,
String representationName) |
LibLinearRegression(Label label,
double c,
double p,
String representationName) |
| Modifier and Type | Method and Description |
|---|---|
LibLinearRegression |
duplicate()
Creates a new instance of the LearningAlgorithm initialized with the same parameters
of the learningAlgorithm to be duplicated.
|
double |
getC() |
Label |
getLabel() |
List<Label> |
getLabels()
Returns the labels representing the concept to be learned.
|
double |
getP() |
UnivariateLinearRegressionFunction |
getPredictionFunction()
Returns the regressor learned during the training process
|
String |
getRepresentation()
Returns the representation this learning algorithm exploits
|
void |
learn(Dataset dataset)
It starts the training process exploiting the provided
dataset |
void |
reset()
Resets all the learning process, returning to the default state.
|
void |
setC(double c) |
void |
setLabel(Label label) |
void |
setLabels(List<Label> labels)
Sets the labels representing the concept to be learned.
|
void |
setP(double p) |
void |
setPredictionFunction(PredictionFunction predictionFunction)
Sets the predictionFunction learned during the training process.
|
void |
setRepresentation(String representation)
Sets the representation this learning algorithm will exploit
|
public LibLinearRegression(Label label, double c, double p, String representationName)
label - The regression property to be learnedc - The regularization parameterp - The The epsilon in loss function of SVRrepresentationName - The identifier of the representation to be considered for the
training steppublic LibLinearRegression(double c,
double p,
String representationName)
c - The regularization parameterrepresentationName - The identifier of the representation to be considered for the
training steppublic LibLinearRegression()
public double getC()
public void setC(double c)
c - the regularization parameterpublic double getP()
public void setP(double p)
p - the epsilon in loss functionpublic String getRepresentation()
LinearMethodgetRepresentation in interface LinearMethodpublic void setRepresentation(String representation)
LinearMethodsetRepresentation in interface LinearMethodrepresentation - the representation to setpublic void setLabels(List<Label> labels)
LearningAlgorithmsetLabels in interface BinaryLearningAlgorithmsetLabels in interface LearningAlgorithmlabels - the labels representing the concept to be learnedpublic List<Label> getLabels()
LearningAlgorithmgetLabels in interface BinaryLearningAlgorithmgetLabels in interface LearningAlgorithmpublic Label getLabel()
getLabel in interface BinaryLearningAlgorithmpublic void setLabel(Label label)
setLabel in interface BinaryLearningAlgorithmpublic void learn(Dataset dataset)
LearningAlgorithmdatasetlearn in interface LearningAlgorithmdataset - the training datapublic LibLinearRegression duplicate()
LearningAlgorithmduplicate in interface LearningAlgorithmpublic void reset()
LearningAlgorithmreset in interface LearningAlgorithmpublic UnivariateLinearRegressionFunction getPredictionFunction()
RegressionLearningAlgorithmgetPredictionFunction in interface LearningAlgorithmgetPredictionFunction in interface RegressionLearningAlgorithmpublic void setPredictionFunction(PredictionFunction predictionFunction)
LearningAlgorithmsetPredictionFunction in interface LearningAlgorithmCopyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.