Package | Description |
---|---|
org.tribuo.classification |
Provides classes and infrastructure for multiclass classification problems.
|
org.tribuo.classification.baseline |
Provides simple baseline multiclass classifiers.
|
org.tribuo.classification.dtree |
Provides implementations of decision trees for classification problems.
|
org.tribuo.classification.dtree.impl |
Provides internal implementation classes for classification decision trees.
|
org.tribuo.classification.ensemble |
Provides majority vote ensemble combiners for classification
along with an implementation of multiclass Adaboost.
|
org.tribuo.classification.evaluation |
Evaluation classes for multi-class classification.
|
org.tribuo.classification.example |
Provides a multiclass data generator used for testing implementations.
|
org.tribuo.classification.experiments |
Provides a set of main methods for interacting with classification tasks.
|
org.tribuo.classification.explanations |
Provides core infrastructure for local model based explanations.
|
org.tribuo.classification.explanations.lime |
Provides an implementation of LIME (Locally Interpretable Model Explanations).
|
org.tribuo.classification.liblinear |
Provides an interface to LibLinear-java for classification problems.
|
org.tribuo.classification.libsvm |
Provides an interface to LibSVM for classification problems.
|
org.tribuo.classification.mnb |
Provides an implementation of multinomial naive bayes (i.e., naive bayes for non-negative count data).
|
org.tribuo.classification.sequence |
Provides infrastructure for
SequenceModel s which
emit Label s at each step of the sequence. |
org.tribuo.classification.sequence.example |
Provides a classification sequence data generator for smoke testing implementations.
|
org.tribuo.classification.sequence.viterbi |
Provides an implementation of Viterbi for generating structured outputs, which can sit on top of any
Label based classification model. |
org.tribuo.classification.sgd.crf |
Provides an implementation of a linear chain CRF trained using Stochastic Gradient Descent.
|
org.tribuo.classification.sgd.kernel |
Provides a SGD implementation of a Kernel SVM using the Pegasos algorithm.
|
org.tribuo.classification.sgd.linear |
Provides an implementation of a classification linear model using Stochastic Gradient Descent.
|
org.tribuo.classification.xgboost |
Provides an interface to XGBoost for classification problems.
|
org.tribuo.common.nearest |
Provides a K-Nearest Neighbours implementation which works across
all Tribuo
Output types. |
org.tribuo.interop.onnx |
This package contains a Tribuo wrapper around the ONNX Runtime.
|
org.tribuo.interop.tensorflow |
Provides an interface to Tensorflow, allowing the training of non-sequential models using any supported
Tribuo output type.
|
org.tribuo.multilabel |
Provides classes and infrastructure for working with multi-label classification problems.
|
org.tribuo.multilabel.baseline |
Modifier and Type | Interface and Description |
---|---|
interface |
ClassificationOptions<TRAINER extends Trainer<Label>>
An
Options that can produce a classification Trainer based on the
provided arguments. |
Modifier and Type | Field and Description |
---|---|
static Label |
LabelFactory.UNKNOWN_LABEL
The singleton unknown label, used for unlablled examples.
|
Modifier and Type | Field and Description |
---|---|
protected Map<String,Label> |
LabelInfo.labels
The label domain.
|
Modifier and Type | Method and Description |
---|---|
Label |
Label.copy() |
<V> Label |
LabelFactory.generateOutput(V label)
Generates the Label string by calling toString
on the input.
|
Label |
ImmutableLabelInfo.getOutput(int id) |
Label |
LabelFactory.getUnknownOutput() |
Modifier and Type | Method and Description |
---|---|
ImmutableOutputInfo<Label> |
LabelFactory.constructInfoForExternalModel(Map<Label,Integer> mapping) |
ImmutableOutputInfo<Label> |
LabelInfo.generateImmutableOutputInfo() |
MutableOutputInfo<Label> |
LabelFactory.generateInfo()
Generates an empty MutableLabelInfo.
|
MutableOutputInfo<Label> |
LabelInfo.generateMutableOutputInfo() |
Set<Label> |
LabelInfo.getDomain()
Returns the set of possible
Label s that this LabelInfo has seen. |
Set<Label> |
ImmutableLabelInfo.getDomain()
Returns the set of possible
Label s that this LabelInfo has seen. |
Evaluator<Label,LabelEvaluation> |
LabelFactory.getEvaluator() |
Iterator<com.oracle.labs.mlrg.olcut.util.Pair<Integer,Label>> |
ImmutableLabelInfo.iterator() |
static Model<Label> |
TrainTestHelper.run(com.oracle.labs.mlrg.olcut.config.ConfigurationManager cm,
DataOptions dataOptions,
Trainer<Label> trainer)
This method trains a model on the specified training data, and evaluates it
on the specified test data.
|
Modifier and Type | Method and Description |
---|---|
boolean |
Label.fullEquals(Label o) |
int |
ImmutableLabelInfo.getID(Label output) |
long |
LabelInfo.getLabelCount(Label label)
Gets the count of the supplied label, or 0 if the label is unknown.
|
void |
MutableLabelInfo.observe(Label output) |
Modifier and Type | Method and Description |
---|---|
ImmutableOutputInfo<Label> |
LabelFactory.constructInfoForExternalModel(Map<Label,Integer> mapping) |
static Model<Label> |
TrainTestHelper.run(com.oracle.labs.mlrg.olcut.config.ConfigurationManager cm,
DataOptions dataOptions,
Trainer<Label> trainer)
This method trains a model on the specified training data, and evaluates it
on the specified test data.
|
void |
WeightedLabels.setLabelWeights(Map<Label,Float> map)
Sets the label weights used by this trainer.
|
Modifier and Type | Method and Description |
---|---|
Optional<Excuse<Label>> |
DummyClassifierModel.getExcuse(Example<Label> example) |
Prediction<Label> |
DummyClassifierModel.predict(Example<Label> example) |
Model<Label> |
DummyClassifierTrainer.train(Dataset<Label> examples,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance) |
Modifier and Type | Method and Description |
---|---|
Optional<Excuse<Label>> |
DummyClassifierModel.getExcuse(Example<Label> example) |
Prediction<Label> |
DummyClassifierModel.predict(Example<Label> example) |
Model<Label> |
DummyClassifierTrainer.train(Dataset<Label> examples,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance) |
Modifier and Type | Method and Description |
---|---|
protected AbstractTrainingNode<Label> |
CARTClassificationTrainer.mkTrainingNode(Dataset<Label> examples) |
Modifier and Type | Method and Description |
---|---|
protected AbstractTrainingNode<Label> |
CARTClassificationTrainer.mkTrainingNode(Dataset<Label> examples) |
Modifier and Type | Method and Description |
---|---|
List<AbstractTrainingNode<Label>> |
ClassifierTrainingNode.buildTree(int[] featureIDs)
Builds a tree according to CART (as it does not do multi-way splits on categorical values like C4.5).
|
Node<Label> |
ClassifierTrainingNode.convertTree()
|
Constructor and Description |
---|
ClassifierTrainingNode(LabelImpurity impurity,
Dataset<Label> examples)
Constructor which creates the inverted file.
|
Modifier and Type | Field and Description |
---|---|
protected Trainer<Label> |
AdaBoostTrainer.innerTrainer |
Modifier and Type | Method and Description |
---|---|
Prediction<Label> |
VotingCombiner.combine(ImmutableOutputInfo<Label> outputInfo,
List<Prediction<Label>> predictions) |
Prediction<Label> |
FullyWeightedVotingCombiner.combine(ImmutableOutputInfo<Label> outputInfo,
List<Prediction<Label>> predictions) |
Prediction<Label> |
VotingCombiner.combine(ImmutableOutputInfo<Label> outputInfo,
List<Prediction<Label>> predictions,
float[] weights) |
Prediction<Label> |
FullyWeightedVotingCombiner.combine(ImmutableOutputInfo<Label> outputInfo,
List<Prediction<Label>> predictions,
float[] weights) |
Model<Label> |
AdaBoostTrainer.train(Dataset<Label> examples,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance)
If the trainer implements
WeightedExamples then do boosting by weighting,
otherwise do boosting by sampling. |
Trainer<Label> |
ClassificationEnsembleOptions.wrapTrainer(Trainer<Label> trainer) |
Modifier and Type | Method and Description |
---|---|
Prediction<Label> |
VotingCombiner.combine(ImmutableOutputInfo<Label> outputInfo,
List<Prediction<Label>> predictions) |
Prediction<Label> |
VotingCombiner.combine(ImmutableOutputInfo<Label> outputInfo,
List<Prediction<Label>> predictions) |
Prediction<Label> |
FullyWeightedVotingCombiner.combine(ImmutableOutputInfo<Label> outputInfo,
List<Prediction<Label>> predictions) |
Prediction<Label> |
FullyWeightedVotingCombiner.combine(ImmutableOutputInfo<Label> outputInfo,
List<Prediction<Label>> predictions) |
Prediction<Label> |
VotingCombiner.combine(ImmutableOutputInfo<Label> outputInfo,
List<Prediction<Label>> predictions,
float[] weights) |
Prediction<Label> |
VotingCombiner.combine(ImmutableOutputInfo<Label> outputInfo,
List<Prediction<Label>> predictions,
float[] weights) |
Prediction<Label> |
FullyWeightedVotingCombiner.combine(ImmutableOutputInfo<Label> outputInfo,
List<Prediction<Label>> predictions,
float[] weights) |
Prediction<Label> |
FullyWeightedVotingCombiner.combine(ImmutableOutputInfo<Label> outputInfo,
List<Prediction<Label>> predictions,
float[] weights) |
Model<Label> |
AdaBoostTrainer.train(Dataset<Label> examples,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance)
If the trainer implements
WeightedExamples then do boosting by weighting,
otherwise do boosting by sampling. |
Trainer<Label> |
ClassificationEnsembleOptions.wrapTrainer(Trainer<Label> trainer) |
Constructor and Description |
---|
AdaBoostTrainer(Trainer<Label> trainer,
int numMembers)
Constructs an adaboost trainer using the supplied weak learner trainer and the specified number of
boosting rounds.
|
AdaBoostTrainer(Trainer<Label> trainer,
int numMembers,
long seed)
Constructs an adaboost trainer using the supplied weak learner trainer, the specified number of
boosting rounds and the supplied seed.
|
Modifier and Type | Method and Description |
---|---|
ConfusionMatrix<Label> |
LabelMetric.Context.getCM() |
ImmutableOutputInfo<Label> |
LabelConfusionMatrix.getDomain() |
ToDoubleBiFunction<MetricTarget<Label>,LabelMetric.Context> |
LabelMetrics.getImpl()
Returns the implementing function for this metric.
|
MetricTarget<Label> |
LabelMetric.getTarget() |
Modifier and Type | Method and Description |
---|---|
double |
LabelEvaluation.accuracy(Label label)
The per label accuracy of the evaluation.
|
double |
LabelEvaluation.AUCROC(Label label)
Area under the ROC curve.
|
static double |
LabelMetrics.AUCROC(Label label,
List<Prediction<Label>> predictions)
Area under the ROC curve.
|
double |
LabelEvaluation.averagedPrecision(Label label)
Summarises a Precision-Recall Curve by taking the weighted mean of the
precisions at a given threshold, where the weight is the recall achieved at
that threshold.
|
static double |
LabelMetrics.averagedPrecision(Label label,
List<Prediction<Label>> predictions) |
double |
LabelConfusionMatrix.confusion(Label predicted,
Label trueClass) |
double |
LabelConfusionMatrix.fn(Label cls) |
double |
LabelConfusionMatrix.fp(Label cls) |
LabelEvaluationUtil.PRCurve |
LabelEvaluation.precisionRecallCurve(Label label)
Calculates the Precision Recall curve for a single label.
|
static LabelEvaluationUtil.PRCurve |
LabelMetrics.precisionRecallCurve(Label label,
List<Prediction<Label>> predictions) |
double |
LabelConfusionMatrix.support(Label label) |
double |
LabelConfusionMatrix.tn(Label cls) |
double |
LabelConfusionMatrix.tp(Label cls) |
Modifier and Type | Method and Description |
---|---|
static double |
LabelMetrics.AUCROC(Label label,
List<Prediction<Label>> predictions)
Area under the ROC curve.
|
static double |
LabelMetrics.AUCROC(MetricTarget<Label> tgt,
List<Prediction<Label>> predictions)
Area under the ROC curve.
|
static double |
LabelMetrics.AUCROC(MetricTarget<Label> tgt,
List<Prediction<Label>> predictions)
Area under the ROC curve.
|
static double |
LabelMetrics.averagedPrecision(Label label,
List<Prediction<Label>> predictions) |
static double |
LabelMetrics.averagedPrecision(MetricTarget<Label> tgt,
List<Prediction<Label>> predictions) |
static double |
LabelMetrics.averagedPrecision(MetricTarget<Label> tgt,
List<Prediction<Label>> predictions) |
LabelMetric.Context |
LabelMetric.createContext(Model<Label> model,
List<Prediction<Label>> predictions) |
LabelMetric.Context |
LabelMetric.createContext(Model<Label> model,
List<Prediction<Label>> predictions) |
protected LabelMetric.Context |
LabelEvaluator.createContext(Model<Label> model,
List<Prediction<Label>> predictions) |
protected LabelMetric.Context |
LabelEvaluator.createContext(Model<Label> model,
List<Prediction<Label>> predictions) |
protected LabelEvaluation |
LabelEvaluator.createEvaluation(LabelMetric.Context ctx,
Map<MetricID<Label>,Double> results,
EvaluationProvenance provenance) |
protected Set<LabelMetric> |
LabelEvaluator.createMetrics(Model<Label> model) |
LabelMetric |
LabelMetrics.forTarget(MetricTarget<Label> tgt)
Gets the LabelMetric wrapped around the supplied MetricTarget.
|
static LabelEvaluationUtil.PRCurve |
LabelMetrics.precisionRecallCurve(Label label,
List<Prediction<Label>> predictions) |
void |
LabelConfusionMatrix.setLabelOrder(List<Label> labelOrder)
Sets the label order used in
LabelConfusionMatrix.toString() . |
Constructor and Description |
---|
Context(Model<Label> model,
List<Prediction<Label>> predictions) |
Context(Model<Label> model,
List<Prediction<Label>> predictions) |
Context(SequenceModel<Label> model,
List<Prediction<Label>> predictions) |
Context(SequenceModel<Label> model,
List<Prediction<Label>> predictions) |
LabelConfusionMatrix(ImmutableOutputInfo<Label> domain,
List<Prediction<Label>> predictions)
Creates a confusion matrix from the supplied predictions and label info.
|
LabelConfusionMatrix(ImmutableOutputInfo<Label> domain,
List<Prediction<Label>> predictions)
Creates a confusion matrix from the supplied predictions and label info.
|
LabelConfusionMatrix(Model<Label> model,
List<Prediction<Label>> predictions)
Creates a confusion matrix from the supplied predictions, using the label info
from the supplied model.
|
LabelConfusionMatrix(Model<Label> model,
List<Prediction<Label>> predictions)
Creates a confusion matrix from the supplied predictions, using the label info
from the supplied model.
|
LabelMetric(MetricTarget<Label> tgt,
String name,
ToDoubleBiFunction<MetricTarget<Label>,LabelMetric.Context> impl)
Construct a new
LabelMetric for the supplied metric target,
using the supplied function. |
LabelMetric(MetricTarget<Label> tgt,
String name,
ToDoubleBiFunction<MetricTarget<Label>,LabelMetric.Context> impl)
Construct a new
LabelMetric for the supplied metric target,
using the supplied function. |
Modifier and Type | Method and Description |
---|---|
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<Label>,Dataset<Label>> |
LabelledDataGenerator.binarySparseTrainTest() |
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<Label>,Dataset<Label>> |
LabelledDataGenerator.binarySparseTrainTest() |
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<Label>,Dataset<Label>> |
LabelledDataGenerator.binarySparseTrainTest(double negate)
Generates a pair of datasets with sparse features and unknown features
in the test data.
|
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<Label>,Dataset<Label>> |
LabelledDataGenerator.binarySparseTrainTest(double negate)
Generates a pair of datasets with sparse features and unknown features
in the test data.
|
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<Label>,Dataset<Label>> |
LabelledDataGenerator.denseTrainTest() |
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<Label>,Dataset<Label>> |
LabelledDataGenerator.denseTrainTest() |
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<Label>,Dataset<Label>> |
LabelledDataGenerator.denseTrainTest(double negate)
Generates a train/test dataset pair which is dense in the features,
each example has 4 features,{A,B,C,D}, and there are 4 classes,
{Foo,Bar,Baz,Quux}.
|
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<Label>,Dataset<Label>> |
LabelledDataGenerator.denseTrainTest(double negate)
Generates a train/test dataset pair which is dense in the features,
each example has 4 features,{A,B,C,D}, and there are 4 classes,
{Foo,Bar,Baz,Quux}.
|
static Example<Label> |
LabelledDataGenerator.emptyExample()
Generates an example with no features.
|
static Example<Label> |
LabelledDataGenerator.invalidSparseExample()
Generates an example with the feature ids 1,5,8, which does not intersect with the
ids used elsewhere in this class.
|
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<Label>,Dataset<Label>> |
LabelledDataGenerator.sparseTrainTest() |
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<Label>,Dataset<Label>> |
LabelledDataGenerator.sparseTrainTest() |
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<Label>,Dataset<Label>> |
LabelledDataGenerator.sparseTrainTest(double negate)
Generates a pair of datasets, where the features are sparse,
and unknown features appear in the test data.
|
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<Label>,Dataset<Label>> |
LabelledDataGenerator.sparseTrainTest(double negate)
Generates a pair of datasets, where the features are sparse,
and unknown features appear in the test data.
|
Modifier and Type | Field and Description |
---|---|
Trainer<Label> |
ConfigurableTrainTest.ConfigurableTrainTestOptions.trainer |
Modifier and Type | Method and Description |
---|---|
Trainer<Label> |
AllTrainerOptions.getTrainer() |
static com.oracle.labs.mlrg.olcut.util.Pair<Model<Label>,Dataset<Label>> |
Test.load(Test.ConfigurableTestOptions o) |
static com.oracle.labs.mlrg.olcut.util.Pair<Model<Label>,Dataset<Label>> |
Test.load(Test.ConfigurableTestOptions o) |
static Map<Label,Float> |
ConfigurableTrainTest.processWeights(List<String> input)
Converts the weight text input format into an object suitable for use in a Trainer.
|
Modifier and Type | Method and Description |
---|---|
Prediction<Label> |
Explanation.getPrediction()
The original model's prediction which is being explained.
|
Modifier and Type | Method and Description |
---|---|
Explanation<T> |
TabularExplainer.explain(Example<Label> example)
Explain why the supplied
Example is classified a certain way. |
Modifier and Type | Field and Description |
---|---|
protected Model<Label> |
LIMEBase.innerModel |
Modifier and Type | Method and Description |
---|---|
Prediction<Label> |
LIMEExplanation.getPrediction() |
static Example<Label> |
LIMEBase.samplePoint(Random rng,
ImmutableFeatureMap fMap,
long numTrainingExamples,
SparseVector input)
Samples a single example from the supplied feature map and input vector.
|
Modifier and Type | Method and Description |
---|---|
LIMEExplanation |
LIMEBase.explain(Example<Label> example) |
protected com.oracle.labs.mlrg.olcut.util.Pair<LIMEExplanation,List<Example<Regressor>>> |
LIMEBase.explainWithSamples(Example<Label> example) |
static Regressor |
LIMEBase.transformOutput(Prediction<Label> prediction)
Transforms a
Prediction for a multiclass problem into a Regressor
output which represents the probability for each class. |
Constructor and Description |
---|
LIMEBase(SplittableRandom rng,
Model<Label> innerModel,
SparseTrainer<Regressor> explanationTrainer,
int numSamples)
Constructs a LIME explainer for a model which uses tabular data (i.e., no special treatment for text features).
|
LIMEColumnar(SplittableRandom rng,
Model<Label> innerModel,
SparseTrainer<Regressor> explanationTrainer,
int numSamples,
RowProcessor<Label> exampleGenerator,
Tokenizer tokenizer)
Constructs a LIME explainer for a model which uses the columnar data processing system.
|
LIMEColumnar(SplittableRandom rng,
Model<Label> innerModel,
SparseTrainer<Regressor> explanationTrainer,
int numSamples,
RowProcessor<Label> exampleGenerator,
Tokenizer tokenizer)
Constructs a LIME explainer for a model which uses the columnar data processing system.
|
LIMEExplanation(SparseModel<Regressor> model,
Prediction<Label> prediction,
RegressionEvaluation evaluation) |
LIMEText(SplittableRandom rng,
Model<Label> innerModel,
SparseTrainer<Regressor> explanationTrainer,
int numSamples,
TextFeatureExtractor<Label> extractor,
Tokenizer tokenizer)
Constructs a LIME explainer for a model which uses text data.
|
LIMEText(SplittableRandom rng,
Model<Label> innerModel,
SparseTrainer<Regressor> explanationTrainer,
int numSamples,
TextFeatureExtractor<Label> extractor,
Tokenizer tokenizer)
Constructs a LIME explainer for a model which uses text data.
|
Modifier and Type | Method and Description |
---|---|
protected LibLinearModel<Label> |
LibLinearClassificationTrainer.createModel(ModelProvenance provenance,
ImmutableFeatureMap featureIDMap,
ImmutableOutputInfo<Label> outputIDInfo,
List<de.bwaldvogel.liblinear.Model> models) |
protected Excuse<Label> |
LibLinearClassificationModel.innerGetExcuse(Example<Label> e,
double[][] allFeatureWeights)
The call to model.getFeatureWeights in the public methods copies the
weights array so this inner method exists to save the copy in getExcuses.
|
Prediction<Label> |
LibLinearClassificationModel.predict(Example<Label> example) |
Modifier and Type | Method and Description |
---|---|
protected LibLinearModel<Label> |
LibLinearClassificationTrainer.createModel(ModelProvenance provenance,
ImmutableFeatureMap featureIDMap,
ImmutableOutputInfo<Label> outputIDInfo,
List<de.bwaldvogel.liblinear.Model> models) |
protected com.oracle.labs.mlrg.olcut.util.Pair<de.bwaldvogel.liblinear.FeatureNode[][],double[][]> |
LibLinearClassificationTrainer.extractData(Dataset<Label> data,
ImmutableOutputInfo<Label> outputInfo,
ImmutableFeatureMap featureMap) |
protected com.oracle.labs.mlrg.olcut.util.Pair<de.bwaldvogel.liblinear.FeatureNode[][],double[][]> |
LibLinearClassificationTrainer.extractData(Dataset<Label> data,
ImmutableOutputInfo<Label> outputInfo,
ImmutableFeatureMap featureMap) |
protected Excuse<Label> |
LibLinearClassificationModel.innerGetExcuse(Example<Label> e,
double[][] allFeatureWeights)
The call to model.getFeatureWeights in the public methods copies the
weights array so this inner method exists to save the copy in getExcuses.
|
Prediction<Label> |
LibLinearClassificationModel.predict(Example<Label> example) |
void |
LibLinearClassificationTrainer.setLabelWeights(Map<Label,Float> weights) |
protected de.bwaldvogel.liblinear.Parameter |
LibLinearClassificationTrainer.setupParameters(ImmutableOutputInfo<Label> labelIDMap) |
Modifier and Type | Method and Description |
---|---|
protected LibSVMModel<Label> |
LibSVMClassificationTrainer.createModel(ModelProvenance provenance,
ImmutableFeatureMap featureIDMap,
ImmutableOutputInfo<Label> outputIDInfo,
List<libsvm.svm_model> models) |
Prediction<Label> |
LibSVMClassificationModel.predict(Example<Label> example) |
Modifier and Type | Method and Description |
---|---|
protected LibSVMModel<Label> |
LibSVMClassificationTrainer.createModel(ModelProvenance provenance,
ImmutableFeatureMap featureIDMap,
ImmutableOutputInfo<Label> outputIDInfo,
List<libsvm.svm_model> models) |
protected com.oracle.labs.mlrg.olcut.util.Pair<libsvm.svm_node[][],double[][]> |
LibSVMClassificationTrainer.extractData(Dataset<Label> data,
ImmutableOutputInfo<Label> outputInfo,
ImmutableFeatureMap featureMap) |
protected com.oracle.labs.mlrg.olcut.util.Pair<libsvm.svm_node[][],double[][]> |
LibSVMClassificationTrainer.extractData(Dataset<Label> data,
ImmutableOutputInfo<Label> outputInfo,
ImmutableFeatureMap featureMap) |
Prediction<Label> |
LibSVMClassificationModel.predict(Example<Label> example) |
void |
LibSVMClassificationTrainer.setLabelWeights(Map<Label,Float> weights) |
protected libsvm.svm_parameter |
LibSVMClassificationTrainer.setupParameters(ImmutableOutputInfo<Label> outputIDInfo) |
Constructor and Description |
---|
LibSVMClassificationTrainer(SVMParameters<Label> parameters) |
Modifier and Type | Method and Description |
---|---|
Optional<Excuse<Label>> |
MultinomialNaiveBayesModel.getExcuse(Example<Label> example) |
Prediction<Label> |
MultinomialNaiveBayesModel.predict(Example<Label> example) |
Model<Label> |
MultinomialNaiveBayesTrainer.train(Dataset<Label> examples,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) |
Modifier and Type | Method and Description |
---|---|
Optional<Excuse<Label>> |
MultinomialNaiveBayesModel.getExcuse(Example<Label> example) |
Prediction<Label> |
MultinomialNaiveBayesModel.predict(Example<Label> example) |
Model<Label> |
MultinomialNaiveBayesTrainer.train(Dataset<Label> examples,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) |
Modifier and Type | Method and Description |
---|---|
Map<MetricID<Label>,Double> |
LabelSequenceEvaluation.asMap() |
ConfusionMatrix<Label> |
LabelSequenceEvaluation.getConfusionMatrix()
Gets the confusion matrix backing this evaluation.
|
List<Prediction<Label>> |
LabelSequenceEvaluation.getPredictions()
Gets the flattened predictions.
|
Modifier and Type | Method and Description |
---|---|
double |
LabelSequenceEvaluation.accuracy(Label label) |
double |
LabelSequenceEvaluation.confusion(Label predictedLabel,
Label trueLabel)
Note: confusion is not stored in the underlying map, so it won't show up in aggregation.
|
double |
LabelSequenceEvaluation.f1(Label label) |
double |
LabelSequenceEvaluation.fn(Label label) |
double |
LabelSequenceEvaluation.fp(Label label) |
double |
LabelSequenceEvaluation.precision(Label label) |
double |
LabelSequenceEvaluation.recall(Label label) |
double |
LabelSequenceEvaluation.tn(Label label) |
double |
LabelSequenceEvaluation.tp(Label label) |
Modifier and Type | Method and Description |
---|---|
protected LabelMetric.Context |
LabelSequenceEvaluator.createContext(SequenceModel<Label> model,
List<List<Prediction<Label>>> predictions) |
protected LabelMetric.Context |
LabelSequenceEvaluator.createContext(SequenceModel<Label> model,
List<List<Prediction<Label>>> predictions) |
protected LabelSequenceEvaluation |
LabelSequenceEvaluator.createEvaluation(LabelMetric.Context ctx,
Map<MetricID<Label>,Double> results,
EvaluationProvenance provenance) |
protected Set<LabelMetric> |
LabelSequenceEvaluator.createMetrics(SequenceModel<Label> model) |
static <SUB extends ConfidencePredictingSequenceModel.Subsequence> |
ConfidencePredictingSequenceModel.multiplyWeights(List<Prediction<Label>> predictions,
List<SUB> subsequences)
A scoring method which multiplies together the per prediction scores.
|
abstract <SUB extends ConfidencePredictingSequenceModel.Subsequence> |
ConfidencePredictingSequenceModel.scoreSubsequences(SequenceExample<Label> example,
List<Prediction<Label>> predictions,
List<SUB> subsequences)
The scoring function for the subsequences.
|
abstract <SUB extends ConfidencePredictingSequenceModel.Subsequence> |
ConfidencePredictingSequenceModel.scoreSubsequences(SequenceExample<Label> example,
List<Prediction<Label>> predictions,
List<SUB> subsequences)
The scoring function for the subsequences.
|
Constructor and Description |
---|
ConfidencePredictingSequenceModel(String name,
ModelProvenance description,
ImmutableFeatureMap featureIDMap,
ImmutableOutputInfo<Label> labelIDMap) |
LabelSequenceEvaluation(Map<MetricID<Label>,Double> results,
LabelMetric.Context ctx,
EvaluationProvenance provenance) |
Modifier and Type | Method and Description |
---|---|
static SequenceExample<Label> |
SequenceDataGenerator.generateEmptyExample()
This generates a sequence example with no examples.
|
static SequenceExample<Label> |
SequenceDataGenerator.generateGorillaA() |
static SequenceExample<Label> |
SequenceDataGenerator.generateGorillaB() |
static MutableSequenceDataset<Label> |
SequenceDataGenerator.generateGorillaDataset(int numCopies) |
static SequenceExample<Label> |
SequenceDataGenerator.generateInvalidExample()
This generates a sequence example with features that are unused by the training data.
|
static SequenceExample<Label> |
SequenceDataGenerator.generateOtherInvalidExample()
This generates a sequence example where the first example has no features.
|
Modifier and Type | Method and Description |
---|---|
protected List<Label> |
ViterbiModel.getTopLabels(Map<String,Label> distribution) |
protected static List<Label> |
ViterbiModel.getTopLabels(Map<String,Label> distribution,
int stackSize) |
List<List<Prediction<Label>>> |
ViterbiModel.predict(SequenceDataset<Label> examples) |
List<Prediction<Label>> |
ViterbiModel.predict(SequenceExample<Label> examples) |
SequenceModel<Label> |
ViterbiTrainer.train(SequenceDataset<Label> dataset,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance)
The viterbi train method is unique because it delegates to a regular
Model train method, but before it does, it adds features derived
from preceding labels. |
Modifier and Type | Method and Description |
---|---|
List<Feature> |
NoopFeatureExtractor.extractFeatures(List<Label> previousOutcomes,
double value) |
List<Feature> |
LabelFeatureExtractor.extractFeatures(List<Label> previousOutcomes,
double value)
Generates features based on the previously produced labels.
|
List<Feature> |
DefaultFeatureExtractor.extractFeatures(List<Label> previousOutcomes,
double value) |
ViterbiTrainer |
ViterbiTrainerOptions.getSequenceTrainer(Trainer<Label> innerTrainer) |
protected List<Label> |
ViterbiModel.getTopLabels(Map<String,Label> distribution) |
protected static List<Label> |
ViterbiModel.getTopLabels(Map<String,Label> distribution,
int stackSize) |
List<List<Prediction<Label>>> |
ViterbiModel.predict(SequenceDataset<Label> examples) |
List<Prediction<Label>> |
ViterbiModel.predict(SequenceExample<Label> examples) |
SequenceModel<Label> |
ViterbiTrainer.train(SequenceDataset<Label> dataset,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance)
The viterbi train method is unique because it delegates to a regular
Model train method, but before it does, it adds features derived
from preceding labels. |
Constructor and Description |
---|
ViterbiTrainer(Trainer<Label> trainer,
LabelFeatureExtractor labelFeatureExtractor,
int stackSize,
ViterbiModel.ScoreAggregation scoreAggregation) |
ViterbiTrainer(Trainer<Label> trainer,
LabelFeatureExtractor labelFeatureExtractor,
ViterbiModel.ScoreAggregation scoreAggregation) |
Modifier and Type | Method and Description |
---|---|
List<Prediction<Label>> |
CRFModel.predict(SequenceExample<Label> example) |
Modifier and Type | Method and Description |
---|---|
static com.oracle.labs.mlrg.olcut.util.Pair<int[],SparseVector[]> |
CRFModel.convert(SequenceExample<Label> example,
ImmutableFeatureMap featureIDMap,
ImmutableOutputInfo<Label> labelIDMap)
Converts a
SequenceExample into an array of SparseVector s and labels suitable for CRF prediction. |
static com.oracle.labs.mlrg.olcut.util.Pair<int[],SparseVector[]> |
CRFModel.convert(SequenceExample<Label> example,
ImmutableFeatureMap featureIDMap,
ImmutableOutputInfo<Label> labelIDMap)
Converts a
SequenceExample into an array of SparseVector s and labels suitable for CRF prediction. |
List<Prediction<Label>> |
CRFModel.predict(SequenceExample<Label> example) |
List<Double> |
CRFModel.scoreChunks(SequenceExample<Label> example,
List<Chunk> chunks)
Scores the chunks using constrained belief propagation.
|
<SUB extends ConfidencePredictingSequenceModel.Subsequence> |
CRFModel.scoreSubsequences(SequenceExample<Label> example,
List<Prediction<Label>> predictions,
List<SUB> subsequences) |
<SUB extends ConfidencePredictingSequenceModel.Subsequence> |
CRFModel.scoreSubsequences(SequenceExample<Label> example,
List<Prediction<Label>> predictions,
List<SUB> subsequences) |
CRFModel |
CRFTrainer.train(SequenceDataset<Label> sequenceExamples,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) |
Modifier and Type | Method and Description |
---|---|
Optional<Excuse<Label>> |
KernelSVMModel.getExcuse(Example<Label> example) |
Prediction<Label> |
KernelSVMModel.predict(Example<Label> example) |
Modifier and Type | Method and Description |
---|---|
Optional<Excuse<Label>> |
KernelSVMModel.getExcuse(Example<Label> example) |
Prediction<Label> |
KernelSVMModel.predict(Example<Label> example) |
KernelSVMModel |
KernelSVMTrainer.train(Dataset<Label> examples,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) |
Modifier and Type | Method and Description |
---|---|
Optional<Excuse<Label>> |
LinearSGDModel.getExcuse(Example<Label> example) |
Prediction<Label> |
LinearSGDModel.predict(Example<Label> example) |
Model<Label> |
LinearSGDTrainer.train(Dataset<Label> examples,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) |
Modifier and Type | Method and Description |
---|---|
Optional<Excuse<Label>> |
LinearSGDModel.getExcuse(Example<Label> example) |
Prediction<Label> |
LinearSGDModel.predict(Example<Label> example) |
Model<Label> |
LinearSGDTrainer.train(Dataset<Label> examples,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) |
Modifier and Type | Method and Description |
---|---|
List<Prediction<Label>> |
XGBoostClassificationConverter.convertBatchOutput(ImmutableOutputInfo<Label> info,
List<float[][]> probabilitiesList,
int[] numValidFeatures,
Example<Label>[] examples) |
Prediction<Label> |
XGBoostClassificationConverter.convertOutput(ImmutableOutputInfo<Label> info,
List<float[]> probabilitiesList,
int numValidFeatures,
Example<Label> example) |
XGBoostModel<Label> |
XGBoostClassificationTrainer.train(Dataset<Label> examples,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) |
Modifier and Type | Method and Description |
---|---|
List<Prediction<Label>> |
XGBoostClassificationConverter.convertBatchOutput(ImmutableOutputInfo<Label> info,
List<float[][]> probabilitiesList,
int[] numValidFeatures,
Example<Label>[] examples) |
Prediction<Label> |
XGBoostClassificationConverter.convertOutput(ImmutableOutputInfo<Label> info,
List<float[]> probabilitiesList,
int numValidFeatures,
Example<Label> example) |
Prediction<Label> |
XGBoostClassificationConverter.convertOutput(ImmutableOutputInfo<Label> info,
List<float[]> probabilitiesList,
int numValidFeatures,
Example<Label> example) |
XGBoostModel<Label> |
XGBoostClassificationTrainer.train(Dataset<Label> examples,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) |
Modifier and Type | Method and Description |
---|---|
KNNTrainer<Label> |
KNNClassifierOptions.getTrainer() |
Modifier and Type | Method and Description |
---|---|
Label |
LabelTransformer.transformToOutput(List<ai.onnxruntime.OnnxValue> tensor,
ImmutableOutputInfo<Label> outputIDInfo) |
Modifier and Type | Method and Description |
---|---|
List<Label> |
LabelTransformer.transformToBatchOutput(List<ai.onnxruntime.OnnxValue> tensor,
ImmutableOutputInfo<Label> outputIDInfo) |
List<Prediction<Label>> |
LabelTransformer.transformToBatchPrediction(List<ai.onnxruntime.OnnxValue> tensor,
ImmutableOutputInfo<Label> outputIDInfo,
int[] numValidFeatures,
List<Example<Label>> examples) |
Prediction<Label> |
LabelTransformer.transformToPrediction(List<ai.onnxruntime.OnnxValue> tensor,
ImmutableOutputInfo<Label> outputIDInfo,
int numValidFeatures,
Example<Label> example) |
Modifier and Type | Method and Description |
---|---|
List<Label> |
LabelTransformer.transformToBatchOutput(List<ai.onnxruntime.OnnxValue> tensor,
ImmutableOutputInfo<Label> outputIDInfo) |
List<Prediction<Label>> |
LabelTransformer.transformToBatchPrediction(List<ai.onnxruntime.OnnxValue> tensor,
ImmutableOutputInfo<Label> outputIDInfo,
int[] numValidFeatures,
List<Example<Label>> examples) |
List<Prediction<Label>> |
LabelTransformer.transformToBatchPrediction(List<ai.onnxruntime.OnnxValue> tensor,
ImmutableOutputInfo<Label> outputIDInfo,
int[] numValidFeatures,
List<Example<Label>> examples) |
Label |
LabelTransformer.transformToOutput(List<ai.onnxruntime.OnnxValue> tensor,
ImmutableOutputInfo<Label> outputIDInfo) |
Prediction<Label> |
LabelTransformer.transformToPrediction(List<ai.onnxruntime.OnnxValue> tensor,
ImmutableOutputInfo<Label> outputIDInfo,
int numValidFeatures,
Example<Label> example) |
Prediction<Label> |
LabelTransformer.transformToPrediction(List<ai.onnxruntime.OnnxValue> tensor,
ImmutableOutputInfo<Label> outputIDInfo,
int numValidFeatures,
Example<Label> example) |
Modifier and Type | Method and Description |
---|---|
Label |
LabelTransformer.transformToOutput(org.tensorflow.Tensor<?> tensor,
ImmutableOutputInfo<Label> outputIDInfo) |
Modifier and Type | Method and Description |
---|---|
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<Label>,Dataset<Label>> |
TrainTest.load(Path trainingPath,
Path testingPath,
OutputFactory<Label> outputFactory) |
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<Label>,Dataset<Label>> |
TrainTest.load(Path trainingPath,
Path testingPath,
OutputFactory<Label> outputFactory) |
List<Label> |
LabelTransformer.transformToBatchOutput(org.tensorflow.Tensor<?> tensor,
ImmutableOutputInfo<Label> outputIDInfo) |
List<Prediction<Label>> |
LabelTransformer.transformToBatchPrediction(org.tensorflow.Tensor<?> tensor,
ImmutableOutputInfo<Label> outputIDInfo,
int[] numValidFeatures,
List<Example<Label>> examples) |
Prediction<Label> |
LabelTransformer.transformToPrediction(org.tensorflow.Tensor<?> tensor,
ImmutableOutputInfo<Label> outputIDInfo,
int numValidFeatures,
Example<Label> example) |
Modifier and Type | Method and Description |
---|---|
org.tensorflow.Tensor<?> |
LabelTransformer.transform(Label example,
ImmutableOutputInfo<Label> outputIDInfo) |
Modifier and Type | Method and Description |
---|---|
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<Label>,Dataset<Label>> |
TrainTest.load(Path trainingPath,
Path testingPath,
OutputFactory<Label> outputFactory) |
static void |
TrainTest.saveModel(Path outputPath,
Model<Label> model) |
org.tensorflow.Tensor<?> |
LabelTransformer.transform(Label example,
ImmutableOutputInfo<Label> outputIDInfo) |
org.tensorflow.Tensor<?> |
LabelTransformer.transform(List<Example<Label>> examples,
ImmutableOutputInfo<Label> outputIDInfo) |
org.tensorflow.Tensor<?> |
LabelTransformer.transform(List<Example<Label>> examples,
ImmutableOutputInfo<Label> outputIDInfo) |
List<Label> |
LabelTransformer.transformToBatchOutput(org.tensorflow.Tensor<?> tensor,
ImmutableOutputInfo<Label> outputIDInfo) |
List<Prediction<Label>> |
LabelTransformer.transformToBatchPrediction(org.tensorflow.Tensor<?> tensor,
ImmutableOutputInfo<Label> outputIDInfo,
int[] numValidFeatures,
List<Example<Label>> examples) |
List<Prediction<Label>> |
LabelTransformer.transformToBatchPrediction(org.tensorflow.Tensor<?> tensor,
ImmutableOutputInfo<Label> outputIDInfo,
int[] numValidFeatures,
List<Example<Label>> examples) |
Label |
LabelTransformer.transformToOutput(org.tensorflow.Tensor<?> tensor,
ImmutableOutputInfo<Label> outputIDInfo) |
Prediction<Label> |
LabelTransformer.transformToPrediction(org.tensorflow.Tensor<?> tensor,
ImmutableOutputInfo<Label> outputIDInfo,
int numValidFeatures,
Example<Label> example) |
Prediction<Label> |
LabelTransformer.transformToPrediction(org.tensorflow.Tensor<?> tensor,
ImmutableOutputInfo<Label> outputIDInfo,
int numValidFeatures,
Example<Label> example) |
Modifier and Type | Field and Description |
---|---|
static Label |
MultiLabel.NEGATIVE_LABEL
A Label representing the binary negative label.
|
Modifier and Type | Method and Description |
---|---|
Label |
MultiLabel.createLabel(Label otherLabel)
Creates a binary label from this multilabel.
|
Modifier and Type | Method and Description |
---|---|
Set<Label> |
MultiLabel.getLabelSet()
The set of labels contained in this multilabel.
|
Modifier and Type | Method and Description |
---|---|
boolean |
MultiLabel.contains(Label input)
Does this MultiLabel contain this Label?
|
Label |
MultiLabel.createLabel(Label otherLabel)
Creates a binary label from this multilabel.
|
long |
MultiLabelInfo.getLabelCount(Label label)
Get the number of times this Label was observed, or 0 if unknown.
|
Modifier and Type | Method and Description |
---|---|
static String |
MultiLabelFactory.generateLabelString(Set<Label> input)
|
Constructor and Description |
---|
MultiLabel(Label label)
Builds a MultiLabel from a single Label.
|
Constructor and Description |
---|
MultiLabel(Set<Label> labels)
Builds a MultiLabel object from a Set of Labels.
|
MultiLabel(Set<Label> labels,
double score)
Builds a MultiLabel object from a Set of Labels,
when the whole set has a score as well as (optionally)
the individual labels.
|
Constructor and Description |
---|
IndependentMultiLabelTrainer(Trainer<Label> innerTrainer) |
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.