public class LogitBoost extends Object implements Classifier, Parameterized
OneVSAll
classifier. regression
models to create a powerful classifier.
Modifier and Type | Field and Description |
---|---|
protected Regressor |
baseLearner
Weak learner to use, 'the oracle'
|
protected List<Regressor> |
baseLearners
Weak learners
|
protected double |
fScaleConstant
The constant factor that the sum of regressors is scaled by.
|
Constructor and Description |
---|
LogitBoost(int M)
Creates a new LogitBoost using the standard
MultipleLinearRegression . |
LogitBoost(Regressor baseLearner,
int M)
Creates a new LogitBoost using the given base learner.
|
Modifier and Type | Method and Description |
---|---|
CategoricalResults |
classify(DataPoint data)
Performs classification on the given data point.
|
LogitBoost |
clone() |
int |
getMaxIterations()
The maximum number of iterations of boosting that may occur.
|
List<Regressor> |
getModels() |
Parameter |
getParameter(String paramName)
Returns the parameter with the given name.
|
List<Parameter> |
getParameters()
Returns the list of parameters that can be altered for this learner.
|
double |
getzMax()
Returns the maximum miss-classification penalty used by the algorithm.
|
protected double |
P(DataPoint x)
Returns the probability that a given data point belongs to class 1
|
void |
setMaxIterations(int maxIterations)
Sets the maximum number of iterations of boosting that can occur, giving
the maximum number of base learners that may be trained
|
void |
setzMax(double zMax)
Sets the penalty bound for miss-classification of results.
|
boolean |
supportsWeightedData()
Indicates whether the model knows how to train using weighted data points.
|
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.
|
protected double fScaleConstant
protected Regressor baseLearner
public LogitBoost(int M)
MultipleLinearRegression
.M
- the maximum number of iterations.public LogitBoost(Regressor baseLearner, int M)
baseLearner
- the weak learner to build an ensemble out of.M
- the maximum number of iterations.public List<Regressor> getModels()
public void setMaxIterations(int maxIterations)
maxIterations
- the maximum number of iterationspublic int getMaxIterations()
public void setzMax(double zMax)
zMax
- the penalty boundArithmeticException
- if the value is not in (0, Double.MAX_VALUE
]public double getzMax()
public CategoricalResults classify(DataPoint data)
Classifier
classify
in interface Classifier
data
- the data point to classifypublic void trainC(ClassificationDataSet dataSet, ExecutorService threadPool)
Classifier
trainC
in interface Classifier
dataSet
- the data set to train onthreadPool
- the source of threads to use.public void trainC(ClassificationDataSet dataSet)
Classifier
trainC
in interface Classifier
dataSet
- the data set to train onprotected double P(DataPoint x)
x
- the data point in questionpublic boolean supportsWeightedData()
Classifier
supportsWeightedData
in interface Classifier
public LogitBoost clone()
clone
in interface Classifier
clone
in class Object
public List<Parameter> getParameters()
Parameterized
getParameters
in interface Parameterized
public Parameter getParameter(String paramName)
Parameterized
getParameter
in interface Parameterized
paramName
- the name of the parameter to obtainCopyright © 2017. All rights reserved.