public class LearningCurveExtrapolator<I extends ILabeledAttributeArrayInstance<?>,D extends IOrderedLabeledAttributeArrayDataset<I,?>>
extends java.lang.Object
implements ai.libs.jaicore.basic.ILoggingCustomizable
| Modifier and Type | Field and Description |
|---|---|
protected D |
dataset |
protected LearningCurveExtrapolationMethod |
extrapolationMethod |
protected weka.classifiers.Classifier |
learner |
protected java.util.Random |
random |
protected ASamplingAlgorithm<D> |
samplingAlgorithm |
protected ISamplingAlgorithmFactory<D,? extends ASamplingAlgorithm<D>> |
samplingAlgorithmFactory |
protected D |
test |
protected D |
train |
| Constructor and Description |
|---|
LearningCurveExtrapolator(LearningCurveExtrapolationMethod extrapolationMethod,
weka.classifiers.Classifier learner,
D dataset,
double trainsplit,
int[] anchorPoints,
ISamplingAlgorithmFactory<D,? extends ASamplingAlgorithm<D>> samplingAlgorithmFactory,
long seed)
Create a learning curve extrapolator with a subsampling factory.
|
| Modifier and Type | Method and Description |
|---|---|
LearningCurve |
extrapolateLearningCurve()
Measure the learner accuracy at the given anchorpoints and extrapolate a
learning curve based the results.
|
int[] |
getAnchorPoints() |
D |
getDataset() |
LearningCurveExtrapolationMethod |
getExtrapolationMethod() |
weka.classifiers.Classifier |
getLearner() |
java.lang.String |
getLoggerName() |
int[] |
getTrainingTimes() |
double[] |
getyValues() |
void |
setLoggerName(java.lang.String name) |
protected weka.classifiers.Classifier learner
protected D extends IOrderedLabeledAttributeArrayDataset<I,?> dataset
protected D extends IOrderedLabeledAttributeArrayDataset<I,?> train
protected D extends IOrderedLabeledAttributeArrayDataset<I,?> test
protected ISamplingAlgorithmFactory<D extends IOrderedLabeledAttributeArrayDataset<I,?>,? extends ASamplingAlgorithm<D extends IOrderedLabeledAttributeArrayDataset<I,?>>> samplingAlgorithmFactory
protected ASamplingAlgorithm<D extends IOrderedLabeledAttributeArrayDataset<I,?>> samplingAlgorithm
protected java.util.Random random
protected LearningCurveExtrapolationMethod extrapolationMethod
public LearningCurveExtrapolator(LearningCurveExtrapolationMethod extrapolationMethod, weka.classifiers.Classifier learner, D dataset, double trainsplit, int[] anchorPoints, ISamplingAlgorithmFactory<D,? extends ASamplingAlgorithm<D>> samplingAlgorithmFactory, long seed) throws DatasetCreationException
extrapolationMethod - Method for extrapolating a learning curve from anchorpoints.learner - Learning model to predict the learning curve of.dataset - Dataset to measure evaluate the learner on.trainsplit - Portion of the dataset, which shall be used to sample from for
training.samplingAlgorithmFactory - Subsampling algorithm factory to create a configured subsampler
with.seed - Random seed.DatasetCreationExceptionpublic LearningCurve extrapolateLearningCurve() throws InvalidAnchorPointsException, ai.libs.jaicore.basic.algorithm.exceptions.AlgorithmException, java.lang.InterruptedException
anchorPoints - Sample sizes as anchorpoints, where the true accuracy shall be
measured.InvalidAnchorPointsException - The anchorpoints (amount, values, ...) are not suitable for the
given learning curve extrapolation method.ai.libs.jaicore.basic.algorithm.exceptions.AlgorithmException - An error occured during the creation of the specified
anchorpoints.java.lang.InterruptedExceptionpublic weka.classifiers.Classifier getLearner()
public D getDataset()
public LearningCurveExtrapolationMethod getExtrapolationMethod()
public int[] getAnchorPoints()
public double[] getyValues()
public int[] getTrainingTimes()
public java.lang.String getLoggerName()
getLoggerName in interface ai.libs.jaicore.basic.ILoggingCustomizablepublic void setLoggerName(java.lang.String name)
setLoggerName in interface ai.libs.jaicore.basic.ILoggingCustomizable