Uses of Class
org.tribuo.math.la.SparseVector
Packages that use SparseVector
Package
Description
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.
-
Uses of SparseVector in org.tribuo.math.kernel
Methods 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.la
Methods 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.static SparseVectorSparseVector.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 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 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 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.