Uses of Class
org.tribuo.math.la.SparseVector
Packages that use SparseVector
Package
Description
Provides an implementation of LIME (Locally Interpretable Model Explanations).
Provides infrastructure for Stochastic Gradient Descent for classification problems.
Provides an implementation of a linear chain CRF trained using 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.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 an interface to TensorFlow, allowing the training of non-sequential models using any supported
Tribuo output type.
Provides a
Kernel
interface for Mercer kernels, along with implementations of standard kernels.Provides a linear algebra system used for numerical operations in Tribuo.
Provides math related util classes.
Provides classes and infrastructure for working with multi-label classification problems.
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 infrastructure for Stochastic Gradient Descent based regression models.
Provides implementations of sparse linear regression using various forms of regularisation penalty.
-
Uses of SparseVector in org.tribuo.classification.explanations.lime
Methods in org.tribuo.classification.explanations.lime with parameters of type SparseVectorModifier and TypeMethodDescriptionstatic double
LIMEBase.measureDistance
(ImmutableFeatureMap fMap, long numTrainingExamples, SparseVector input, SparseVector sample) Measures the distance between an input point and a sampled point.LIMEBase.samplePoint
(Random rng, ImmutableFeatureMap fMap, long numTrainingExamples, SparseVector input) Samples a single example from the supplied feature map and input vector. -
Uses of SparseVector in org.tribuo.classification.sgd
Fields in org.tribuo.classification.sgd declared as SparseVectorModifier and TypeFieldDescriptionfinal SparseVector[]
Util.ExampleArray.features
The examples encoded as sparse vectors.Methods in org.tribuo.classification.sgd with parameters of type SparseVectorModifier and TypeMethodDescriptionstatic Util.ExampleArray
Util.shuffle
(SparseVector[] features, int[] labels, double[] weights, SplittableRandom rng) Shuffles the features, labels and weights returning a tuple of the shuffled inputs.static void
Util.shuffleInPlace
(SparseVector[] features, int[] labels, double[] weights, int[] indices, SplittableRandom rng) In place shuffle of the features, labels, weights and indices.static void
Util.shuffleInPlace
(SparseVector[] features, int[] labels, double[] weights, SplittableRandom rng) Deprecated.Constructors in org.tribuo.classification.sgd with parameters of type SparseVectorModifierConstructorDescriptionExampleArray
(SparseVector[] features, int[] labels, double[] weights) Constructs an example array. -
Uses of SparseVector in org.tribuo.classification.sgd.crf
Methods in org.tribuo.classification.sgd.crf that return SparseVectorModifier and TypeMethodDescriptionstatic <T extends Output<T>>
SparseVector[]CRFModel.convert
(SequenceExample<T> example, ImmutableFeatureMap featureIDMap) Deprecated.As it's replaced withCRFModel.convertToVector(org.tribuo.sequence.SequenceExample<T>, org.tribuo.ImmutableFeatureMap)
which is more flexible. -
Uses of SparseVector in org.tribuo.common.tree
Methods in org.tribuo.common.tree with parameters of type SparseVectorModifier and TypeMethodDescriptionAbstractTrainingNode.getNextNode
(SparseVector example) LeafNode.getNextNode
(SparseVector e) Node.getNextNode
(SparseVector example) Returns the next node in the tree based on the supplied example, or null if it's a leaf.SplitNode.getNextNode
(SparseVector e) Return the appropriate child node. -
Uses of SparseVector in org.tribuo.common.xgboost
Methods in org.tribuo.common.xgboost with parameters of type SparseVectorModifier and TypeMethodDescriptionprotected ml.dmlc.xgboost4j.java.DMatrix
XGBoostExternalModel.convertFeatures
(SparseVector input) protected static ml.dmlc.xgboost4j.java.DMatrix
XGBoostTrainer.convertSparseVector
(SparseVector vector) Used when predicting with an externally trained XGBoost model.Method parameters in org.tribuo.common.xgboost with type arguments of type SparseVectorModifier and TypeMethodDescriptionprotected ml.dmlc.xgboost4j.java.DMatrix
XGBoostExternalModel.convertFeaturesList
(List<SparseVector> input) protected static ml.dmlc.xgboost4j.java.DMatrix
XGBoostTrainer.convertSparseVectors
(List<SparseVector> vectors) Used when predicting with an externally trained XGBoost model. -
Uses of SparseVector in org.tribuo.interop
Methods in org.tribuo.interop with parameters of type SparseVectorModifier and TypeMethodDescriptionprotected abstract U
ExternalModel.convertFeatures
(SparseVector input) Converts from a SparseVector using the external model's indices into the ingestion format for the external model.Method parameters in org.tribuo.interop with type arguments of type SparseVectorModifier and TypeMethodDescriptionprotected abstract U
ExternalModel.convertFeaturesList
(List<SparseVector> input) Converts from a list of SparseVector using the external model's indices into the ingestion format for the external model. -
Uses of SparseVector in org.tribuo.interop.oci
Methods in org.tribuo.interop.oci with parameters of type SparseVectorModifier and TypeMethodDescriptionprotected DenseMatrix
OCIModel.convertFeatures
(SparseVector sparseVector) Method parameters in org.tribuo.interop.oci with type arguments of type SparseVectorModifier and TypeMethodDescriptionprotected DenseMatrix
OCIModel.convertFeaturesList
(List<SparseVector> list) -
Uses of SparseVector in org.tribuo.interop.onnx
Methods in org.tribuo.interop.onnx with parameters of type SparseVectorModifier and TypeMethodDescriptionprotected ai.onnxruntime.OnnxTensor
ONNXExternalModel.convertFeatures
(SparseVector input) ai.onnxruntime.OnnxTensor
DenseTransformer.transform
(ai.onnxruntime.OrtEnvironment env, SparseVector vector) ai.onnxruntime.OnnxTensor
ExampleTransformer.transform
(ai.onnxruntime.OrtEnvironment env, SparseVector vector) Converts aSparseVector
representing the features into aOnnxTensor
.ai.onnxruntime.OnnxTensor
ImageTransformer.transform
(ai.onnxruntime.OrtEnvironment env, SparseVector vector) Method parameters in org.tribuo.interop.onnx with type arguments of type SparseVectorModifier and TypeMethodDescriptionprotected ai.onnxruntime.OnnxTensor
ONNXExternalModel.convertFeaturesList
(List<SparseVector> input) ai.onnxruntime.OnnxTensor
DenseTransformer.transform
(ai.onnxruntime.OrtEnvironment env, List<SparseVector> vectors) ai.onnxruntime.OnnxTensor
ExampleTransformer.transform
(ai.onnxruntime.OrtEnvironment env, List<SparseVector> vectors) Converts a list ofSparseVector
s representing a batch of features into aOnnxTensor
.ai.onnxruntime.OnnxTensor
ImageTransformer.transform
(ai.onnxruntime.OrtEnvironment env, List<SparseVector> vectors) -
Uses of SparseVector in org.tribuo.interop.tensorflow
Methods in org.tribuo.interop.tensorflow with parameters of type SparseVectorModifier and TypeMethodDescriptionprotected TensorMap
TensorFlowFrozenExternalModel.convertFeatures
(SparseVector input) protected TensorMap
TensorFlowSavedModelExternalModel.convertFeatures
(SparseVector input) Method parameters in org.tribuo.interop.tensorflow with type arguments of type SparseVectorModifier and TypeMethodDescriptionprotected TensorMap
TensorFlowFrozenExternalModel.convertFeaturesList
(List<SparseVector> input) protected TensorMap
TensorFlowSavedModelExternalModel.convertFeaturesList
(List<SparseVector> input) -
Uses of SparseVector in org.tribuo.math.kernel
Methods in org.tribuo.math.kernel with parameters of type SparseVectorModifier and TypeMethodDescriptiondouble
Kernel.similarity
(SparseVector first, SparseVector second) Calculates the similarity between twoSparseVector
s.double
Linear.similarity
(SparseVector a, SparseVector b) double
Polynomial.similarity
(SparseVector a, SparseVector b) double
RBF.similarity
(SparseVector a, SparseVector b) double
Sigmoid.similarity
(SparseVector a, SparseVector b) -
Uses of SparseVector in org.tribuo.math.la
Methods in org.tribuo.math.la that return SparseVectorModifier and TypeMethodDescriptionSparseVector.copy()
static SparseVector
SparseVector.createSparseVector
(int dimension, int[] indices, double[] values) Defensively copies the input, and checks that the indices are sorted.static SparseVector
SparseVector.createSparseVector
(int dimension, Map<Integer, Double> indexMap) Builds a SparseVector from a map.static <T extends Output<T>>
SparseVectorSparseVector.createSparseVector
(Example<T> example, ImmutableFeatureMap featureInfo, boolean addBias) Builds aSparseVector
from anExample
.static SparseVector
SparseVector.deserializeFromProto
(int version, String className, com.google.protobuf.Any message) Deserialization factory.DenseSparseMatrix.getColumn
(int i) Gets a copy of the column.DenseSparseMatrix.getRow
(int i) SparseVector.scale
(double coefficient) DenseVector.sparsify()
Generates aSparseVector
representation from this dense vector, removing all values with absolute value belowVectorTuple.DELTA
.DenseVector.sparsify
(double tolerance) Generates aSparseVector
representation from this dense vector, removing all values with absolute value below the supplied tolerance.static <T extends Output<T>>
SparseVector[]Converts a dataset of row-major examples into an array of column-major sparse vectors.static <T extends Output<T>>
SparseVector[]SparseVector.transpose
(Dataset<T> dataset, ImmutableFeatureMap fMap) Converts a dataset of row-major examples into an array of column-major sparse vectors.static SparseVector[]
SparseVector.transpose
(SparseVector[] input) Transposes an array of sparse vectors from row-major to column-major or vice versa.Methods in org.tribuo.math.la with parameters of type SparseVectorModifier and TypeMethodDescriptionstatic DenseSparseMatrix
DenseSparseMatrix.createFromSparseVectors
(SparseVector[] values) Defensively copies the values.int[]
SparseVector.difference
(SparseVector other) Generates an array of the indices that are active in this vector but are not present inother
.int[]
SparseVector.intersection
(SparseVector other) Generates an array of the indices that are active in both this vector andother
static SparseVector[]
SparseVector.transpose
(SparseVector[] input) Transposes an array of sparse vectors from row-major to column-major or vice versa.Constructor parameters in org.tribuo.math.la with type arguments of type SparseVectorModifierConstructorDescriptionDenseSparseMatrix
(List<SparseVector> values) Constructs a DenseSparseMatrix out of the supplied sparse vector list. -
Uses of SparseVector in org.tribuo.math.util
Methods in org.tribuo.math.util that return SparseVectorModifier and TypeMethodDescriptionstatic SparseVector
HeapMerger.merge
(List<SparseVector> vectors, int dimension, int[] indicesBuffer, double[] valuesBuffer) Merges a list of sparse vectors into a single sparse vector, summing the values.HeapMerger.merge
(SparseVector[] inputs) MatrixHeapMerger.merge
(SparseVector[] inputs) Merger.merge
(SparseVector[] inputs) Merges an array of SparseVector into a single SparseVector.Methods in org.tribuo.math.util with parameters of type SparseVectorModifier and TypeMethodDescriptionHeapMerger.merge
(SparseVector[] inputs) MatrixHeapMerger.merge
(SparseVector[] inputs) Merger.merge
(SparseVector[] inputs) Merges an array of SparseVector into a single SparseVector.Method parameters in org.tribuo.math.util with type arguments of type SparseVectorModifier and TypeMethodDescriptionstatic SparseVector
HeapMerger.merge
(List<SparseVector> vectors, int dimension, int[] indicesBuffer, double[] valuesBuffer) Merges a list of sparse vectors into a single sparse vector, summing the values. -
Uses of SparseVector in org.tribuo.multilabel
Methods in org.tribuo.multilabel that return SparseVectorModifier and TypeMethodDescriptionMultiLabel.convertToSparseVector
(ImmutableOutputInfo<MultiLabel> info) Converts this MultiLabel into a SparseVector using the indices from the output info. -
Uses of SparseVector in org.tribuo.multilabel.sgd.fm
Methods in org.tribuo.multilabel.sgd.fm that return SparseVectorModifier and TypeMethodDescriptionprotected SparseVector
FMMultiLabelTrainer.getTarget
(ImmutableOutputInfo<MultiLabel> outputInfo, MultiLabel output) -
Uses of SparseVector in org.tribuo.multilabel.sgd.linear
Methods in org.tribuo.multilabel.sgd.linear that return SparseVectorModifier and TypeMethodDescriptionprotected SparseVector
LinearSGDTrainer.getTarget
(ImmutableOutputInfo<MultiLabel> outputInfo, MultiLabel output) -
Uses of SparseVector in org.tribuo.regression.impl
Methods in org.tribuo.regression.impl that return SparseVectorModifier and TypeMethodDescriptionprotected SparseVector
SkeletalIndependentRegressionModel.createFeatures
(Example<Regressor> example) Creates the feature vector.protected SparseVector
SkeletalIndependentRegressionSparseModel.createFeatures
(Example<Regressor> example) Creates the feature vector.Methods in org.tribuo.regression.impl with parameters of type SparseVectorModifier and TypeMethodDescriptionprotected abstract Regressor.DimensionTuple
SkeletalIndependentRegressionModel.scoreDimension
(int dimensionIdx, SparseVector features) Makes a prediction for a single dimension.protected abstract Regressor.DimensionTuple
SkeletalIndependentRegressionSparseModel.scoreDimension
(int dimensionIdx, SparseVector features) Makes a prediction for a single dimension.protected abstract T
SkeletalIndependentRegressionSparseTrainer.trainDimension
(double[] outputs, SparseVector[] features, float[] weights, SplittableRandom rng) Trains a single dimension of the possibly multiple dimensions.protected abstract T
SkeletalIndependentRegressionTrainer.trainDimension
(double[] outputs, SparseVector[] features, float[] weights, SplittableRandom rng) Trains a single dimension of the possibly multiple dimensions. -
Uses of SparseVector in org.tribuo.regression.sgd
Methods in org.tribuo.regression.sgd with parameters of type SparseVectorModifier and TypeMethodDescriptionstatic void
Util.shuffleInPlace
(SparseVector[] features, DenseVector[] regressors, double[] weights, int[] indices, SplittableRandom rng) In place shuffle of the features, labels and weights.static void
Util.shuffleInPlace
(SparseVector[] features, DenseVector[] regressors, double[] weights, SplittableRandom rng) In place shuffle of the features, labels and weights. -
Uses of SparseVector in org.tribuo.regression.slm
Methods in org.tribuo.regression.slm that return SparseVectorModifier and TypeMethodDescriptionprotected SparseVector
SparseLinearModel.createFeatures
(Example<Regressor> example) Creates the feature vector.Methods in org.tribuo.regression.slm that return types with arguments of type SparseVectorModifier and TypeMethodDescriptionSparseLinearModel.getWeights()
Gets a copy of the model parameters.Methods in org.tribuo.regression.slm with parameters of type SparseVectorModifier and TypeMethodDescriptionprotected Regressor.DimensionTuple
SparseLinearModel.scoreDimension
(int dimensionIdx, SparseVector features)
AbstractSGDTrainer.shuffleInPlace(org.tribuo.math.la.SGDVector[], T[], double[], java.util.SplittableRandom)
.