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 a multithreaded implementation of K-Means, with a
 configurable distance function.
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.
This package contains a Tribuo wrapper around the 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 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.limeMethods in org.tribuo.classification.explanations.lime with parameters of type SparseVectorModifier and TypeMethodDescriptionstatic doubleLIMEBase.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.sgdFields in org.tribuo.classification.sgd declared as SparseVectorMethods in org.tribuo.classification.sgd with parameters of type SparseVectorModifier and TypeMethodDescriptionstatic Util.ExampleArrayUtil.shuffle(SparseVector[] features, int[] labels, double[] weights, SplittableRandom rng) Shuffles the features, labels and weights returning a tuple of the shuffled inputs.static voidUtil.shuffleInPlace(SparseVector[] features, int[] labels, double[] weights, int[] indices, SplittableRandom rng) In place shuffle of the features, labels, weights and indices.static voidUtil.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) 
- 
Uses of SparseVector in org.tribuo.classification.sgd.crfMethods 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.clustering.kmeansMethods in org.tribuo.clustering.kmeans with parameters of type SparseVectorModifier and TypeMethodDescriptionprotected voidKMeansTrainer.mStep(ForkJoinPool fjp, DenseVector[] centroidVectors, Map<Integer, List<Integer>> clusterAssignments, SparseVector[] data, double[] weights) Runs the mStep, writing to thecentroidVectorsarray.
- 
Uses of SparseVector in org.tribuo.common.treeMethods 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.xgboostMethods in org.tribuo.common.xgboost with parameters of type SparseVectorModifier and TypeMethodDescriptionprotected ml.dmlc.xgboost4j.java.DMatrixXGBoostExternalModel.convertFeatures(SparseVector input) protected static ml.dmlc.xgboost4j.java.DMatrixXGBoostTrainer.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.DMatrixXGBoostExternalModel.convertFeaturesList(List<SparseVector> input) protected static ml.dmlc.xgboost4j.java.DMatrixXGBoostTrainer.convertSparseVectors(List<SparseVector> vectors) Used when predicting with an externally trained XGBoost model.
- 
Uses of SparseVector in org.tribuo.interopMethods in org.tribuo.interop with parameters of type SparseVectorModifier and TypeMethodDescriptionprotected abstract UExternalModel.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 UExternalModel.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.onnxMethods in org.tribuo.interop.onnx with parameters of type SparseVectorModifier and TypeMethodDescriptionprotected ai.onnxruntime.OnnxTensorONNXExternalModel.convertFeatures(SparseVector input) ai.onnxruntime.OnnxTensorDenseTransformer.transform(ai.onnxruntime.OrtEnvironment env, SparseVector vector) ai.onnxruntime.OnnxTensorExampleTransformer.transform(ai.onnxruntime.OrtEnvironment env, SparseVector vector) Converts aSparseVectorrepresenting the features into aOnnxTensor.ai.onnxruntime.OnnxTensorImageTransformer.transform(ai.onnxruntime.OrtEnvironment env, SparseVector vector) Method parameters in org.tribuo.interop.onnx with type arguments of type SparseVectorModifier and TypeMethodDescriptionprotected ai.onnxruntime.OnnxTensorONNXExternalModel.convertFeaturesList(List<SparseVector> input) ai.onnxruntime.OnnxTensorDenseTransformer.transform(ai.onnxruntime.OrtEnvironment env, List<SparseVector> vectors) ai.onnxruntime.OnnxTensorExampleTransformer.transform(ai.onnxruntime.OrtEnvironment env, List<SparseVector> vectors) Converts a list ofSparseVectors representing a batch of features into aOnnxTensor.ai.onnxruntime.OnnxTensorImageTransformer.transform(ai.onnxruntime.OrtEnvironment env, List<SparseVector> vectors) 
- 
Uses of SparseVector in org.tribuo.interop.tensorflowMethods in org.tribuo.interop.tensorflow with parameters of type SparseVectorModifier and TypeMethodDescriptionprotected TensorMapTensorFlowFrozenExternalModel.convertFeatures(SparseVector input) protected TensorMapTensorFlowSavedModelExternalModel.convertFeatures(SparseVector input) Method parameters in org.tribuo.interop.tensorflow with type arguments of type SparseVectorModifier and TypeMethodDescriptionprotected TensorMapTensorFlowFrozenExternalModel.convertFeaturesList(List<SparseVector> input) protected TensorMapTensorFlowSavedModelExternalModel.convertFeaturesList(List<SparseVector> input) 
- 
Uses of SparseVector in org.tribuo.math.kernelMethods in org.tribuo.math.kernel with parameters of type SparseVectorModifier and TypeMethodDescriptiondoubleKernel.similarity(SparseVector first, SparseVector second) Calculates the similarity between twoSparseVectors.doubleLinear.similarity(SparseVector a, SparseVector b) doublePolynomial.similarity(SparseVector a, SparseVector b) doubleRBF.similarity(SparseVector a, SparseVector b) doubleSigmoid.similarity(SparseVector a, SparseVector b) 
- 
Uses of SparseVector in org.tribuo.math.laMethods in org.tribuo.math.la that return SparseVectorModifier and TypeMethodDescriptionSparseVector.copy()static SparseVectorSparseVector.createSparseVector(int dimension, int[] indices, double[] values) Defensively copies the input, and checks that the indices are sorted.static SparseVectorSparseVector.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 aSparseVectorfrom anExample.DenseSparseMatrix.getRow(int i) SparseVector.scale(double coefficient) DenseVector.sparsify()Generates aSparseVectorrepresentation from this dense vector, removing all values with absolute value belowVectorTuple.DELTA.DenseVector.sparsify(double tolerance) Generates aSparseVectorrepresentation 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 DenseSparseMatrixDenseSparseMatrix.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 andotherstatic 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 SparseVector
- 
Uses of SparseVector in org.tribuo.math.utilMethods in org.tribuo.math.util that return SparseVectorModifier and TypeMethodDescriptionstatic SparseVectorHeapMerger.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 SparseVectorHeapMerger.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.multilabelMethods 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.linearMethods in org.tribuo.multilabel.sgd.linear that return SparseVectorModifier and TypeMethodDescriptionprotected SparseVectorLinearSGDTrainer.getTarget(ImmutableOutputInfo<MultiLabel> outputInfo, MultiLabel output) 
- 
Uses of SparseVector in org.tribuo.regression.implMethods in org.tribuo.regression.impl that return SparseVectorModifier and TypeMethodDescriptionprotected SparseVectorSkeletalIndependentRegressionModel.createFeatures(Example<Regressor> example) Creates the feature vector.protected SparseVectorSkeletalIndependentRegressionSparseModel.createFeatures(Example<Regressor> example) Creates the feature vector.Methods in org.tribuo.regression.impl with parameters of type SparseVectorModifier and TypeMethodDescriptionprotected abstract Regressor.DimensionTupleSkeletalIndependentRegressionModel.scoreDimension(int dimensionIdx, SparseVector features) Makes a prediction for a single dimension.protected abstract Regressor.DimensionTupleSkeletalIndependentRegressionSparseModel.scoreDimension(int dimensionIdx, SparseVector features) Makes a prediction for a single dimension.protected abstract TSkeletalIndependentRegressionSparseTrainer.trainDimension(double[] outputs, SparseVector[] features, float[] weights, SplittableRandom rng) Trains a single dimension of the possibly multiple dimensions.protected abstract TSkeletalIndependentRegressionTrainer.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.sgdMethods in org.tribuo.regression.sgd with parameters of type SparseVectorModifier and TypeMethodDescriptionstatic voidUtil.shuffleInPlace(SparseVector[] features, DenseVector[] regressors, double[] weights, int[] indices, SplittableRandom rng) In place shuffle of the features, labels and weights.static voidUtil.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.slmMethods in org.tribuo.regression.slm that return SparseVectorModifier and TypeMethodDescriptionprotected SparseVectorSparseLinearModel.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.DimensionTupleSparseLinearModel.scoreDimension(int dimensionIdx, SparseVector features) 
AbstractSGDTrainer.shuffleInPlace(org.tribuo.math.la.SGDVector[], T[], double[], java.util.SplittableRandom).