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() |
RegressionFunction |
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 |
setRepresentation(String representation)
Sets the representation this learning algorithm will exploit
|
public LibLinearRegression(Label label, double c, double p, String representationName)
label
- The label to be learnedc
- The regularization parameterrepresentationName
- 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()
LinearMethod
getRepresentation
in interface LinearMethod
public void setRepresentation(String representation)
LinearMethod
setRepresentation
in interface LinearMethod
representation
- the representation to setpublic void setLabels(List<Label> labels)
LearningAlgorithm
setLabels
in interface BinaryLearningAlgorithm
setLabels
in interface LearningAlgorithm
labels
- the labels representing the concept to be learnedpublic List<Label> getLabels()
LearningAlgorithm
getLabels
in interface BinaryLearningAlgorithm
getLabels
in interface LearningAlgorithm
public Label getLabel()
getLabel
in interface BinaryLearningAlgorithm
public void setLabel(Label label)
setLabel
in interface BinaryLearningAlgorithm
public void learn(Dataset dataset)
LearningAlgorithm
dataset
learn
in interface LearningAlgorithm
dataset
- the training datapublic LibLinearRegression duplicate()
LearningAlgorithm
duplicate
in interface LearningAlgorithm
public void reset()
LearningAlgorithm
reset
in interface LearningAlgorithm
public RegressionFunction getPredictionFunction()
RegressionLearningAlgorithm
getPredictionFunction
in interface LearningAlgorithm
getPredictionFunction
in interface RegressionLearningAlgorithm
Copyright © 2015 Semantic Analytics Group @ Uniroma2. All rights reserved.