Uses of Class
org.tribuo.Example
Packages that use Example
Package
Description
Provides the core interfaces and classes for using Tribuo.
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.Provides core classes for working with sequences of
Examples.Provides infrastructure for applying transformations to a
Dataset.-
Uses of Example in org.tribuo
Subinterfaces with type arguments of type Example in org.tribuoModifier and TypeInterfaceDescriptioninterfaceDataSource<T extends Output<T>>A interface for things that can be given to a Dataset's constructor.Classes in org.tribuo that implement interfaces with type arguments of type ExampleModifier and TypeClassDescriptionclassA class for sets of data, which are used to train and evaluate classifiers.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 voidAdds anExampleto the dataset, which will remove features with unknown names.protected voidAdds aExampleto the dataset, which will insert feature ids, remove unknown features and sort the examples by the feature ids (merging duplicate ids).voidAdds 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 TypeMethodDescriptionvoidMutableDataset.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 ExampleModifierConstructorDescriptionprotectedCopies 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.protectedImmutableDataset(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.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 TypeClassDescriptionclassArrayExample<T extends Output<T>>AnExamplebacked by two arrays, one of String and one of double.final classBinaryFeaturesExample<T extends Output<T>>AnExamplebacked by a single array of feature names.classIndexedArrayExample<T extends Output<T>>A version of ArrayExample which also has the id numbers.classListExample<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.<U extends Output<U>>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.<U extends Output<U>>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.sequence
Classes in org.tribuo.sequence that implement interfaces with type arguments of type ExampleModifier and TypeClassDescriptionclassSequenceExample<T extends Output<T>>A sequence of examples, used for sequence classification.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 TypeMethodDescriptionvoidSequenceExample.addExample(Example<T> e) Adds anExampleto 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.