Uses of Class
org.tribuo.multilabel.MultiLabel
Package
Description
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 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.
Evaluation classes for multi-label classification using
MultiLabel
.Provides a multi-label data generator for testing implementations and a
configurable data source suitable for demos and tests.
Provides an implementation of a multi-label classification factorization machine model using Stochastic Gradient Descent.
Provides an implementation of a multi-label classification linear model using Stochastic Gradient Descent.
-
Uses of MultiLabel in org.tribuo.interop.oci
Modifier and TypeMethodDescriptionOCIMultiLabelConverter.convertOutput
(DenseMatrix scores, int[] numValidFeatures, List<Example<MultiLabel>> examples, ImmutableOutputInfo<MultiLabel> outputIDInfo) OCIMultiLabelConverter.convertOutput
(DenseVector scores, int numValidFeature, Example<MultiLabel> example, ImmutableOutputInfo<MultiLabel> outputIDInfo) OCIMultiLabelConverter.getTypeWitness()
Modifier and TypeMethodDescriptionOCIMultiLabelConverter.convertOutput
(DenseMatrix scores, int[] numValidFeatures, List<Example<MultiLabel>> examples, ImmutableOutputInfo<MultiLabel> outputIDInfo) OCIMultiLabelConverter.convertOutput
(DenseMatrix scores, int[] numValidFeatures, List<Example<MultiLabel>> examples, ImmutableOutputInfo<MultiLabel> outputIDInfo) OCIMultiLabelConverter.convertOutput
(DenseVector scores, int numValidFeature, Example<MultiLabel> example, ImmutableOutputInfo<MultiLabel> outputIDInfo) OCIMultiLabelConverter.convertOutput
(DenseVector scores, int numValidFeature, Example<MultiLabel> example, ImmutableOutputInfo<MultiLabel> outputIDInfo) -
Uses of MultiLabel in org.tribuo.interop.onnx
Modifier and TypeMethodDescriptionMultiLabelTransformer.transformToOutput
(List<ai.onnxruntime.OnnxValue> value, ImmutableOutputInfo<MultiLabel> outputIDInfo) Modifier and TypeMethodDescriptionMultiLabelTransformer.getTypeWitness()
MultiLabelTransformer.transformToBatchOutput
(List<ai.onnxruntime.OnnxValue> value, ImmutableOutputInfo<MultiLabel> outputIDInfo) MultiLabelTransformer.transformToBatchPrediction
(List<ai.onnxruntime.OnnxValue> value, ImmutableOutputInfo<MultiLabel> outputIDInfo, int[] numValidFeatures, List<Example<MultiLabel>> examples) MultiLabelTransformer.transformToPrediction
(List<ai.onnxruntime.OnnxValue> value, ImmutableOutputInfo<MultiLabel> outputIDInfo, int numValidFeatures, Example<MultiLabel> example) Modifier and TypeMethodDescriptionMultiLabelTransformer.transformToBatchOutput
(List<ai.onnxruntime.OnnxValue> value, ImmutableOutputInfo<MultiLabel> outputIDInfo) MultiLabelTransformer.transformToBatchPrediction
(List<ai.onnxruntime.OnnxValue> value, ImmutableOutputInfo<MultiLabel> outputIDInfo, int[] numValidFeatures, List<Example<MultiLabel>> examples) MultiLabelTransformer.transformToOutput
(List<ai.onnxruntime.OnnxValue> value, ImmutableOutputInfo<MultiLabel> outputIDInfo) MultiLabelTransformer.transformToPrediction
(List<ai.onnxruntime.OnnxValue> value, ImmutableOutputInfo<MultiLabel> outputIDInfo, int numValidFeatures, Example<MultiLabel> example) MultiLabelTransformer.transformToPrediction
(List<ai.onnxruntime.OnnxValue> value, ImmutableOutputInfo<MultiLabel> outputIDInfo, int numValidFeatures, Example<MultiLabel> example) -
Uses of MultiLabel in org.tribuo.interop.tensorflow
Modifier and TypeMethodDescriptionMultiLabelConverter.convertToOutput
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<MultiLabel> outputIDInfo) Modifier and TypeMethodDescriptionMultiLabelConverter.convertToBatchOutput
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<MultiLabel> outputIDInfo) MultiLabelConverter.convertToBatchPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<MultiLabel> outputIDInfo, int[] numValidFeatures, List<Example<MultiLabel>> examples) MultiLabelConverter.convertToPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<MultiLabel> outputIDInfo, int numValidFeatures, Example<MultiLabel> example) MultiLabelConverter.getTypeWitness()
Modifier and TypeMethodDescriptionorg.tensorflow.Tensor
MultiLabelConverter.convertToTensor
(MultiLabel example, ImmutableOutputInfo<MultiLabel> outputIDInfo) Modifier and TypeMethodDescriptionMultiLabelConverter.convertToBatchOutput
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<MultiLabel> outputIDInfo) MultiLabelConverter.convertToBatchPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<MultiLabel> outputIDInfo, int[] numValidFeatures, List<Example<MultiLabel>> examples) MultiLabelConverter.convertToBatchPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<MultiLabel> outputIDInfo, int[] numValidFeatures, List<Example<MultiLabel>> examples) MultiLabelConverter.convertToOutput
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<MultiLabel> outputIDInfo) MultiLabelConverter.convertToPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<MultiLabel> outputIDInfo, int numValidFeatures, Example<MultiLabel> example) MultiLabelConverter.convertToPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<MultiLabel> outputIDInfo, int numValidFeatures, Example<MultiLabel> example) org.tensorflow.Tensor
MultiLabelConverter.convertToTensor
(List<Example<MultiLabel>> examples, ImmutableOutputInfo<MultiLabel> outputIDInfo) org.tensorflow.Tensor
MultiLabelConverter.convertToTensor
(List<Example<MultiLabel>> examples, ImmutableOutputInfo<MultiLabel> outputIDInfo) org.tensorflow.Tensor
MultiLabelConverter.convertToTensor
(MultiLabel example, ImmutableOutputInfo<MultiLabel> outputIDInfo) -
Uses of MultiLabel in org.tribuo.multilabel
Modifier and TypeFieldDescriptionstatic final MultiLabel
MultiLabelFactory.UNKNOWN_MULTILABEL
The sentinel unknown multi-label output used to signal there is no ground truth value.Modifier and TypeFieldDescriptionprotected Map<String,
MultiLabel> MultiLabelInfo.labels
The label domain.Modifier and TypeMethodDescriptionMultiLabel.copy()
static MultiLabel
MultiLabel.createFromPairList
(List<com.oracle.labs.mlrg.olcut.util.Pair<String, Boolean>> dimensions) Creates a MultiLabel from a list of dimensions.static MultiLabel
MultiLabel.deserializeFromProto
(int version, String className, com.google.protobuf.Any message) Deserialization factory.<V> MultiLabel
MultiLabelFactory.generateOutput
(V label) Parses the MultiLabel value either by toStringing the input and callingparseString(java.lang.String)
or if it's aCollection
iterating over the elements calling toString on each element in turn and usingparseElement(java.lang.String)
.ImmutableMultiLabelInfo.getOutput
(int id) MultiLabelFactory.getUnknownOutput()
static MultiLabel
MultiLabel.parseString
(String s) Parses a string of the form: dimension-name=output,...,dimension-name=output where output must be readable byBoolean.parseBoolean(String)
.static MultiLabel
MultiLabel.parseString
(String s, char splitChar) Parses a string of the form:Modifier and TypeMethodDescriptionMultiLabelFactory.constructInfoForExternalModel
(Map<MultiLabel, Integer> mapping) MultiLabelInfo.generateImmutableOutputInfo()
MultiLabelFactory.generateInfo()
MultiLabelInfo.generateMutableOutputInfo()
ImmutableMultiLabelInfo.getDomain()
MultiLabelInfo.getDomain()
Returns a set of MultiLabel, where each has a single Label inside it.MultiLabelFactory.getEvaluator()
MultiLabelFactory.getTypeWitness()
Iterator<com.oracle.labs.mlrg.olcut.util.Pair<Integer,
MultiLabel>> ImmutableMultiLabelInfo.iterator()
Modifier and TypeMethodDescriptionboolean
MultiLabel.fullEquals
(MultiLabel o) boolean
MultiLabel.fullEquals
(MultiLabel o, double tolerance) int
ImmutableMultiLabelInfo.getID
(MultiLabel output) static int
MultiLabel.intersectionSize
(MultiLabel first, MultiLabel second) The number of labels present in both MultiLabels.static double
MultiLabel.jaccardScore
(MultiLabel first, MultiLabel second) The Jaccard score/index between the two MultiLabels.void
MutableMultiLabelInfo.observe
(MultiLabel output) Throws IllegalStateException if the MultiLabel contains a Label which has a "," in it.static int
MultiLabel.unionSize
(MultiLabel first, MultiLabel second) The number of unique labels across both MultiLabels.Modifier and TypeMethodDescriptionMultiLabelFactory.constructInfoForExternalModel
(Map<MultiLabel, Integer> mapping) MultiLabel.convertToDenseVector
(ImmutableOutputInfo<MultiLabel> info) Converts this MultiLabel into a DenseVector using the indices from the output info.MultiLabel.convertToSparseVector
(ImmutableOutputInfo<MultiLabel> info) Converts this MultiLabel into a SparseVector using the indices from the output info.boolean
ImmutableMultiLabelInfo.domainAndIDEquals
(ImmutableOutputInfo<MultiLabel> other) -
Uses of MultiLabel in org.tribuo.multilabel.baseline
Modifier and TypeMethodDescriptionClassifierChainModel.getExcuse
(Example<MultiLabel> example) IndependentMultiLabelModel.getExcuse
(Example<MultiLabel> example) ClassifierChainModel.predict
(Example<MultiLabel> example) IndependentMultiLabelModel.predict
(Example<MultiLabel> example) IndependentMultiLabelTrainer.train
(Dataset<MultiLabel> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) IndependentMultiLabelTrainer.train
(Dataset<MultiLabel> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance, int invocationCount) Modifier and TypeMethodDescriptionClassifierChainModel.getExcuse
(Example<MultiLabel> example) IndependentMultiLabelModel.getExcuse
(Example<MultiLabel> example) ClassifierChainModel.predict
(Example<MultiLabel> example) IndependentMultiLabelModel.predict
(Example<MultiLabel> example) ClassifierChainTrainer.train
(Dataset<MultiLabel> examples) ClassifierChainTrainer.train
(Dataset<MultiLabel> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) ClassifierChainTrainer.train
(Dataset<MultiLabel> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance, int invocationCount) IndependentMultiLabelTrainer.train
(Dataset<MultiLabel> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) IndependentMultiLabelTrainer.train
(Dataset<MultiLabel> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance, int invocationCount) -
Uses of MultiLabel in org.tribuo.multilabel.ensemble
Modifier and TypeMethodDescriptionMultiLabelVotingCombiner.combine
(ImmutableOutputInfo<MultiLabel> outputInfo, List<Prediction<MultiLabel>> predictions) MultiLabelVotingCombiner.combine
(ImmutableOutputInfo<MultiLabel> outputInfo, List<Prediction<MultiLabel>> predictions, float[] weights) MultiLabelVotingCombiner.getTypeWitness()
CCEnsembleTrainer.train
(Dataset<MultiLabel> examples) CCEnsembleTrainer.train
(Dataset<MultiLabel> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) CCEnsembleTrainer.train
(Dataset<MultiLabel> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance, int invocationCount) Modifier and TypeMethodDescriptionMultiLabelVotingCombiner.combine
(ImmutableOutputInfo<MultiLabel> outputInfo, List<Prediction<MultiLabel>> predictions) MultiLabelVotingCombiner.combine
(ImmutableOutputInfo<MultiLabel> outputInfo, List<Prediction<MultiLabel>> predictions) MultiLabelVotingCombiner.combine
(ImmutableOutputInfo<MultiLabel> outputInfo, List<Prediction<MultiLabel>> predictions, float[] weights) MultiLabelVotingCombiner.combine
(ImmutableOutputInfo<MultiLabel> outputInfo, List<Prediction<MultiLabel>> predictions, float[] weights) CCEnsembleTrainer.train
(Dataset<MultiLabel> examples) CCEnsembleTrainer.train
(Dataset<MultiLabel> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) CCEnsembleTrainer.train
(Dataset<MultiLabel> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance, int invocationCount) -
Uses of MultiLabel in org.tribuo.multilabel.evaluation
Modifier and TypeMethodDescriptionMultiLabelEvaluationImpl.asMap()
MultiLabelEvaluationImpl.getConfusionMatrix()
MultiLabelConfusionMatrix.getDomain()
BiFunction<MetricTarget<MultiLabel>,
org.tribuo.multilabel.evaluation.MultiLabelMetric.Context, Double> MultiLabelMetrics.getImpl()
Get the implementation function for this metric.MultiLabelConfusionMatrix.getLabelOrder()
Gets the current label order.MultiLabelEvaluationImpl.getPredictions()
MultiLabelMetric.getTarget()
MultiLabelConfusionMatrix.observed()
Modifier and TypeMethodDescriptiondouble
MultiLabelConfusionMatrix.confusion
(MultiLabel predicted, MultiLabel truth) double
MultiLabelEvaluationImpl.confusion
(MultiLabel predicted, MultiLabel truth) double
MultiLabelEvaluationImpl.f1
(MultiLabel label) double
MultiLabelConfusionMatrix.fn
(MultiLabel cls) double
MultiLabelEvaluationImpl.fn
(MultiLabel label) double
MultiLabelConfusionMatrix.fp
(MultiLabel cls) double
MultiLabelEvaluationImpl.fp
(MultiLabel label) double
MultiLabelEvaluationImpl.precision
(MultiLabel label) double
MultiLabelEvaluationImpl.recall
(MultiLabel label) double
MultiLabelConfusionMatrix.support
(MultiLabel cls) double
MultiLabelConfusionMatrix.tn
(MultiLabel cls) double
MultiLabelEvaluationImpl.tn
(MultiLabel label) double
MultiLabelConfusionMatrix.tp
(MultiLabel cls) double
MultiLabelEvaluationImpl.tp
(MultiLabel label) Modifier and TypeMethodDescriptionprotected org.tribuo.multilabel.evaluation.MultiLabelMetric.Context
MultiLabelEvaluator.createContext
(Model<MultiLabel> model, List<Prediction<MultiLabel>> predictions) protected org.tribuo.multilabel.evaluation.MultiLabelMetric.Context
MultiLabelEvaluator.createContext
(Model<MultiLabel> model, List<Prediction<MultiLabel>> predictions) org.tribuo.multilabel.evaluation.MultiLabelMetric.Context
MultiLabelMetric.createContext
(Model<MultiLabel> model, List<Prediction<MultiLabel>> predictions) org.tribuo.multilabel.evaluation.MultiLabelMetric.Context
MultiLabelMetric.createContext
(Model<MultiLabel> model, List<Prediction<MultiLabel>> predictions) protected MultiLabelEvaluation
MultiLabelEvaluator.createEvaluation
(org.tribuo.multilabel.evaluation.MultiLabelMetric.Context context, Map<MetricID<MultiLabel>, Double> results, EvaluationProvenance provenance) protected Set<MultiLabelMetric>
MultiLabelEvaluator.createMetrics
(Model<MultiLabel> model) MultiLabelMetrics.forTarget
(MetricTarget<MultiLabel> tgt) Get the metric for the supplied target.double
MultiLabelEvaluationImpl.get
(MetricID<MultiLabel> key) static double
MultiLabelMetrics.jaccardScore
(List<Prediction<MultiLabel>> predictions) The average Jaccard score across the predictions.void
MultiLabelConfusionMatrix.setLabelOrder
(List<MultiLabel> labelOrder) Sets the label order used inMultiLabelConfusionMatrix.toString()
.ModifierConstructorDescriptionMultiLabelConfusionMatrix
(Model<MultiLabel> model, List<Prediction<MultiLabel>> predictions) Constructs a multi-label confusion matrix for the specified model and predictions.MultiLabelConfusionMatrix
(Model<MultiLabel> model, List<Prediction<MultiLabel>> predictions) Constructs a multi-label confusion matrix for the specified model and predictions.MultiLabelMetric
(MetricTarget<MultiLabel> target, String name, BiFunction<MetricTarget<MultiLabel>, org.tribuo.multilabel.evaluation.MultiLabelMetric.Context, Double> impl) Constructs a multi-label metric.MultiLabelMetric
(MetricTarget<MultiLabel> target, String name, BiFunction<MetricTarget<MultiLabel>, org.tribuo.multilabel.evaluation.MultiLabelMetric.Context, Double> impl) Constructs a multi-label metric. -
Uses of MultiLabel in org.tribuo.multilabel.example
Modifier and TypeMethodDescriptionstatic Example<MultiLabel>
MultiLabelDataGenerator.emptyExample()
Generates an example with no features.static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<MultiLabel>,
Dataset<MultiLabel>> MultiLabelDataGenerator.generateDataset()
Generate training and testing datasets.static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<MultiLabel>,
Dataset<MultiLabel>> MultiLabelDataGenerator.generateDataset()
Generate training and testing datasets.static MutableDataset<MultiLabel>
MultiLabelGaussianDataSource.generateDataset
(int numSamples, float[] yZeroWeights, float[] yOneWeights, float[] yTwoWeights, float[] threshold, boolean[] negate, float variance, float[] xMin, float[] xMax, long seed) Generates a multi-label output drawn from three gaussian functions.static Dataset<MultiLabel>
MultiLabelDataGenerator.generateTestData()
Simple test data for checking multi-label trainers.static Dataset<MultiLabel>
MultiLabelDataGenerator.generateTrainData()
Simple training data for checking multi-label trainers.MultiLabelGaussianDataSource.getOutputFactory()
static Example<MultiLabel>
MultiLabelDataGenerator.invalidSparseExample()
Generates an example with the feature ids 1,5,8, which does not intersect with the ids used elsewhere in this class.MultiLabelGaussianDataSource.iterator()
-
Uses of MultiLabel in org.tribuo.multilabel.sgd.fm
Modifier and TypeMethodDescriptionprotected SparseVector
FMMultiLabelTrainer.getTarget
(ImmutableOutputInfo<MultiLabel> outputInfo, MultiLabel output) Modifier and TypeMethodDescriptionprotected FMMultiLabelModel
FMMultiLabelTrainer.createModel
(String name, ModelProvenance provenance, ImmutableFeatureMap featureMap, ImmutableOutputInfo<MultiLabel> outputInfo, FMParameters parameters) protected SparseVector
FMMultiLabelTrainer.getTarget
(ImmutableOutputInfo<MultiLabel> outputInfo, MultiLabel output) FMMultiLabelModel.predict
(Example<MultiLabel> example) -
Uses of MultiLabel in org.tribuo.multilabel.sgd.linear
Modifier and TypeMethodDescriptionprotected SparseVector
LinearSGDTrainer.getTarget
(ImmutableOutputInfo<MultiLabel> outputInfo, MultiLabel output) Modifier and TypeMethodDescriptionprotected LinearSGDModel
LinearSGDTrainer.createModel
(String name, ModelProvenance provenance, ImmutableFeatureMap featureMap, ImmutableOutputInfo<MultiLabel> outputInfo, LinearParameters parameters) protected SparseVector
LinearSGDTrainer.getTarget
(ImmutableOutputInfo<MultiLabel> outputInfo, MultiLabel output) LinearSGDModel.predict
(Example<MultiLabel> example)