Uses of Interface
org.tribuo.math.la.SGDVector
Packages that use SGDVector
Package
Description
Contains the implementation of Tribuo's math library, it's gradient descent optimisers, kernels and a set of
math related utils.
An interface for distance computations between two
SGDVector instances
along with some standard implementations.Provides a linear algebra system used for numerical operations in Tribuo.
Provides nearest neighbour query functionality.
Provides a brute-force nearest neighbour query implementation.
Provides a k-d tree nearest neighbour query implementation.
Utilities for converting Tribuo math objects into ONNX representations.
Provides some utility tensors for use in gradient optimisers.
-
Uses of SGDVector in org.tribuo.math
Methods in org.tribuo.math with parameters of type SGDVectorModifier and TypeMethodDescriptionTensor[]FeedForwardParameters.gradients(com.oracle.labs.mlrg.olcut.util.Pair<Double, SGDVector> score, SGDVector features) Generates the parameter gradients given the loss, output gradient and input features.Tensor[]LinearParameters.gradients(com.oracle.labs.mlrg.olcut.util.Pair<Double, SGDVector> score, SGDVector features) Generate the gradients for a particular feature vector given the loss and the per output gradients.Generates an un-normalized prediction by feeding the features through the parameters.Generates an unnormalised prediction by leftMultiply'ing the weights with the incoming features.Method parameters in org.tribuo.math with type arguments of type SGDVectorModifier and TypeMethodDescriptionTensor[]FeedForwardParameters.gradients(com.oracle.labs.mlrg.olcut.util.Pair<Double, SGDVector> score, SGDVector features) Generates the parameter gradients given the loss, output gradient and input features.Tensor[]LinearParameters.gradients(com.oracle.labs.mlrg.olcut.util.Pair<Double, SGDVector> score, SGDVector features) Generate the gradients for a particular feature vector given the loss and the per output gradients. -
Uses of SGDVector in org.tribuo.math.distance
Methods in org.tribuo.math.distance with parameters of type SGDVectorModifier and TypeMethodDescriptiondoubleCosineDistance.computeDistance(SGDVector first, SGDVector second) doubleDistance.computeDistance(SGDVector first, SGDVector second) Computes the distance between the two vectors.doubleDistanceType.computeDistance(SGDVector vector1, SGDVector vector2) Calculates the distance between two vectors.doubleL1Distance.computeDistance(SGDVector first, SGDVector second) doubleL2Distance.computeDistance(SGDVector first, SGDVector second) -
Uses of SGDVector in org.tribuo.math.la
Classes in org.tribuo.math.la that implement SGDVectorModifier and TypeClassDescriptionclassA dense vector, backed by a double array.classA sparse vector.Methods in org.tribuo.math.la that return SGDVectorModifier and TypeMethodDescriptionAddsotherto this vector, producing a newSGDVector.Addsotherto this vector, producing a newSGDVector.SGDVector.copy()Returns a deep copy of this vector.Matrix.getColumn(int index) Returns a copy of the specified column.Matrix.getRow(int i) AnSGDVectorview of the row.Matrix.leftMultiply(SGDVector input) Multiplies this Matrix by aSGDVectorreturning a vector of the appropriate size.Matrix.rightMultiply(SGDVector input) Multiplies this Matrix by aSGDVectorreturning a vector of the appropriate size.SGDVector.scale(double coefficient) Generates a new vector with each element scaled bycoefficient.Solves a system of linear equations A * b = y, where y is the input vector, A is the matrix which produced this factorization, and b is the returned value.Subtractsotherfrom this vector, producing a newSGDVector.Subtractsotherfrom this vector, producing a newSGDVector.Methods in org.tribuo.math.la with parameters of type SGDVectorModifier and TypeMethodDescriptionAddsotherto this vector, producing a newDenseVector.Addsotherto this vector, producing a newSGDVector.Addsotherto this vector, producing a newSGDVector.voidDenseMatrix.broadcastIntersectAndAddInPlace(SGDVector input, boolean broadcastOverDim1) Broadcasts the input vector and adds it to each row/column of the matrix.default doubleSGDVector.cosineDistance(SGDVector other) Calculates the cosine distance of two vectors.default doubleSGDVector.cosineSimilarity(SGDVector other) Calculates the cosine similarity of two vectors.static DenseMatrixDenseMatrix.createDenseMatrix(SGDVector[] vectors) Constructs a new DenseMatrix copying the values from the supplied vectors.static DenseSparseMatrixDenseSparseMatrix.createDiagonal(SGDVector diagonal) Creates a diagonal matrix using the supplied values.doubleSparseVector.distance(SGDVector other, DoubleUnaryOperator transformFunc, DoubleUnaryOperator normalizeFunc) Computes the distance between this vector and the other vector.doubledoubleCalculates the dot product between this vector andother.doubledoubleDenseVector.euclideanDistance(SGDVector other) The l2 or euclidean distance between this vector and the other vector.doubleSGDVector.euclideanDistance(SGDVector other) The l2 or euclidean distance between this vector and the other vector.doubleSparseVector.euclideanDistance(SGDVector other) doubleDenseVector.l1Distance(SGDVector other) The l1 or Manhattan distance between this vector and the other vector.doubleSGDVector.l1Distance(SGDVector other) The l1 or Manhattan distance between this vector and the other vector.doubleSparseVector.l1Distance(SGDVector other) default doubleSGDVector.l2Distance(SGDVector other) Synonym for euclideanDistance.DenseMatrix.leftMultiply(SGDVector input) DenseSparseMatrix.leftMultiply(SGDVector input) Matrix.leftMultiply(SGDVector input) Multiplies this Matrix by aSGDVectorreturning a vector of the appropriate size.Generates the matrix representing the outer product between the two vectors.This generates the outer product when dotted with anotherSparseVector.DenseMatrix.rightMultiply(SGDVector input) DenseSparseMatrix.rightMultiply(SGDVector input) rightMultiply is very inefficient on DenseSparseMatrix due to the storage format.Matrix.rightMultiply(SGDVector input) Multiplies this Matrix by aSGDVectorreturning a vector of the appropriate size.voidSets the column to the supplied vector value.Solves a system of linear equations A * b = y, where y is the input vector, A is the matrix which produced this Cholesky factorization, and b is the returned value.Solves a system of linear equations A * b = y, where y is the input vector, A is the matrix which produced this eigen decomposition, and b is the returned value.Solves a system of linear equations A * b = y, where y is the input vector, A is the matrix which produced this LU factorization, and b is the returned value.Solves a system of linear equations A * b = y, where y is the input vector, A is the matrix which produced this factorization, and b is the returned value.Subtractsotherfrom this vector, producing a newDenseVector.Subtractsotherfrom this vector, producing a newSGDVector.Subtractsotherfrom this vector, producing a newSGDVector. -
Uses of SGDVector in org.tribuo.math.neighbour
Methods in org.tribuo.math.neighbour with parameters of type SGDVectorModifier and TypeMethodDescriptionNeighboursQueryFactory.createNeighboursQuery(SGDVector[] data) Constructs a nearest neighbour query object using the supplied array ofSGDVector.Queries a set ofSGDVectors to determine the k points nearest to the provided points.Queries a set ofSGDVectors to determine the k points nearest to the provided point. -
Uses of SGDVector in org.tribuo.math.neighbour.bruteforce
Methods in org.tribuo.math.neighbour.bruteforce with parameters of type SGDVectorModifier and TypeMethodDescriptionNeighboursBruteForceFactory.createNeighboursQuery(SGDVector[] data) Constructs a brute-force nearest neighbor query object using the supplied array ofSGDVector. -
Uses of SGDVector in org.tribuo.math.neighbour.kdtree
Methods in org.tribuo.math.neighbour.kdtree with parameters of type SGDVectorModifier and TypeMethodDescriptionorg.tribuo.math.neighbour.kdtree.DimensionNodeKDTree.approximateParentNode(SGDVector point) This makes a fast approximation of the provided point's parent node, if it were being inserted into the tree.KDTreeFactory.createNeighboursQuery(SGDVector[] data) Constructs a k-d tree nearest neighbor query object using the supplied array ofSGDVector. -
Uses of SGDVector in org.tribuo.math.onnx
Methods in org.tribuo.math.onnx with parameters of type SGDVectorModifier and TypeMethodDescriptionstatic org.tribuo.util.onnx.ONNXInitializerONNXMathUtils.floatVector(org.tribuo.util.onnx.ONNXContext context, String name, SGDVector vector) Builds aONNXInitializercontaining theSGDVector. -
Uses of SGDVector in org.tribuo.math.optimisers.util
Classes in org.tribuo.math.optimisers.util that implement SGDVectorModifier and TypeClassDescriptionclassA subclass ofDenseVectorwhich shrinks the value every time a new value is added.Methods in org.tribuo.math.optimisers.util with parameters of type SGDVector