public class LibLinearLearningAlgorithm extends Object implements LinearMethod, ClassificationLearningAlgorithm, 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: http://liblinear.bwaldvogel.de
| Constructor and Description |
|---|
LibLinearLearningAlgorithm() |
LibLinearLearningAlgorithm(double cp,
double cn,
String representationName) |
LibLinearLearningAlgorithm(Label label,
double cp,
double cn,
boolean fairness,
String representationName) |
LibLinearLearningAlgorithm(Label label,
double cp,
double cn,
String representationName) |
| Modifier and Type | Method and Description |
|---|---|
LibLinearLearningAlgorithm |
duplicate()
Creates a new instance of the LearningAlgorithm initialized with the same parameters
of the learningAlgorithm to be duplicated.
|
Label |
getLabel() |
List<Label> |
getLabels()
Returns the labels representing the concept to be learned.
|
BinaryLinearClassifier |
getPredictionFunction()
Returns the classifier learned during the training process
|
String |
getRepresentation()
Returns the representation this learning algorithm exploits
|
boolean |
isFairness() |
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 |
setFairness(boolean fairness) |
void |
setLabel(Label label) |
void |
setLabels(List<Label> labels)
Sets the labels representing the concept to be learned.
|
void |
setRepresentation(String representation)
Sets the representation this learning algorithm will exploit
|
public LibLinearLearningAlgorithm(Label label, double cp, double cn, String representationName)
label - The label to be learnedcp - The regularization parameter for positive examplescn - The regularization parameter for negative examplesrepresentationName - The identifier of the representation to be considered for the
training steppublic LibLinearLearningAlgorithm(Label label, double cp, double cn, boolean fairness, String representationName)
label - The label to be learnedcp - The regularization parameter for positive examplescn - The regularization parameter for negative examplesfairness - A boolean parameter to force the fairness policyrepresentationName - The identifier of the representation to be considered for the
training steppublic LibLinearLearningAlgorithm(double cp,
double cn,
String representationName)
cp - The regularization parameter for positive examplescn - The regularization parameter for negative examplesrepresentationName - The identifier of the representation to be considered for the
training steppublic LibLinearLearningAlgorithm()
public String getRepresentation()
LinearMethodgetRepresentation in interface LinearMethodpublic void setRepresentation(String representation)
LinearMethodsetRepresentation in interface LinearMethodrepresentation - the representation to setpublic void learn(Dataset dataset)
LearningAlgorithmdatasetlearn in interface LearningAlgorithmdataset - the training datapublic LibLinearLearningAlgorithm duplicate()
LearningAlgorithmduplicate in interface LearningAlgorithmpublic void reset()
LearningAlgorithmreset in interface LearningAlgorithmpublic BinaryLinearClassifier getPredictionFunction()
ClassificationLearningAlgorithmgetPredictionFunction in interface ClassificationLearningAlgorithmgetPredictionFunction in interface LearningAlgorithmpublic 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 boolean isFairness()
public void setFairness(boolean fairness)
fairness - Set the boolean parameter to force the fairness policyCopyright © 2014 Semantic Analytics Group @ Uniroma2. All rights reserved.