Uses of Class
org.tribuo.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
Modifier 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.Modifier 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()
Modifier 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.Modifier 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.ModifierConstructorDescriptionprotected
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.ModifierConstructorDescriptionImmutableDataset
(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
Modifier 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. -
Uses of Example in org.tribuo.anomaly.liblinear
Modifier 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
Modifier and TypeMethodDescription -
Uses of Example in org.tribuo.classification.baseline
-
Uses of Example in org.tribuo.classification.example
Modifier 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.Modifier 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
-
Uses of Example in org.tribuo.classification.explanations.lime
Modifier and TypeMethodDescriptionLIMEBase.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) 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.Modifier 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.Modifier 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
Modifier 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
Modifier and TypeMethodDescription -
Uses of Example in org.tribuo.classification.mnb
-
Uses of Example in org.tribuo.classification.sgd.fm
Modifier and TypeMethodDescription -
Uses of Example in org.tribuo.classification.sgd.kernel
-
Uses of Example in org.tribuo.classification.sgd.linear
Modifier and TypeMethodDescription -
Uses of Example 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) -
Uses of Example in org.tribuo.clustering.example
Modifier 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. -
Uses of Example in org.tribuo.clustering.hdbscan
-
Uses of Example in org.tribuo.clustering.kmeans
-
Uses of Example in org.tribuo.common.liblinear
Modifier 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. -
Uses of Example in org.tribuo.common.libsvm
Modifier 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
Modifier and TypeMethodDescriptionModifier 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
Modifier 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
-
Uses of Example in org.tribuo.common.xgboost
Modifier 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.Modifier 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.ModifierConstructorDescriptionprotected
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
Modifier 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
Modifier and TypeMethodDescriptionExtracts an example from the supplied input text and output object. -
Uses of Example in org.tribuo.data.text.impl
Modifier and TypeMethodDescription -
Uses of Example in org.tribuo.dataset
Modifier 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
Modifier and TypeMethodDescriptionAggregateConfigurableDataSource.iterator()
AggregateDataSource.iterator()
IDXDataSource.iterator()
LibSVMDataSource.iterator()
ListDataSource.iterator()
ModifierConstructorDescriptionListDataSource
(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
Modifier and TypeMethodDescriptionModifierConstructorDescriptionEnsembleExcuse
(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
Modifier and TypeMethodDescriptionOnlineEvaluator.predictAndObserve
(Example<T> example) Feeds the example to the model, records the prediction and returns it.Modifier 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
Modifier 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.ModifierConstructorDescriptionArrayExample
(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
Modifier 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.Modifier 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
Modifier 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) Modifier 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
Modifier 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
Modifier 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
Modifier 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.Modifier 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
Modifier 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
Modifier 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
Modifier 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. -
Uses of Example in org.tribuo.multilabel.sgd.fm
-
Uses of Example in org.tribuo.multilabel.sgd.linear
-
Uses of Example in org.tribuo.regression.baseline
-
Uses of Example in org.tribuo.regression.example
Modifier 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. -
Uses of Example in org.tribuo.regression.impl
Modifier 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
Modifier 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
Modifier and TypeMethodDescription -
Uses of Example in org.tribuo.regression.rtree
-
Uses of Example in org.tribuo.regression.sgd.fm
Modifier and TypeMethodDescription -
Uses of Example in org.tribuo.regression.sgd.linear
Modifier and TypeMethodDescription -
Uses of Example in org.tribuo.regression.slm
Modifier and TypeMethodDescriptionprotected SparseVector
SparseLinearModel.createFeatures
(Example<Regressor> example) Creates the feature vector. -
Uses of Example in org.tribuo.regression.xgboost
Modifier 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
Modifier and TypeMethodDescriptionSequenceExample.get
(int i) Gets the example found at the specified index.Modifier and TypeMethodDescriptionvoid
SequenceExample.addExample
(Example<T> e) Adds anExample
to this sequence.ModifierConstructorDescriptionSequenceExample
(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
Modifier 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.Modifier 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.