Uses of Class
org.tribuo.classification.Label
Package
Description
Provides classes and infrastructure for multiclass classification problems.
Provides simple baseline multiclass classifiers.
Provides implementations of decision trees for classification problems.
Provides internal implementation classes for classification decision trees.
Provides majority vote ensemble combiners for classification
along with an implementation of multiclass Adaboost.
Evaluation classes for multi-class classification.
Provides a multiclass data generator used for testing implementations, along with several synthetic data generators
for 2d binary classification problems to be used in demos or tutorials.
Provides a set of main methods for interacting with classification tasks.
Provides core infrastructure for local model based explanations.
Provides an implementation of LIME (Locally Interpretable Model Explanations).
Provides an interface to LibLinear-java for classification problems.
Provides an interface to LibSVM for classification problems.
Provides an implementation of multinomial naive bayes (i.e., naive bayes for non-negative count data).
Provides infrastructure for
SequenceModel
s which
emit Label
s at each step of the sequence.Provides a classification sequence data generator for smoke testing implementations.
Provides an implementation of Viterbi for generating structured outputs, which can sit on top of any
Label
based classification model.Provides an implementation of a linear chain CRF trained using Stochastic Gradient Descent.
Provides an implementation of a classification factorization machine using Stochastic Gradient Descent.
Provides a SGD implementation of a Kernel SVM using the Pegasos algorithm.
Provides an implementation of a classification linear model using Stochastic Gradient Descent.
Provides an interface to XGBoost for classification problems.
Provides a K-Nearest Neighbours implementation which works across
all Tribuo
Output
types.Code for uploading models to Oracle Cloud Infrastructure Data Science, and also for scoring models deployed
in Oracle Cloud Infrastructure Data Science.
This package contains a Tribuo wrapper around the ONNX Runtime.
Provides an interface to TensorFlow, allowing the training of non-sequential models using any supported
Tribuo output type.
Provides classes and infrastructure for working with multi-label classification problems.
Provides implementations of binary relevance based multi-label classification
algorithms.
Provides a multi-label ensemble combiner that performs a (possibly
weighted) majority vote among each label independently, along with an
implementation of classifier chain ensembles.
-
Uses of Label in org.tribuo.classification
Modifier and TypeInterfaceDescriptioninterface
ClassificationOptions<TRAINER extends Trainer<Label>>
AnOptions
that can produce a classificationTrainer
based on the provided arguments.Modifier and TypeFieldDescriptionstatic final Label
LabelFactory.UNKNOWN_LABEL
The singleton unknown label, used for unlablled examples.Modifier and TypeMethodDescriptionLabel.copy()
<V> Label
LabelFactory.generateOutput
(V label) Generates the Label string by calling toString on the input.ImmutableLabelInfo.getOutput
(int id) LabelFactory.getUnknownOutput()
Modifier and TypeMethodDescriptionLabelFactory.constructInfoForExternalModel
(Map<Label, Integer> mapping) LabelInfo.generateImmutableOutputInfo()
LabelFactory.generateInfo()
Generates an empty MutableLabelInfo.LabelInfo.generateMutableOutputInfo()
ImmutableLabelInfo.getDomain()
Returns the set of possibleLabel
s that this LabelInfo has seen.LabelInfo.getDomain()
Returns the set of possibleLabel
s that this LabelInfo has seen.LabelFactory.getEvaluator()
ImmutableLabelInfo.iterator()
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 TypeMethodDescriptionboolean
Label.fullEquals
(Label o) int
long
LabelInfo.getLabelCount
(Label label) Gets the count of the supplied label, or 0 if the label is unknown.void
Modifier and TypeMethodDescriptionLabelFactory.constructInfoForExternalModel
(Map<Label, Integer> mapping) boolean
ImmutableLabelInfo.domainAndIDEquals
(ImmutableOutputInfo<Label> other) 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. -
Uses of Label in org.tribuo.classification.baseline
Modifier and TypeMethodDescriptionDummyClassifierTrainer.train
(Dataset<Label> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance) DummyClassifierTrainer.train
(Dataset<Label> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance, int invocationCount) Modifier and TypeMethodDescriptionDummyClassifierTrainer.train
(Dataset<Label> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance) DummyClassifierTrainer.train
(Dataset<Label> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance, int invocationCount) -
Uses of Label in org.tribuo.classification.dtree
Modifier and TypeMethodDescriptionprotected AbstractTrainingNode<Label>
CARTClassificationTrainer.mkTrainingNode
(Dataset<Label> examples, AbstractTrainingNode.LeafDeterminer leafDeterminer) Modifier and TypeMethodDescriptionprotected AbstractTrainingNode<Label>
CARTClassificationTrainer.mkTrainingNode
(Dataset<Label> examples, AbstractTrainingNode.LeafDeterminer leafDeterminer) -
Uses of Label in org.tribuo.classification.dtree.impl
Modifier and TypeMethodDescriptionClassifierTrainingNode.buildRandomTree
(int[] featureIDs, SplittableRandom rng) Builds a CART tree with randomly chosen split points.ClassifierTrainingNode.buildTree
(int[] featureIDs, SplittableRandom rng, boolean useRandomSplitPoints) Builds a tree according to CART (as it does not do multi-way splits on categorical values like C4.5).ClassifierTrainingNode.convertTree()
ModifierConstructorDescriptionClassifierTrainingNode
(LabelImpurity impurity, Dataset<Label> examples, AbstractTrainingNode.LeafDeterminer leafDeterminer) Constructor which creates the inverted file. -
Uses of Label in org.tribuo.classification.ensemble
Modifier and TypeMethodDescriptionFullyWeightedVotingCombiner.combine
(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions) FullyWeightedVotingCombiner.combine
(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions, float[] weights) VotingCombiner.combine
(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions) VotingCombiner.combine
(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions, float[] weights) AdaBoostTrainer.train
(Dataset<Label> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) If the trainer implementsWeightedExamples
then do boosting by weighting, otherwise do boosting by sampling.AdaBoostTrainer.train
(Dataset<Label> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance, int invocationCount) ClassificationEnsembleOptions.wrapTrainer
(Trainer<Label> trainer) Wraps the supplied trainer using the ensemble trainer described by these options.Modifier and TypeMethodDescriptionFullyWeightedVotingCombiner.combine
(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions) FullyWeightedVotingCombiner.combine
(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions) FullyWeightedVotingCombiner.combine
(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions, float[] weights) FullyWeightedVotingCombiner.combine
(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions, float[] weights) VotingCombiner.combine
(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions) VotingCombiner.combine
(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions) VotingCombiner.combine
(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions, float[] weights) VotingCombiner.combine
(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions, float[] weights) AdaBoostTrainer.train
(Dataset<Label> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) If the trainer implementsWeightedExamples
then do boosting by weighting, otherwise do boosting by sampling.AdaBoostTrainer.train
(Dataset<Label> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance, int invocationCount) ClassificationEnsembleOptions.wrapTrainer
(Trainer<Label> trainer) Wraps the supplied trainer using the ensemble trainer described by these options.ModifierConstructorDescriptionAdaBoostTrainer
(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. -
Uses of Label in org.tribuo.classification.evaluation
Modifier and TypeMethodDescriptionLabelMetric.Context.getCM()
Gets the confusion matrix.LabelConfusionMatrix.getDomain()
LabelMetrics.getImpl()
Returns the implementing function for this metric.LabelConfusionMatrix.getLabelOrder()
Gets the current label order.LabelMetric.getTarget()
LabelConfusionMatrix.observed()
Modifier and TypeMethodDescriptiondouble
The per label accuracy of the evaluation.double
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
double
double
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
double
double
Modifier and TypeMethodDescriptionstatic 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) protected LabelMetric.Context
LabelEvaluator.createContext
(Model<Label> model, List<Prediction<Label>> predictions) protected LabelMetric.Context
LabelEvaluator.createContext
(Model<Label> model, List<Prediction<Label>> predictions) LabelMetric.createContext
(Model<Label> model, List<Prediction<Label>> predictions) LabelMetric.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) 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> newLabelOrder) Sets the label order used inLabelConfusionMatrix.toString()
.ModifierConstructorDescriptionConstructs a context and compute the confusion matrix using the specified model and predictions.Constructs a context and compute the confusion matrix using the specified model and predictions.Context
(SequenceModel<Label> model, List<Prediction<Label>> predictions) Constructs a context and compute the confusion matrix using the specified model and predictions.Context
(SequenceModel<Label> model, List<Prediction<Label>> predictions) Constructs a context and compute the confusion matrix using the specified model and 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 newLabelMetric
for the supplied metric target, using the supplied function.LabelMetric
(MetricTarget<Label> tgt, String name, ToDoubleBiFunction<MetricTarget<Label>, LabelMetric.Context> impl) Construct a newLabelMetric
for the supplied metric target, using the supplied function. -
Uses of Label in org.tribuo.classification.example
Modifier and TypeFieldDescriptionstatic final Label
DemoLabelDataSource.FIRST_CLASS
The first class.static final Label
DemoLabelDataSource.SECOND_CLASS
The second class.Modifier and TypeMethodDescriptionLabelledDataGenerator.binarySparseTrainTest()
Generates a pair of datasets with sparse features and unknown features in the test data.LabelledDataGenerator.binarySparseTrainTest()
Generates a pair of datasets with sparse features and unknown features in the test data.LabelledDataGenerator.binarySparseTrainTest
(double negate) Generates a pair of datasets with sparse features and unknown features in the test data.LabelledDataGenerator.binarySparseTrainTest
(double negate) Generates a pair of datasets with sparse features and unknown features in the test data.LabelledDataGenerator.denseTrainTest()
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}.LabelledDataGenerator.denseTrainTest()
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}.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}.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}.LabelledDataGenerator.emptyExample()
Generates an example with no features.CheckerboardDataSource.generate()
ConcentricCirclesDataSource.generate()
DemoLabelDataSource.generate()
Generates the examples using the configured fields.GaussianLabelDataSource.generate()
InterlockingCrescentsDataSource.generate()
NoisyInterlockingCrescentsDataSource.generate()
LabelledDataGenerator.invalidSparseExample()
Generates an example with the feature ids 1,5,8, which does not intersect with the ids used elsewhere in this class.DemoLabelDataSource.iterator()
LabelledDataGenerator.sparseTrainTest()
Generates a pair of datasets, where the features are sparse, and unknown features appear in the test data.LabelledDataGenerator.sparseTrainTest()
Generates a pair of datasets, where the features are sparse, and unknown features appear in the test data.LabelledDataGenerator.sparseTrainTest
(double negate) Generates a pair of datasets, where the features are sparse, and unknown features appear in the test data.LabelledDataGenerator.sparseTrainTest
(double negate) Generates a pair of datasets, where the features are sparse, and unknown features appear in the test data. -
Uses of Label in org.tribuo.classification.experiments
Modifier and TypeFieldDescriptionConfigurableTrainTest.ConfigurableTrainTestOptions.trainer
Load a trainer from the config file.Modifier and TypeMethodDescriptionAllTrainerOptions.getTrainer()
Test.load
(Test.ConfigurableTestOptions o) Loads in the model and the dataset from the options.Test.load
(Test.ConfigurableTestOptions o) Loads in the model and the dataset from the options.ConfigurableTrainTest.processWeights
(List<String> input) Converts the weight text input format into an object suitable for use in a Trainer. -
Uses of Label in org.tribuo.classification.explanations
Modifier and TypeMethodDescriptionExplanation.getPrediction()
The original model's prediction which is being explained. -
Uses of Label in org.tribuo.classification.explanations.lime
Modifier and TypeMethodDescriptionLIMEExplanation.getPrediction()
LIMEBase.samplePoint
(Random rng, ImmutableFeatureMap fMap, long numTrainingExamples, SparseVector input) Samples a single example from the supplied feature map and input vector.Modifier and TypeMethodDescriptionprotected com.oracle.labs.mlrg.olcut.util.Pair<LIMEExplanation,
List<Example<Regressor>>> LIMEBase.explainWithSamples
(Example<Label> example) static Regressor
LIMEBase.transformOutput
(Prediction<Label> prediction) Transforms aPrediction
for a multiclass problem into aRegressor
output which represents the probability for each class.ModifierConstructorDescriptionLIMEBase
(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) Constructs a LIME explanation.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. -
Uses of Label in org.tribuo.classification.liblinear
Modifier and TypeMethodDescriptionprotected LibLinearModel<Label>
LibLinearClassificationTrainer.createModel
(ModelProvenance provenance, ImmutableFeatureMap featureIDMap, ImmutableOutputInfo<Label> outputIDInfo, List<de.bwaldvogel.liblinear.Model> models) 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.Modifier and TypeMethodDescriptionprotected 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) 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.void
LibLinearClassificationTrainer.setLabelWeights
(Map<Label, Float> weights) protected de.bwaldvogel.liblinear.Parameter
LibLinearClassificationTrainer.setupParameters
(ImmutableOutputInfo<Label> labelIDMap) -
Uses of Label in org.tribuo.classification.libsvm
Modifier and TypeMethodDescriptionprotected LibSVMModel<Label>
LibSVMClassificationTrainer.createModel
(ModelProvenance provenance, ImmutableFeatureMap featureIDMap, ImmutableOutputInfo<Label> outputIDInfo, List<libsvm.svm_model> models) Modifier and TypeMethodDescriptionprotected 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) void
LibSVMClassificationTrainer.setLabelWeights
(Map<Label, Float> weights) protected libsvm.svm_parameter
LibSVMClassificationTrainer.setupParameters
(ImmutableOutputInfo<Label> outputIDInfo) ModifierConstructorDescriptionLibSVMClassificationTrainer
(SVMParameters<Label> parameters) Constructs a classification LibSVM trainer using the specified parameters andTrainer.DEFAULT_SEED
.LibSVMClassificationTrainer
(SVMParameters<Label> parameters, long seed) Constructs a classification LibSVM trainer using the specified parameters and seed. -
Uses of Label in org.tribuo.classification.mnb
Modifier and TypeMethodDescriptionMultinomialNaiveBayesTrainer.train
(Dataset<Label> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) MultinomialNaiveBayesTrainer.train
(Dataset<Label> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance, int invocationCount) Modifier and TypeMethodDescriptionMultinomialNaiveBayesTrainer.train
(Dataset<Label> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) MultinomialNaiveBayesTrainer.train
(Dataset<Label> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance, int invocationCount) -
Uses of Label in org.tribuo.classification.sequence
Modifier and TypeFieldDescriptionSeqTrainTest.SeqTrainTestOptions.trainer
Name of the trainer in the configuration file.Modifier and TypeMethodDescriptionLabelSequenceEvaluation.asMap()
LabelSequenceEvaluation.getConfusionMatrix()
Gets the confusion matrix backing this evaluation.LabelSequenceEvaluation.getPredictions()
Gets the flattened predictions.Modifier and TypeMethodDescriptiondouble
Gets the accuracy for this label.double
Note: confusion is not stored in the underlying map, so it won't show up in aggregation.double
The F1 for this label.double
The false negative count for this label.double
The false positive count for this label.double
The precision for this label.double
The recall for this label.double
The true negative count for this label.double
Gets the true positive count for that label.Modifier and TypeMethodDescriptionprotected 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>
List<Double>ConfidencePredictingSequenceModel.multiplyWeights
(List<Prediction<Label>> predictions, List<SUB> subsequences) A scoring method which multiplies together the per prediction scores.abstract <SUB extends ConfidencePredictingSequenceModel.Subsequence>
List<Double>ConfidencePredictingSequenceModel.scoreSubsequences
(SequenceExample<Label> example, List<Prediction<Label>> predictions, List<SUB> subsequences) The scoring function for the subsequences.abstract <SUB extends ConfidencePredictingSequenceModel.Subsequence>
List<Double>ConfidencePredictingSequenceModel.scoreSubsequences
(SequenceExample<Label> example, List<Prediction<Label>> predictions, List<SUB> subsequences) The scoring function for the subsequences.ModifierConstructorDescriptionprotected
ConfidencePredictingSequenceModel
(String name, ModelProvenance description, ImmutableFeatureMap featureIDMap, ImmutableOutputInfo<Label> labelIDMap) Constructs a ConfidencePredictingSequenceModel with the supplied parameters.protected
LabelSequenceEvaluation
(Map<MetricID<Label>, Double> results, LabelMetric.Context ctx, EvaluationProvenance provenance) Constructs a LabelSequenceEvaluation using the supplied parameters. -
Uses of Label in org.tribuo.classification.sequence.example
Modifier and TypeMethodDescriptionstatic SequenceExample<Label>
SequenceDataGenerator.generateEmptyExample()
This generates a sequence example with no examples.static SequenceExample<Label>
SequenceDataGenerator.generateGorillaA()
Generates a sequence example with a mixture of features and three labels "O", "Status" and "Monkey".static SequenceExample<Label>
SequenceDataGenerator.generateGorillaB()
Generates a sequence example with a mixture of features and three labels "O", "Status" and "Monkey".static MutableSequenceDataset<Label>
SequenceDataGenerator.generateGorillaDataset
(int numCopies) Generates a simple dataset consisting of numCopies repeats of two sequences.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. -
Uses of Label in org.tribuo.classification.sequence.viterbi
Modifier and TypeMethodDescriptionViterbiModel.getTopLabels
(Map<String, Label> distribution) ViterbiModel.getTopLabels
(Map<String, Label> distribution, int stackSize) List<List<Prediction<Label>>>
ViterbiModel.predict
(SequenceDataset<Label> examples) ViterbiModel.predict
(SequenceExample<Label> examples) 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 regularModel
train method, but before it does, it adds features derived from preceding labels.Modifier and TypeMethodDescriptionDefaultFeatureExtractor.extractFeatures
(List<Label> previousOutcomes, double value) LabelFeatureExtractor.extractFeatures
(List<Label> previousOutcomes, double value) Generates features based on the previously produced labels.NoopFeatureExtractor.extractFeatures
(List<Label> previousOutcomes, double value) ViterbiTrainerOptions.getSequenceTrainer
(Trainer<Label> innerTrainer) Creates a viterbi trainer wrapping the supplied label trainer.ViterbiModel.getTopLabels
(Map<String, Label> distribution) ViterbiModel.getTopLabels
(Map<String, Label> distribution, int stackSize) List<List<Prediction<Label>>>
ViterbiModel.predict
(SequenceDataset<Label> examples) ViterbiModel.predict
(SequenceExample<Label> examples) 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 regularModel
train method, but before it does, it adds features derived from preceding labels.ModifierConstructorDescriptionViterbiTrainer
(Trainer<Label> trainer, LabelFeatureExtractor labelFeatureExtractor, int stackSize, ViterbiModel.ScoreAggregation scoreAggregation) Constructs a ViterbiTrainer wrapping the specified trainer.ViterbiTrainer
(Trainer<Label> trainer, LabelFeatureExtractor labelFeatureExtractor, ViterbiModel.ScoreAggregation scoreAggregation) Constructs a ViterbiTrainer wrapping the specified trainer, with an unbounded stack size. -
Uses of Label in org.tribuo.classification.sgd.crf
Modifier and TypeMethodDescriptionstatic com.oracle.labs.mlrg.olcut.util.Pair<int[],
SparseVector[]> CRFModel.convert
(SequenceExample<Label> example, ImmutableFeatureMap featureIDMap, ImmutableOutputInfo<Label> labelIDMap) Deprecated.static com.oracle.labs.mlrg.olcut.util.Pair<int[],
SparseVector[]> CRFModel.convert
(SequenceExample<Label> example, ImmutableFeatureMap featureIDMap, ImmutableOutputInfo<Label> labelIDMap) Deprecated.As it's replaced withCRFModel.convertToVector(org.tribuo.sequence.SequenceExample<T>, org.tribuo.ImmutableFeatureMap)
which is more flexible.static com.oracle.labs.mlrg.olcut.util.Pair<int[],
SGDVector[]> CRFModel.convertToVector
(SequenceExample<Label> example, ImmutableFeatureMap featureIDMap, ImmutableOutputInfo<Label> labelIDMap) Converts aSequenceExample
into an array ofSGDVector
s and labels suitable for CRF prediction.static com.oracle.labs.mlrg.olcut.util.Pair<int[],
SGDVector[]> CRFModel.convertToVector
(SequenceExample<Label> example, ImmutableFeatureMap featureIDMap, ImmutableOutputInfo<Label> labelIDMap) Converts aSequenceExample
into an array ofSGDVector
s and labels suitable for CRF prediction.CRFModel.predict
(SequenceExample<Label> example) CRFModel.scoreChunks
(SequenceExample<Label> example, List<Chunk> chunks) Scores the chunks using constrained belief propagation.<SUB extends ConfidencePredictingSequenceModel.Subsequence>
List<Double>CRFModel.scoreSubsequences
(SequenceExample<Label> example, List<Prediction<Label>> predictions, List<SUB> subsequences) <SUB extends ConfidencePredictingSequenceModel.Subsequence>
List<Double>CRFModel.scoreSubsequences
(SequenceExample<Label> example, List<Prediction<Label>> predictions, List<SUB> subsequences) CRFTrainer.train
(SequenceDataset<Label> sequenceExamples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) -
Uses of Label in org.tribuo.classification.sgd.fm
Modifier and TypeMethodDescriptionModifier and TypeMethodDescriptionprotected Integer
FMClassificationTrainer.getTarget
(ImmutableOutputInfo<Label> outputInfo, Label output) Modifier and TypeMethodDescriptionprotected FMClassificationModel
FMClassificationTrainer.createModel
(String name, ModelProvenance provenance, ImmutableFeatureMap featureMap, ImmutableOutputInfo<Label> outputInfo, FMParameters parameters) protected Integer
FMClassificationTrainer.getTarget
(ImmutableOutputInfo<Label> outputInfo, Label output) -
Uses of Label in org.tribuo.classification.sgd.kernel
Modifier and TypeMethodDescriptionModifier and TypeMethodDescriptionKernelSVMTrainer.train
(Dataset<Label> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) KernelSVMTrainer.train
(Dataset<Label> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance, int invocationCount) -
Uses of Label in org.tribuo.classification.sgd.linear
Modifier and TypeMethodDescriptionModifier and TypeMethodDescriptionprotected Integer
LinearSGDTrainer.getTarget
(ImmutableOutputInfo<Label> outputInfo, Label output) Modifier and TypeMethodDescriptionprotected LinearSGDModel
LinearSGDTrainer.createModel
(String name, ModelProvenance provenance, ImmutableFeatureMap featureMap, ImmutableOutputInfo<Label> outputInfo, LinearParameters parameters) protected Integer
LinearSGDTrainer.getTarget
(ImmutableOutputInfo<Label> outputInfo, Label output) -
Uses of Label in org.tribuo.classification.xgboost
Modifier and TypeMethodDescriptionXGBoostClassificationConverter.convertBatchOutput
(ImmutableOutputInfo<Label> info, List<float[][]> probabilitiesList, int[] numValidFeatures, Example<Label>[] examples) XGBoostClassificationConverter.convertOutput
(ImmutableOutputInfo<Label> info, List<float[]> probabilitiesList, int numValidFeatures, Example<Label> example) XGBoostClassificationTrainer.train
(Dataset<Label> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) XGBoostClassificationTrainer.train
(Dataset<Label> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance, int invocationCount) Modifier and TypeMethodDescriptionXGBoostClassificationConverter.convertBatchOutput
(ImmutableOutputInfo<Label> info, List<float[][]> probabilitiesList, int[] numValidFeatures, Example<Label>[] examples) XGBoostClassificationConverter.convertOutput
(ImmutableOutputInfo<Label> info, List<float[]> probabilitiesList, int numValidFeatures, Example<Label> example) XGBoostClassificationConverter.convertOutput
(ImmutableOutputInfo<Label> info, List<float[]> probabilitiesList, int numValidFeatures, Example<Label> example) XGBoostClassificationTrainer.train
(Dataset<Label> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) XGBoostClassificationTrainer.train
(Dataset<Label> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance, int invocationCount) -
Uses of Label in org.tribuo.common.nearest
-
Uses of Label in org.tribuo.interop.oci
Modifier and TypeMethodDescriptionOCILabelConverter.convertOutput
(DenseMatrix scores, int[] numValidFeatures, List<Example<Label>> examples, ImmutableOutputInfo<Label> outputIDInfo) OCILabelConverter.convertOutput
(DenseVector scores, int numValidFeature, Example<Label> example, ImmutableOutputInfo<Label> outputIDInfo) Modifier and TypeMethodDescriptionOCILabelConverter.convertOutput
(DenseMatrix scores, int[] numValidFeatures, List<Example<Label>> examples, ImmutableOutputInfo<Label> outputIDInfo) OCILabelConverter.convertOutput
(DenseMatrix scores, int[] numValidFeatures, List<Example<Label>> examples, ImmutableOutputInfo<Label> outputIDInfo) OCILabelConverter.convertOutput
(DenseVector scores, int numValidFeature, Example<Label> example, ImmutableOutputInfo<Label> outputIDInfo) OCILabelConverter.convertOutput
(DenseVector scores, int numValidFeature, Example<Label> example, ImmutableOutputInfo<Label> outputIDInfo) -
Uses of Label in org.tribuo.interop.onnx
Modifier and TypeMethodDescriptionLabelTransformer.transformToOutput
(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Label> outputIDInfo) Modifier and TypeMethodDescriptionLabelTransformer.transformToBatchOutput
(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Label> outputIDInfo) LabelTransformer.transformToBatchPrediction
(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Label> outputIDInfo, int[] numValidFeatures, List<Example<Label>> examples) LabelTransformer.transformToPrediction
(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Label> outputIDInfo, int numValidFeatures, Example<Label> example) Modifier and TypeMethodDescriptionprotected float[][]
LabelOneVOneTransformer.getBatchPredictions
(List<ai.onnxruntime.OnnxValue> inputs, ImmutableOutputInfo<Label> outputIDInfo) Rationalises the output of an onnx model into a standard format suitable for downstream work in Tribuo.protected float[][]
LabelTransformer.getBatchPredictions
(List<ai.onnxruntime.OnnxValue> inputs, ImmutableOutputInfo<Label> outputIDInfo) Rationalises the output of an onnx model into a standard format suitable for downstream work in Tribuo.LabelTransformer.transformToBatchOutput
(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Label> outputIDInfo) LabelTransformer.transformToBatchPrediction
(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Label> outputIDInfo, int[] numValidFeatures, List<Example<Label>> examples) LabelTransformer.transformToOutput
(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Label> outputIDInfo) LabelTransformer.transformToPrediction
(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Label> outputIDInfo, int numValidFeatures, Example<Label> example) LabelTransformer.transformToPrediction
(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Label> outputIDInfo, int numValidFeatures, Example<Label> example) -
Uses of Label in org.tribuo.interop.tensorflow
Modifier and TypeMethodDescriptionLabelConverter.convertToOutput
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<Label> outputIDInfo) Modifier and TypeMethodDescriptionLabelConverter.convertToBatchOutput
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<Label> outputIDInfo) LabelConverter.convertToBatchPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<Label> outputIDInfo, int[] numValidFeatures, List<Example<Label>> examples) LabelConverter.convertToPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<Label> outputIDInfo, int numValidFeatures, Example<Label> example) Modifier and TypeMethodDescriptionorg.tensorflow.Tensor
LabelConverter.convertToTensor
(Label example, ImmutableOutputInfo<Label> outputIDInfo) Modifier and TypeMethodDescriptionLabelConverter.convertToBatchOutput
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<Label> outputIDInfo) LabelConverter.convertToBatchPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<Label> outputIDInfo, int[] numValidFeatures, List<Example<Label>> examples) LabelConverter.convertToBatchPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<Label> outputIDInfo, int[] numValidFeatures, List<Example<Label>> examples) LabelConverter.convertToOutput
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<Label> outputIDInfo) LabelConverter.convertToPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<Label> outputIDInfo, int numValidFeatures, Example<Label> example) LabelConverter.convertToPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<Label> outputIDInfo, int numValidFeatures, Example<Label> example) org.tensorflow.Tensor
LabelConverter.convertToTensor
(List<Example<Label>> examples, ImmutableOutputInfo<Label> outputIDInfo) org.tensorflow.Tensor
LabelConverter.convertToTensor
(List<Example<Label>> examples, ImmutableOutputInfo<Label> outputIDInfo) org.tensorflow.Tensor
LabelConverter.convertToTensor
(Label example, ImmutableOutputInfo<Label> outputIDInfo) -
Uses of Label in org.tribuo.multilabel
Modifier and TypeFieldDescriptionstatic final Label
MultiLabel.NEGATIVE_LABEL
A Label representing the binary negative label.Modifier and TypeMethodDescriptionMultiLabel.createLabel
(Label otherLabel) Creates a binary label from this multilabel.Modifier and TypeMethodDescriptionMultiLabel.getLabelSet()
The set of labels contained in this multilabel.Modifier and TypeMethodDescriptionboolean
Does this MultiLabel contain this 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.MultiLabel.getLabelScore
(Label label) The score for the specified label if present, returns an empty optional otherwise.Modifier and TypeMethodDescriptionstatic String
MultiLabelFactory.generateLabelString
(Set<Label> input) ModifierConstructorDescriptionMultiLabel
(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. -
Uses of Label in org.tribuo.multilabel.baseline
Modifier and TypeMethodDescriptionClassifierChainModel.getLabelOrder()
Returns the training label order.ModifierConstructorDescriptionClassifierChainTrainer
(Trainer<Label> innerTrainer, long seed) Builds a classifier chain trainer using the specified member trainer and seed.ClassifierChainTrainer
(Trainer<Label> innerTrainer, List<String> labelOrder) Builds a classifier chain trainer using the specified member trainer and seed.IndependentMultiLabelTrainer
(Trainer<Label> innerTrainer) Constructs an independent multi-label trainer wrapped around the supplied classification trainer. -
Uses of Label in org.tribuo.multilabel.ensemble
ModifierConstructorDescriptionCCEnsembleTrainer
(Trainer<Label> innerTrainer, int numMembers, long seed) Constructs a classifier chain ensemble trainer.
CRFModel.convertToVector(org.tribuo.sequence.SequenceExample<T>, org.tribuo.ImmutableFeatureMap)
which is more flexible.