public class DCDLearningAlgorithm extends Object implements LinearMethod, ClassificationLearningAlgorithm, BinaryLearningAlgorithm
| Constructor and Description |
|---|
DCDLearningAlgorithm() |
DCDLearningAlgorithm(double cp,
double cn,
DCDLoss dcdLoss,
boolean useBias,
int maxIterations,
String representationName) |
DCDLearningAlgorithm(double cp,
double cn,
int maxIterations,
String representationName)
This constructor uses the L2 loss and ignores the bias of the hyper-plane
|
DCDLearningAlgorithm(Label label,
double cp,
double cn,
DCDLoss dcdLoss,
boolean useBias,
int maxIterations,
String representationName) |
| Modifier and Type | Method and Description |
|---|---|
DCDLearningAlgorithm |
duplicate()
Creates a new instance of the LearningAlgorithm initialized with the same parameters
of the learningAlgorithm to be duplicated.
|
double |
getCn() |
double |
getCp() |
DCDLoss |
getDcdLoss() |
Label |
getLabel() |
List<Label> |
getLabels()
Returns the labels representing the concept to be learned.
|
int |
getMaxIterations() |
BinaryLinearClassifier |
getPredictionFunction()
Returns the classifier learned during the training process
|
String |
getRepresentation()
Returns the representation this learning algorithm exploits
|
long |
getSeed() |
boolean |
isFairness() |
boolean |
isUseBias() |
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 |
setCn(double cn) |
void |
setCp(double cp) |
void |
setDcdLoss(DCDLoss dcdLoss) |
void |
setFairness(boolean fairness) |
void |
setLabel(Label label) |
void |
setLabels(List<Label> labels)
Sets the labels representing the concept to be learned.
|
void |
setMaxIterations(int maxIterations) |
void |
setRepresentation(String representation)
Sets the representation this learning algorithm will exploit
|
void |
setSeed(long seed) |
void |
setUseBias(boolean useBias) |
public DCDLearningAlgorithm()
public DCDLearningAlgorithm(Label label, double cp, double cn, DCDLoss dcdLoss, boolean useBias, int maxIterations, String representationName)
label - The label to be learnedcp - The regularization parameter for positive examplescn - The regularization parameter for negative examplesdcdLoss - The Loss functionuseBias - Set the use of biasmaxIterations - The maximum number of iterationsrepresentationName - The identifier of the representation to be considered for the
training steppublic DCDLearningAlgorithm(double cp,
double cn,
DCDLoss dcdLoss,
boolean useBias,
int maxIterations,
String representationName)
label - The label to be learnedcp - The regularization parameter for positive examplescn - The regularization parameter for negative examplesdcdLoss - The Loss functionuseBias - Set the use of biasmaxIterations - The maximum number of iterationsrepresentationName - The identifier of the representation to be considered for the
training steppublic DCDLearningAlgorithm(double cp,
double cn,
int maxIterations,
String representationName)
label - The label to be learnedcp - The regularization parameter for positive examplescn - The regularization parameter for negative examplesmaxIterations - The maximum number of iterationsrepresentationName - The identifier of the representation to be considered for the
training steppublic DCDLearningAlgorithm duplicate()
LearningAlgorithmduplicate in interface LearningAlgorithmpublic double getCn()
public double getCp()
public DCDLoss getDcdLoss()
public Label getLabel()
getLabel in interface BinaryLearningAlgorithmpublic List<Label> getLabels()
LearningAlgorithmgetLabels in interface BinaryLearningAlgorithmgetLabels in interface LearningAlgorithmpublic int getMaxIterations()
public BinaryLinearClassifier getPredictionFunction()
ClassificationLearningAlgorithmgetPredictionFunction in interface ClassificationLearningAlgorithmgetPredictionFunction in interface LearningAlgorithmpublic String getRepresentation()
LinearMethodgetRepresentation in interface LinearMethodpublic long getSeed()
public boolean isFairness()
public boolean isUseBias()
public void learn(Dataset dataset)
LearningAlgorithmdatasetlearn in interface LearningAlgorithmdataset - the training datapublic void reset()
LearningAlgorithmreset in interface LearningAlgorithmpublic void setCn(double cn)
public void setCp(double cp)
public void setDcdLoss(DCDLoss dcdLoss)
public void setFairness(boolean fairness)
public void setLabel(Label label)
setLabel in interface BinaryLearningAlgorithmpublic void setLabels(List<Label> labels)
LearningAlgorithmsetLabels in interface BinaryLearningAlgorithmsetLabels in interface LearningAlgorithmlabels - the labels representing the concept to be learnedpublic void setMaxIterations(int maxIterations)
public void setRepresentation(String representation)
LinearMethodsetRepresentation in interface LinearMethodrepresentation - the representation to setpublic void setSeed(long seed)
public void setUseBias(boolean useBias)
Copyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.