Uses of Class
org.tribuo.Example
Packages that use Example
Package
Description
Provides the core interfaces and classes for using Tribuo.
Provides anomaly data generators used for demos and testing implementations.
Provides an interface to LibLinear-java for anomaly detection problems.
Provides an interface to LibSVM for anomaly detection problems.
Provides simple baseline multiclass classifiers.
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 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 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 clustering data generators used for demos and testing implementations.
Provides an implementation of HDBSCAN*.
Provides a multithreaded implementation of K-Means, with a
configurable distance function.
Provides base classes for using liblinear from Tribuo.
The base interface to LibSVM.
Provides a K-Nearest Neighbours implementation which works across
all Tribuo
Output
types.Provides the base classes for models trained with stochastic gradient descent.
Provides common functionality for building decision trees, irrespective
of the predicted
Output
.Provides abstract classes for interfacing with XGBoost abstracting away all the
Output
dependent parts.Provides classes for processing columnar data and generating
Example
s.Provides implementations of text data processors.
Provides utility datasets which subsample or otherwise
transform the wrapped dataset.
Simple data sources for ingesting or aggregating data.
Provides an interface for model prediction combinations,
two base classes for ensemble models, a base class for
ensemble excuses, and a Bagging implementation.
Evaluation base classes, along with code for train/test splits and cross validation.
Provides implementations of base classes and interfaces from
org.tribuo
.This package contains the abstract implementation of an external model
trained by something outside of Tribuo.
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 feature extraction implementations which use ONNX models.
Provides an interface to TensorFlow, allowing the training of non-sequential models using any supported
Tribuo output type.
Provides a linear algebra system used for numerical operations in Tribuo.
Provides implementations of binary relevance based multi-label classification
algorithms.
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.
Provides simple baseline regression predictors.
Provides some example regression data generators for testing implementations.
Provides an interface to liblinear for regression problems.
Provides an interface to LibSVM for regression problems.
Provides an implementation of decision trees for regression problems.
Provides an implementation of factorization machines for regression using Stochastic Gradient Descent.
Provides an implementation of linear regression using Stochastic Gradient Descent.
Provides implementations of sparse linear regression using various forms of regularisation penalty.
Provides an interface to XGBoost for regression problems.
Provides core classes for working with sequences of
Example
s.Provides infrastructure for applying transformations to a
Dataset
.-
Uses of Example in org.tribuo
Fields in org.tribuo with type parameters of type ExampleMethods in org.tribuo that return ExampleModifier and TypeMethodDescriptionExample.copy()
Returns a deep copy of this Example.static Example<?>
Example.deserialize
(org.tribuo.protos.core.ExampleProto proto) Deserializes an example proto into an example.Dataset.getExample
(int index) Gets the example at the supplied index.Excuse.getExample()
The example being excused.Prediction.getExample()
Returns the example itself.Methods in org.tribuo that return types with arguments of type ExampleModifier and TypeMethodDescriptionDataset.deserializeExamples
(List<org.tribuo.protos.core.ExampleProto> examplesList, Class<?> outputClass, FeatureMap fmap) Deserializes a list of example protos into a list of examples.Dataset.getData()
Gets the examples as an unmodifiable list.Dataset.iterator()
Methods in org.tribuo with parameters of type ExampleModifier and TypeMethodDescriptionprotected void
Adds anExample
to the dataset, which will remove features with unknown names.protected void
Adds aExample
to the dataset, which will insert feature ids, remove unknown features and sort the examples by the feature ids (merging duplicate ids).void
Adds an example to the dataset, which observes the output and each feature value.Generates an excuse for an example.abstract Prediction<T>
Uses the model to predict the output for a single example.Method parameters in org.tribuo with type arguments of type ExampleModifier and TypeMethodDescriptionvoid
MutableDataset.addAll
(Collection<? extends Example<T>> collection) Adds all the Examples in the supplied collection to this dataset.Model.getExcuses
(Iterable<Example<T>> examples) Generates an excuse for each example.protected List<Prediction<T>>
Model.innerPredict
(Iterable<Example<T>> examples) Called by the base implementations ofModel.predict(Iterable)
andModel.predict(Dataset)
.List<Prediction<T>>
Uses the model to predict the output for multiple examples.Constructors in org.tribuo with parameters of type ExampleModifierConstructorDescriptionprotected
Copies the output, weight and metadata into this example.Excuse
(Example<T> example, Prediction<T> prediction, Map<String, List<com.oracle.labs.mlrg.olcut.util.Pair<String, Double>>> weights) Constructs an excuse for the prediction of the supplied example, using the feature weights.Prediction
(Prediction<T> other, int numUsed, Example<T> example) Constructs a prediction from the supplied arguments.Prediction
(T output, int numUsed, Example<T> example) Constructs a prediction from the supplied arguments.Prediction
(T output, Map<String, T> outputScores, int numUsed, Example<T> example, boolean probability) Constructs a prediction from the supplied arguments.Constructor parameters in org.tribuo with type arguments of type ExampleModifierConstructorDescriptionImmutableDataset
(Iterable<Example<T>> dataSource, DataProvenance description, OutputFactory<T> outputFactory, FeatureMap featureIDMap, OutputInfo<T> outputIDInfo, boolean dropInvalidExamples) Creates a dataset from a data source.ImmutableDataset
(Iterable<Example<T>> dataSource, DataProvenance description, OutputFactory<T> outputFactory, ImmutableFeatureMap featureIDMap, ImmutableOutputInfo<T> outputIDInfo, boolean dropInvalidExamples) Creates a dataset from a data source.protected
ImmutableDataset
(DataProvenance provenance, OutputFactory<T> factory, String tribuoVersion, ImmutableFeatureMap fmap, ImmutableOutputInfo<T> outputInfo, List<Example<T>> examples, boolean dropInvalidExamples) Deserialization constructor.MutableDataset
(Iterable<Example<T>> dataSource, DataProvenance provenance, OutputFactory<T> outputFactory) Creates a dataset from a data source. -
Uses of Example in org.tribuo.anomaly.example
Methods in org.tribuo.anomaly.example that return ExampleModifier and TypeMethodDescriptionAnomalyDataGenerator.emptyExample()
Generates an example with no features.AnomalyDataGenerator.invalidSparseExample()
Generates an example with the feature ids 1,5,8, which does not intersect with the ids used elsewhere in this class.Methods in org.tribuo.anomaly.example that return types with arguments of type Example -
Uses of Example in org.tribuo.anomaly.liblinear
Methods in org.tribuo.anomaly.liblinear with parameters of type ExampleModifier and TypeMethodDescriptionLibLinearAnomalyModel.innerGetExcuse
(Example<Event> 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. -
Uses of Example in org.tribuo.anomaly.libsvm
Methods in org.tribuo.anomaly.libsvm with parameters of type ExampleModifier and TypeMethodDescription -
Uses of Example in org.tribuo.classification.baseline
Methods in org.tribuo.classification.baseline with parameters of type Example -
Uses of Example in org.tribuo.classification.example
Fields in org.tribuo.classification.example with type parameters of type ExampleMethods in org.tribuo.classification.example that return ExampleModifier and TypeMethodDescriptionLabelledDataGenerator.emptyExample()
Generates an example with no features.LabelledDataGenerator.invalidSparseExample()
Generates an example with the feature ids 1,5,8, which does not intersect with the ids used elsewhere in this class.Methods in org.tribuo.classification.example that return types with arguments of type ExampleModifier and TypeMethodDescriptionCheckerboardDataSource.generate()
ConcentricCirclesDataSource.generate()
DemoLabelDataSource.generate()
Generates the examples using the configured fields.GaussianLabelDataSource.generate()
InterlockingCrescentsDataSource.generate()
NoisyInterlockingCrescentsDataSource.generate()
DemoLabelDataSource.iterator()
-
Uses of Example in org.tribuo.classification.explanations
Methods in org.tribuo.classification.explanations with parameters of type Example -
Uses of Example in org.tribuo.classification.explanations.lime
Methods in org.tribuo.classification.explanations.lime that return ExampleModifier and TypeMethodDescriptionLIMEBase.samplePoint
(Random rng, ImmutableFeatureMap fMap, long numTrainingExamples, SparseVector input) Samples a single example from the supplied feature map and input vector.Methods in org.tribuo.classification.explanations.lime that return types with arguments of type ExampleModifier and TypeMethodDescriptionprotected com.oracle.labs.mlrg.olcut.util.Pair<LIMEExplanation,
List<Example<Regressor>>> LIMEBase.explainWithSamples
(Example<Label> example) protected com.oracle.labs.mlrg.olcut.util.Pair<LIMEExplanation,
List<Example<Regressor>>> LIMEColumnar.explainWithSamples
(Map<String, String> input) LIMEText.sampleData
(String inputText, List<Token> tokens) Samples a new dataset from the input text.Methods in org.tribuo.classification.explanations.lime with parameters of type ExampleModifier and TypeMethodDescriptionprotected com.oracle.labs.mlrg.olcut.util.Pair<LIMEExplanation,
List<Example<Regressor>>> LIMEBase.explainWithSamples
(Example<Label> example) protected SparseModel<Regressor>
Trains the explanation model using the supplied sampled data and the input example.Method parameters in org.tribuo.classification.explanations.lime with type arguments of type ExampleModifier and TypeMethodDescriptionprotected SparseModel<Regressor>
Trains the explanation model using the supplied sampled data and the input example. -
Uses of Example in org.tribuo.classification.liblinear
Methods in org.tribuo.classification.liblinear with parameters of type ExampleModifier and TypeMethodDescriptionLibLinearClassificationModel.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. -
Uses of Example in org.tribuo.classification.libsvm
Methods in org.tribuo.classification.libsvm with parameters of type ExampleModifier and TypeMethodDescription -
Uses of Example in org.tribuo.classification.mnb
Methods in org.tribuo.classification.mnb with parameters of type Example -
Uses of Example in org.tribuo.classification.sgd.fm
Methods in org.tribuo.classification.sgd.fm with parameters of type ExampleModifier and TypeMethodDescription -
Uses of Example in org.tribuo.classification.sgd.kernel
Methods in org.tribuo.classification.sgd.kernel with parameters of type Example -
Uses of Example in org.tribuo.classification.sgd.linear
Methods in org.tribuo.classification.sgd.linear with parameters of type ExampleModifier and TypeMethodDescription -
Uses of Example in org.tribuo.classification.xgboost
Methods in org.tribuo.classification.xgboost with parameters of type ExampleModifier 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) -
Uses of Example in org.tribuo.clustering.example
Methods in org.tribuo.clustering.example that return ExampleModifier and TypeMethodDescriptionClusteringDataGenerator.emptyExample()
Generates an example with no features.ClusteringDataGenerator.invalidSparseExample()
Generates an example with the feature ids 1,5,8, which does not intersect with the ids used elsewhere in this class.Methods in org.tribuo.clustering.example that return types with arguments of type Example -
Uses of Example in org.tribuo.clustering.hdbscan
Methods in org.tribuo.clustering.hdbscan with parameters of type Example -
Uses of Example in org.tribuo.clustering.kmeans
Methods in org.tribuo.clustering.kmeans with parameters of type Example -
Uses of Example in org.tribuo.common.liblinear
Methods in org.tribuo.common.liblinear with parameters of type ExampleModifier and TypeMethodDescriptionstatic <T extends Output<T>>
de.bwaldvogel.liblinear.FeatureNode[]LibLinearTrainer.exampleToNodes
(Example<T> example, ImmutableFeatureMap featureIDMap, List<de.bwaldvogel.liblinear.FeatureNode> features) Converts a TribuoExample
into a liblinearFeatureNode
array, including a bias feature.This call is expensive as it copies out the weight matrix from the LibLinear model.LibLinearModel.innerGetExcuse
(Example<T> e, double[][] featureWeights) The call to getFeatureWeights in the public methods copies the weights array so this inner method exists to save the copy in getExcuses.Method parameters in org.tribuo.common.liblinear with type arguments of type Example -
Uses of Example in org.tribuo.common.libsvm
Methods in org.tribuo.common.libsvm with parameters of type ExampleModifier and TypeMethodDescriptionstatic <T extends Output<T>>
libsvm.svm_node[]LibSVMTrainer.exampleToNodes
(Example<T> example, ImmutableFeatureMap featureIDMap, List<libsvm.svm_node> features) Convert the example into an array of svm_node which represents a sparse feature vector. -
Uses of Example in org.tribuo.common.nearest
Methods in org.tribuo.common.nearest with parameters of type ExampleModifier and TypeMethodDescriptionMethod parameters in org.tribuo.common.nearest with type arguments of type ExampleModifier and TypeMethodDescriptionprotected List<Prediction<T>>
KNNModel.innerPredict
(Iterable<Example<T>> examples) Uses the model to predict the output for multiple examples. -
Uses of Example in org.tribuo.common.sgd
Methods in org.tribuo.common.sgd with parameters of type ExampleModifier and TypeMethodDescriptionFactorization machines don't provide excuses, use an explainer.protected AbstractSGDModel.PredAndActive
AbstractSGDModel.predictSingle
(Example<T> example) Generates the dense vector prediction from the supplied example. -
Uses of Example in org.tribuo.common.tree
Methods in org.tribuo.common.tree with parameters of type Example -
Uses of Example in org.tribuo.common.xgboost
Fields in org.tribuo.common.xgboost declared as ExampleMethods in org.tribuo.common.xgboost with parameters of type ExampleModifier and TypeMethodDescriptionList<Prediction<T>>
XGBoostOutputConverter.convertBatchOutput
(ImmutableOutputInfo<T> info, List<float[][]> probabilities, int[] numValidFeatures, Example<T>[] examples) Converts a list of float arrays from XGBoost Boosters into a TribuoPrediction
.protected static <T extends Output<T>>
XGBoostTrainer.DMatrixTuple<T>XGBoostTrainer.convertExample
(Example<T> example, ImmutableFeatureMap featureMap) Converts an example into a DMatrix.protected static <T extends Output<T>>
XGBoostTrainer.DMatrixTuple<T>XGBoostTrainer.convertExample
(Example<T> example, ImmutableFeatureMap featureMap, Function<T, Float> responseExtractor) Converts an example into a DMatrix.protected Prediction<T>
XGBoostExternalModel.convertOutput
(float[][] output, int numValidFeatures, Example<T> example) XGBoostOutputConverter.convertOutput
(ImmutableOutputInfo<T> info, List<float[]> probabilities, int numValidFeatures, Example<T> example) Converts a list of float arrays from XGBoost Boosters into a TribuoPrediction
.protected static <T extends Output<T>>
longXGBoostTrainer.convertSingleExample
(Example<T> example, ImmutableFeatureMap featureMap, ArrayList<Float> dataList, ArrayList<Integer> indicesList, ArrayList<Long> headersList, long header) Writes out the features from an example into the three suppliedArrayList
s.Method parameters in org.tribuo.common.xgboost with type arguments of type ExampleModifier and TypeMethodDescriptionprotected static <T extends Output<T>>
XGBoostTrainer.DMatrixTuple<T>XGBoostTrainer.convertExamples
(Iterable<Example<T>> examples, ImmutableFeatureMap featureMap) Converts an iterable of examples into a DMatrix.protected static <T extends Output<T>>
XGBoostTrainer.DMatrixTuple<T>XGBoostTrainer.convertExamples
(Iterable<Example<T>> examples, ImmutableFeatureMap featureMap, Function<T, Float> responseExtractor) Converts an iterable of examples into a DMatrix.protected List<Prediction<T>>
XGBoostExternalModel.convertOutput
(float[][] output, int[] numValidFeatures, List<Example<T>> examples) List<Prediction<T>>
Uses the model to predict the label for multiple examples.Constructors in org.tribuo.common.xgboost with parameters of type ExampleModifierConstructorDescriptionprotected
DMatrixTuple
(ml.dmlc.xgboost4j.java.DMatrix data, int[] numValidFeatures, Example<T>[] examples) Constructs a tuple containing the data and some Tribuo metadata. -
Uses of Example in org.tribuo.data.columnar
Methods in org.tribuo.data.columnar that return types with arguments of type ExampleModifier and TypeMethodDescriptionRowProcessor.generateExample
(long idx, Map<String, String> row, boolean outputRequired) Generate anExample
from the supplied row.RowProcessor.generateExample
(Map<String, String> row, boolean outputRequired) Generate anExample
from the supplied row.RowProcessor.generateExample
(ColumnarIterator.Row row, boolean outputRequired) Generate anExample
from the supplied row.ColumnarDataSource.iterator()
-
Uses of Example in org.tribuo.data.text
Fields in org.tribuo.data.text with type parameters of type ExampleMethods in org.tribuo.data.text that return ExampleModifier and TypeMethodDescriptionExtracts an example from the supplied input text and output object.Methods in org.tribuo.data.text that return types with arguments of type Example -
Uses of Example in org.tribuo.data.text.impl
Methods in org.tribuo.data.text.impl that return ExampleModifier and TypeMethodDescriptionMethods in org.tribuo.data.text.impl that return types with arguments of type Example -
Uses of Example in org.tribuo.dataset
Methods in org.tribuo.dataset that return ExampleMethods in org.tribuo.dataset that return types with arguments of type ExampleMethod parameters in org.tribuo.dataset with type arguments of type ExampleModifier and TypeMethodDescriptionstatic <T extends Output<T>>
DatasetView<T>DatasetView.createView
(Dataset<T> dataset, Predicate<Example<T>> predicate, String tag) Creates a view from the supplied dataset, using the specified predicate to test if each example should be in this view. -
Uses of Example in org.tribuo.datasource
Methods in org.tribuo.datasource that return types with arguments of type ExampleModifier and TypeMethodDescriptionAggregateConfigurableDataSource.iterator()
AggregateDataSource.iterator()
IDXDataSource.iterator()
LibSVMDataSource.iterator()
ListDataSource.iterator()
Constructor parameters in org.tribuo.datasource with type arguments of type ExampleModifierConstructorDescriptionListDataSource
(List<Example<T>> list, OutputFactory<T> factory, DataSourceProvenance provenance) Constructs an in-memory data source wrapping the supplied examples. -
Uses of Example in org.tribuo.ensemble
Methods in org.tribuo.ensemble with parameters of type ExampleModifier and TypeMethodDescriptionConstructors in org.tribuo.ensemble with parameters of type ExampleModifierConstructorDescriptionEnsembleExcuse
(Example<T> example, Prediction<T> prediction, Map<String, List<com.oracle.labs.mlrg.olcut.util.Pair<String, Double>>> weights, List<Excuse<T>> innerExcuses) Constructs an ensemble excuse, comprising the excuses from each ensemble member, along with the feature weights. -
Uses of Example in org.tribuo.evaluation
Methods in org.tribuo.evaluation with parameters of type ExampleModifier and TypeMethodDescriptionOnlineEvaluator.predictAndObserve
(Example<T> example) Feeds the example to the model, records the prediction and returns it.Method parameters in org.tribuo.evaluation with type arguments of type ExampleModifier and TypeMethodDescriptionList<Prediction<T>>
OnlineEvaluator.predictAndObserve
(Iterable<Example<T>> examples) Feeds the examples to the model, records the predictions and returns them. -
Uses of Example in org.tribuo.impl
Subclasses of Example in org.tribuo.implModifier and TypeClassDescriptionclass
ArrayExample<T extends Output<T>>
AnExample
backed by two arrays, one of String and one of double.final class
BinaryFeaturesExample<T extends Output<T>>
AnExample
backed by a single array of feature names.class
IndexedArrayExample<T extends Output<T>>
A version of ArrayExample which also has the id numbers.class
ListExample<T extends Output<T>>
This class will not be performant until value types are available in Java.Constructors in org.tribuo.impl with parameters of type ExampleModifierConstructorDescriptionArrayExample
(Example<T> other) Copy constructor.ArrayExample
(T output, Example<U> other, float weight) Clones an example's features, but uses the supplied output and weight.BinaryFeaturesExample
(Example<T> other) Copy constructor.BinaryFeaturesExample
(T output, Example<U> other, float weight) Clones an example's features, but uses the supplied output and weight.IndexedArrayExample
(Example<T> other, ImmutableFeatureMap featureMap, ImmutableOutputInfo<T> outputMap) This constructor removes unknown features.ListExample
(Example<T> other) Copies the supplied example's features, weight, output and metadata into this example. -
Uses of Example in org.tribuo.interop
Methods in org.tribuo.interop with parameters of type ExampleModifier and TypeMethodDescriptionprotected abstract Prediction<T>
ExternalModel.convertOutput
(V output, int numValidFeatures, Example<T> example) Converts the output of the external model into aPrediction
.By default third party models don't return excuses.Method parameters in org.tribuo.interop with type arguments of type ExampleModifier and TypeMethodDescriptionprotected abstract List<Prediction<T>>
ExternalModel.convertOutput
(V output, int[] numValidFeatures, List<Example<T>> examples) Converts the output of the external model into a list ofPrediction
s.protected List<Prediction<T>>
ExternalModel.innerPredict
(Iterable<Example<T>> examples) -
Uses of Example in org.tribuo.interop.oci
Methods in org.tribuo.interop.oci with parameters of type ExampleModifier and TypeMethodDescriptionOCILabelConverter.convertOutput
(DenseVector scores, int numValidFeature, Example<Label> example, ImmutableOutputInfo<Label> outputIDInfo) protected Prediction<T>
OCIModel.convertOutput
(DenseMatrix scores, int numValidFeature, Example<T> example) OCIMultiLabelConverter.convertOutput
(DenseVector scores, int numValidFeature, Example<MultiLabel> example, ImmutableOutputInfo<MultiLabel> outputIDInfo) OCIOutputConverter.convertOutput
(DenseVector scores, int numValidFeature, Example<T> example, ImmutableOutputInfo<T> outputIDInfo) Converts a dense vector into a single prediction of the appropriate type.OCIRegressorConverter.convertOutput
(DenseVector scores, int numValidFeature, Example<Regressor> example, ImmutableOutputInfo<Regressor> outputIDInfo) Method parameters in org.tribuo.interop.oci with type arguments of type ExampleModifier and TypeMethodDescriptionOCILabelConverter.convertOutput
(DenseMatrix scores, int[] numValidFeatures, List<Example<Label>> examples, ImmutableOutputInfo<Label> outputIDInfo) protected List<Prediction<T>>
OCIModel.convertOutput
(DenseMatrix scores, int[] numValidFeatures, List<Example<T>> list) OCIMultiLabelConverter.convertOutput
(DenseMatrix scores, int[] numValidFeatures, List<Example<MultiLabel>> examples, ImmutableOutputInfo<MultiLabel> outputIDInfo) List<Prediction<T>>
OCIOutputConverter.convertOutput
(DenseMatrix scores, int[] numValidFeatures, List<Example<T>> examples, ImmutableOutputInfo<T> outputIDInfo) Converts a dense matrix into a list of predictions of the appropriate type.OCIRegressorConverter.convertOutput
(DenseMatrix scores, int[] numValidFeatures, List<Example<Regressor>> examples, ImmutableOutputInfo<Regressor> outputIDInfo) -
Uses of Example in org.tribuo.interop.onnx
Methods in org.tribuo.interop.onnx with parameters of type ExampleModifier and TypeMethodDescriptionprotected Prediction<T>
ONNXExternalModel.convertOutput
(List<ai.onnxruntime.OnnxValue> output, int numValidFeatures, Example<T> example) Converts a tensor into a prediction.LabelTransformer.transformToPrediction
(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Label> outputIDInfo, int numValidFeatures, Example<Label> example) MultiLabelTransformer.transformToPrediction
(List<ai.onnxruntime.OnnxValue> value, ImmutableOutputInfo<MultiLabel> outputIDInfo, int numValidFeatures, Example<MultiLabel> example) OutputTransformer.transformToPrediction
(List<ai.onnxruntime.OnnxValue> value, ImmutableOutputInfo<T> outputIDInfo, int numValidFeatures, Example<T> example) Converts aOnnxValue
into aPrediction
.RegressorTransformer.transformToPrediction
(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Regressor> outputIDInfo, int numValidFeatures, Example<Regressor> example) -
Uses of Example in org.tribuo.interop.onnx.extractors
Methods in org.tribuo.interop.onnx.extractors that return ExampleModifier and TypeMethodDescriptionTokenizes the input using the loaded tokenizer, truncates the token list if it's longer thanmaxLength
- 2 (to account for [CLS] and [SEP] tokens), and then passes the token list toBERTFeatureExtractor.extractExample(java.util.List<java.lang.String>)
.BERTFeatureExtractor.extractExample
(List<String> tokens) Passes the tokens through BERT, replacing any unknown tokens with the [UNK] token.BERTFeatureExtractor.extractExample
(List<String> tokens, T output) Passes the tokens through BERT, replacing any unknown tokens with the [UNK] token. -
Uses of Example in org.tribuo.interop.tensorflow
Methods in org.tribuo.interop.tensorflow with parameters of type ExampleModifier and TypeMethodDescriptionDenseFeatureConverter.convert
(Example<?> example, ImmutableFeatureMap featureIDMap) FeatureConverter.convert
(Example<?> example, ImmutableFeatureMap featureIDMap) ImageConverter.convert
(Example<?> example, ImmutableFeatureMap featureIDMap) Transform implicitly pads unseen values with zero.protected Prediction<T>
TensorFlowFrozenExternalModel.convertOutput
(org.tensorflow.Tensor output, int numValidFeatures, Example<T> example) Converts a tensor into a prediction.protected Prediction<T>
TensorFlowSavedModelExternalModel.convertOutput
(TensorMap output, int numValidFeatures, Example<T> example) Converts a tensor into a prediction.LabelConverter.convertToPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<Label> outputIDInfo, int numValidFeatures, Example<Label> example) MultiLabelConverter.convertToPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<MultiLabel> outputIDInfo, int numValidFeatures, Example<MultiLabel> example) OutputConverter.convertToPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<T> outputIDInfo, int numValidFeatures, Example<T> example) Converts aTensor
into aPrediction
.RegressorConverter.convertToPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<Regressor> outputIDInfo, int numValidFeatures, Example<Regressor> example) Deep learning models don't do excuses.Method parameters in org.tribuo.interop.tensorflow with type arguments of type ExampleModifier and TypeMethodDescriptionDenseFeatureConverter.convert
(List<? extends Example<?>> examples, ImmutableFeatureMap featureIDMap) FeatureConverter.convert
(List<? extends Example<?>> example, ImmutableFeatureMap featureIDMap) ImageConverter.convert
(List<? extends Example<?>> examples, ImmutableFeatureMap featureIDMap) Transform implicitly pads unseen values with zero.protected List<Prediction<T>>
TensorFlowFrozenExternalModel.convertOutput
(org.tensorflow.Tensor output, int[] numValidFeatures, List<Example<T>> examples) Converts a tensor into a prediction.protected List<Prediction<T>>
TensorFlowSavedModelExternalModel.convertOutput
(TensorMap output, int[] numValidFeatures, List<Example<T>> examples) Converts a tensor into a prediction.LabelConverter.convertToBatchPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<Label> outputIDInfo, int[] numValidFeatures, List<Example<Label>> examples) MultiLabelConverter.convertToBatchPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<MultiLabel> outputIDInfo, int[] numValidFeatures, List<Example<MultiLabel>> examples) List<Prediction<T>>
OutputConverter.convertToBatchPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<T> outputIDInfo, int[] numValidFeatures, List<Example<T>> examples) Converts aTensor
containing multiple outputs into a list ofPrediction
s.RegressorConverter.convertToBatchPrediction
(org.tensorflow.Tensor tensor, ImmutableOutputInfo<Regressor> outputIDInfo, int[] numValidFeatures, List<Example<Regressor>> examples) org.tensorflow.Tensor
LabelConverter.convertToTensor
(List<Example<Label>> examples, ImmutableOutputInfo<Label> outputIDInfo) org.tensorflow.Tensor
MultiLabelConverter.convertToTensor
(List<Example<MultiLabel>> examples, ImmutableOutputInfo<MultiLabel> outputIDInfo) org.tensorflow.Tensor
OutputConverter.convertToTensor
(List<Example<T>> examples, ImmutableOutputInfo<T> outputIDInfo) Converts a list ofExample
into aTensor
representing all the outputs in the list.org.tensorflow.Tensor
RegressorConverter.convertToTensor
(List<Example<Regressor>> examples, ImmutableOutputInfo<Regressor> outputIDInfo) protected List<Prediction<T>>
TensorFlowModel.innerPredict
(Iterable<Example<T>> examples) -
Uses of Example in org.tribuo.math.la
Methods in org.tribuo.math.la with parameters of type ExampleModifier and TypeMethodDescriptionstatic <T extends Output<T>>
DenseVectorDenseVector.createDenseVector
(Example<T> example, ImmutableFeatureMap featureInfo, boolean addBias) Builds aDenseVector
from anExample
.static <T extends Output<T>>
SparseVectorSparseVector.createSparseVector
(Example<T> example, ImmutableFeatureMap featureInfo, boolean addBias) Builds aSparseVector
from anExample
. -
Uses of Example in org.tribuo.multilabel.baseline
Methods in org.tribuo.multilabel.baseline with parameters of type ExampleModifier and TypeMethodDescriptionClassifierChainModel.getExcuse
(Example<MultiLabel> example) IndependentMultiLabelModel.getExcuse
(Example<MultiLabel> example) ClassifierChainModel.predict
(Example<MultiLabel> example) IndependentMultiLabelModel.predict
(Example<MultiLabel> example) -
Uses of Example in org.tribuo.multilabel.example
Methods in org.tribuo.multilabel.example that return ExampleModifier and TypeMethodDescriptionstatic Example<MultiLabel>
MultiLabelDataGenerator.emptyExample()
Generates an example with no features.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.Methods in org.tribuo.multilabel.example that return types with arguments of type Example -
Uses of Example in org.tribuo.multilabel.sgd.fm
Methods in org.tribuo.multilabel.sgd.fm with parameters of type Example -
Uses of Example in org.tribuo.multilabel.sgd.linear
Methods in org.tribuo.multilabel.sgd.linear with parameters of type Example -
Uses of Example in org.tribuo.regression.baseline
Methods in org.tribuo.regression.baseline with parameters of type Example -
Uses of Example in org.tribuo.regression.example
Methods in org.tribuo.regression.example that return ExampleModifier and TypeMethodDescriptionRegressionDataGenerator.emptyExample()
Generates an example with no features.RegressionDataGenerator.emptyMultiDimExample()
Generates an example with no features.RegressionDataGenerator.invalidMultiDimSparseExample()
Generates an example with the feature ids 1,5,8, which does not intersect with the ids used elsewhere in this class.RegressionDataGenerator.invalidSparseExample()
Generates an example with the feature ids 1,5,8, which does not intersect with the ids used elsewhere in this class.Methods in org.tribuo.regression.example that return types with arguments of type Example -
Uses of Example in org.tribuo.regression.impl
Methods in org.tribuo.regression.impl with parameters of type ExampleModifier and TypeMethodDescriptionprotected SparseVector
SkeletalIndependentRegressionModel.createFeatures
(Example<Regressor> example) Creates the feature vector.protected SparseVector
SkeletalIndependentRegressionSparseModel.createFeatures
(Example<Regressor> example) Creates the feature vector. -
Uses of Example in org.tribuo.regression.liblinear
Methods in org.tribuo.regression.liblinear with parameters of type ExampleModifier and TypeMethodDescriptionLibLinearRegressionModel.innerGetExcuse
(Example<Regressor> 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. -
Uses of Example in org.tribuo.regression.libsvm
Methods in org.tribuo.regression.libsvm with parameters of type ExampleModifier and TypeMethodDescription -
Uses of Example in org.tribuo.regression.rtree
Methods in org.tribuo.regression.rtree with parameters of type Example -
Uses of Example in org.tribuo.regression.sgd.fm
Methods in org.tribuo.regression.sgd.fm with parameters of type ExampleModifier and TypeMethodDescription -
Uses of Example in org.tribuo.regression.sgd.linear
Methods in org.tribuo.regression.sgd.linear with parameters of type ExampleModifier and TypeMethodDescription -
Uses of Example in org.tribuo.regression.slm
Methods in org.tribuo.regression.slm with parameters of type ExampleModifier and TypeMethodDescriptionprotected SparseVector
SparseLinearModel.createFeatures
(Example<Regressor> example) Creates the feature vector. -
Uses of Example in org.tribuo.regression.xgboost
Methods in org.tribuo.regression.xgboost with parameters of type ExampleModifier and TypeMethodDescriptionXGBoostRegressionConverter.convertBatchOutput
(ImmutableOutputInfo<Regressor> info, List<float[][]> probabilities, int[] numValidFeatures, Example<Regressor>[] examples) XGBoostRegressionConverter.convertOutput
(ImmutableOutputInfo<Regressor> info, List<float[]> probabilities, int numValidFeatures, Example<Regressor> example) -
Uses of Example in org.tribuo.sequence
Methods in org.tribuo.sequence that return ExampleModifier and TypeMethodDescriptionSequenceExample.get
(int i) Gets the example found at the specified index.Methods in org.tribuo.sequence that return types with arguments of type ExampleMethods in org.tribuo.sequence with parameters of type ExampleModifier and TypeMethodDescriptionvoid
SequenceExample.addExample
(Example<T> e) Adds anExample
to this sequence.Constructor parameters in org.tribuo.sequence with type arguments of type ExampleModifierConstructorDescriptionSequenceExample
(List<Example<T>> examples) Creates a sequence example from the list of examples.SequenceExample
(List<Example<T>> examples, float weight) Creates a sequence example from the list of examples, setting the weight. -
Uses of Example in org.tribuo.transform
Methods in org.tribuo.transform that return ExampleModifier and TypeMethodDescriptionTransformerMap.transformExample
(Example<T> example) Copies the supplied example and applies the transformers to it.TransformerMap.transformExample
(Example<T> example, List<String> featureNames) Copies the supplied example and applies the transformers to it.Methods in org.tribuo.transform with parameters of type ExampleModifier and TypeMethodDescriptionTransformerMap.transformExample
(Example<T> example) Copies the supplied example and applies the transformers to it.TransformerMap.transformExample
(Example<T> example, List<String> featureNames) Copies the supplied example and applies the transformers to it.