Uses of Class
org.tribuo.Model
Packages that use Model
Package
Description
Provides the core interfaces and classes for using Tribuo.
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.
This package contains the infrastructure classes for building evaluation metrics.
Provides the base interface and implementations of the
Model hashing
which obscures the feature names stored in a model.Provides infrastructure for applying transformations to a
Dataset.-
Uses of Model in org.tribuo
Classes in org.tribuo with type parameters of type ModelModifier and TypeInterfaceDescriptioninterfaceIncrementalTrainer<T extends Output<T>, U extends Model<T>>An interface for incremental training ofModels.Subclasses of Model in org.tribuoModifier and TypeClassDescriptionclassSparseModel<T extends Output<T>>A model which uses a subset of the features it knows about to make predictions.Methods in org.tribuo that return ModelModifier and TypeMethodDescriptionCasts the model to the specified output type, assuming it is valid.Model.copy()Copies a model, returning a deep copy of any mutable state, and a shallow copy otherwise.Model.copy(String newName, ModelProvenance newProvenance) Copies a model, replacing its provenance and name with the supplied values.static Model<?> Model.deserialize(org.tribuo.protos.core.ModelProto proto) Deserializes the model from the supplied protobuf.static Model<?> Model.deserializeFromFile(Path path) Reads an instance ofModelProtofrom the supplied path and deserializes it.static Model<?> Model.deserializeFromStream(InputStream is) Reads an instance ofModelProtofrom the supplied input stream and deserializes it.Trains a predictive model using the examples in the given data set.Trainer.train(Dataset<T> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) Trains a predictive model using the examples in the given data set.Trainer.train(Dataset<T> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance, int invocationCount) Trains a predictive model using the examples in the given data set.Constructors in org.tribuo with parameters of type ModelModifierConstructorDescriptionImmutableDataset(DataSource<T> dataSource, Model<T> model, boolean dropInvalidExamples) Creates a dataset from a data source. -
Uses of Model in org.tribuo.ensemble
Subclasses of Model in org.tribuo.ensembleModifier and TypeClassDescriptionclassEnsembleModel<T extends Output<T>>A model which contains a list of otherModels.final classWeightedEnsembleModel<T extends Output<T>>An ensemble model that uses weights to combine the ensemble member predictions.Fields in org.tribuo.ensemble with type parameters of type ModelMethods in org.tribuo.ensemble that return ModelModifier and TypeMethodDescriptionEnsembleModel.copy(String name, ModelProvenance newProvenance) BaggingTrainer.trainSingleModel(Dataset<T> examples, ImmutableFeatureMap featureIDs, ImmutableOutputInfo<T> labelIDs, int randInt, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance, int invocationCount) Trains a single model.Methods in org.tribuo.ensemble that return types with arguments of type ModelModifier and TypeMethodDescriptionEnsembleModel.getModels()Returns an unmodifiable view on the ensemble members.Method parameters in org.tribuo.ensemble with type arguments of type ModelModifier and TypeMethodDescriptionprotected abstract EnsembleModel<T> Copies this ensemble model.protected EnsembleModel<T> WeightedEnsembleModel.copy(String name, EnsembleModelProvenance newProvenance, List<Model<T>> newModels) static <T extends Output<T>>
WeightedEnsembleModel<T> WeightedEnsembleModel.createEnsembleFromExistingModels(String name, List<Model<T>> models, EnsembleCombiner<T> combiner) Creates an ensemble from existing models.static <T extends Output<T>>
WeightedEnsembleModel<T> WeightedEnsembleModel.createEnsembleFromExistingModels(String name, List<Model<T>> models, EnsembleCombiner<T> combiner, float[] weights) Creates an ensemble from existing models.Constructor parameters in org.tribuo.ensemble with type arguments of type ModelModifierConstructorDescriptionprotectedEnsembleModel(String name, EnsembleModelProvenance provenance, ImmutableFeatureMap featureIDMap, ImmutableOutputInfo<T> outputIDInfo, List<Model<T>> newModels) Builds an EnsembleModel from the supplied model list.WeightedEnsembleModel(String name, EnsembleModelProvenance provenance, ImmutableFeatureMap featureIDMap, ImmutableOutputInfo<T> outputIDInfo, List<Model<T>> newModels, EnsembleCombiner<T> combiner) Unless you are implementing aTraineryou should not use this constructor directly.WeightedEnsembleModel(String name, EnsembleModelProvenance provenance, ImmutableFeatureMap featureIDMap, ImmutableOutputInfo<T> outputIDInfo, List<Model<T>> newModels, EnsembleCombiner<T> combiner, float[] weights) Unless you are implementing aTraineryou should not use this constructor directly. -
Uses of Model in org.tribuo.evaluation
Methods in org.tribuo.evaluation that return types with arguments of type ModelModifier and TypeMethodDescriptionCrossValidation.evaluate()Performs k fold cross validation, returning the k evaluations.Methods in org.tribuo.evaluation with parameters of type ModelModifier and TypeMethodDescriptionstatic <T extends Output<T>, C extends MetricContext<T>>
com.oracle.labs.mlrg.olcut.util.Pair<Integer, Double> EvaluationAggregator.argmax(EvaluationMetric<T, C> metric, Model<T> model, List<? extends Dataset<T>> datasets) Calculates the argmax of a metric across the supplied datasets.protected abstract CAbstractEvaluator.createContext(Model<T> model, List<Prediction<T>> predictions) Create the context needed for evaluation.AbstractEvaluator.createMetrics(Model<T> model) Creates the appropriate set of metrics for this model, by querying for it'sOutputInfo.default OnlineEvaluator<T, E> Evaluator.createOnlineEvaluator(Model<T> model, DataProvenance provenance) Creates an online evaluator that maintains a list of all the predictions it has seen and can evaluate them upon request.final EAbstractEvaluator.evaluate(Model<T> model, List<Prediction<T>> predictions, DataProvenance dataProvenance) Produces an evaluation for the supplied model and predictions by aggregating the appropriate statistics.final EProduces an evaluation for the supplied model and dataset, by callingpredict(org.tribuo.Example<T>)to create the predictions, then aggregating the appropriate statistics.final EAbstractEvaluator.evaluate(Model<T> model, DataSource<T> datasource) Produces an evaluation for the supplied model and datasource, by callingpredict(org.tribuo.Example<T>)to create the predictions, then aggregating the appropriate statistics.default EEvaluator.evaluate(Model<T> model, List<Prediction<T>> predictions, List<T> groundTruth, DataProvenance dataProvenance) Evaluates the model performance using the supplied predictions, returning an immutableEvaluationof the appropriate type.Evaluator.evaluate(Model<T> model, List<Prediction<T>> predictions, DataProvenance dataProvenance) Evaluates the model performance using the supplied predictions, returning an immutableEvaluationof the appropriate type.Evaluates the dataset using the supplied model, returning an immutableEvaluationof the appropriate type.Evaluator.evaluate(Model<T> model, DataSource<T> datasource) Evaluates the dataset using the supplied model, returning an immutableEvaluationof the appropriate type.static <T extends Output<T>, C extends MetricContext<T>>
DescriptiveStatsEvaluationAggregator.summarize(List<? extends EvaluationMetric<T, C>> metrics, Model<T> model, List<Prediction<T>> predictions) Summarize model performance on dataset across several metrics.static <T extends Output<T>, C extends MetricContext<T>>
DescriptiveStatsEvaluationAggregator.summarize(List<? extends EvaluationMetric<T, C>> metrics, Model<T> model, Dataset<T> dataset) Summarize model performance on dataset across several metrics.static <T extends Output<T>, R extends Evaluation<T>>
Map<MetricID<T>, DescriptiveStats> EvaluationAggregator.summarize(Evaluator<T, R> evaluator, Model<T> model, List<? extends Dataset<T>> datasets) Summarize performance according to evaluator for a single model across several datasets.static <T extends Output<T>, C extends MetricContext<T>>
DescriptiveStatsEvaluationAggregator.summarize(EvaluationMetric<T, C> metric, Model<T> model, List<? extends Dataset<T>> datasets) Summarize a model's performance w.r.t.Method parameters in org.tribuo.evaluation with type arguments of type ModelModifier and TypeMethodDescriptionstatic <T extends Output<T>, C extends MetricContext<T>>
com.oracle.labs.mlrg.olcut.util.Pair<Integer, Double> EvaluationAggregator.argmax(EvaluationMetric<T, C> metric, List<? extends Model<T>> models, Dataset<T> dataset) Calculates the argmax of a metric across the supplied models (i.e., the index of the model which performed the best).static <T extends Output<T>, R extends Evaluation<T>>
Map<MetricID<T>, DescriptiveStats> EvaluationAggregator.summarize(Evaluator<T, R> evaluator, List<? extends Model<T>> models, Dataset<T> dataset) Summarize performance using the supplied evaluator across several models on one dataset.static <T extends Output<T>, C extends MetricContext<T>>
DescriptiveStatsEvaluationAggregator.summarize(EvaluationMetric<T, C> metric, List<? extends Model<T>> models, Dataset<T> dataset) Summarize performance w.r.t.static <T extends Output<T>, R extends Evaluation<T>>
Map<MetricID<T>, DescriptiveStats> EvaluationAggregator.summarizeCrossValidation(List<com.oracle.labs.mlrg.olcut.util.Pair<R, Model<T>>> evaluations) Summarize all fields of a list of evaluations produced byCrossValidation.Constructors in org.tribuo.evaluation with parameters of type ModelModifierConstructorDescriptionOnlineEvaluator(Evaluator<T, E> evaluator, Model<T> model, DataProvenance provenance) Constructs anOnlineEvaluatorwhich accumulates predictions. -
Uses of Model in org.tribuo.evaluation.metrics
Methods in org.tribuo.evaluation.metrics that return ModelMethods in org.tribuo.evaluation.metrics with parameters of type ModelModifier and TypeMethodDescriptionEvaluationMetric.createContext(Model<T> model, List<Prediction<T>> predictions) Creates the context this metric uses to compute it's value.default CEvaluationMetric.createContext(Model<T> model, Dataset<T> dataset) Creates the metric context used to compute this metric's value, generatingPredictions for eachExamplein the supplied dataset.Constructors in org.tribuo.evaluation.metrics with parameters of type ModelModifierConstructorDescriptionprotectedMetricContext(Model<T> model, List<Prediction<T>> predictions) Constructs a metric context. -
Uses of Model in org.tribuo.hash
Methods in org.tribuo.hash that return ModelModifier and TypeMethodDescriptionHashingTrainer.train(Dataset<T> dataset, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance) This clones theDataset, hashes each of the examples and rewrites their feature ids before passing it to the inner trainer.HashingTrainer.train(Dataset<T> dataset, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance, int invocationCount) -
Uses of Model in org.tribuo.transform
Subclasses of Model in org.tribuo.transformModifier and TypeClassDescriptionclassTransformedModel<T extends Output<T>>Wraps aModelwith it'sTransformerMapso allExamples are transformed appropriately before the model makes predictions.Methods in org.tribuo.transform that return ModelModifier and TypeMethodDescriptionTransformedModel.getInnerModel()Gets the inner model to allow access to any class specific methods that model contains (e.g., to examine cluster centroids).