Uses of Interface
org.tribuo.math.la.SGDVector
Packages that use SGDVector
Package
Description
Provides infrastructure for Stochastic Gradient Descent for classification problems.
Provides classification loss functions for Stochastic Gradient Descent.
Contains the implementation of Tribuo's math library, it's gradient descent optimisers, kernels and a set of
math related utils.
Provides a linear algebra system used for numerical operations in Tribuo.
Provides some utility tensors for use in gradient optimisers.
Provides infrastructure for Stochastic Gradient Descent based regression models.
Provides regression loss functions for Stochastic Gradient Descent.
-
Uses of SGDVector in org.tribuo.classification.sgd
Methods in org.tribuo.classification.sgd that return types with arguments of type SGDVectorModifier and TypeMethodDescriptionLabelObjective.valueAndGradient
(int truth, SGDVector prediction) Scores a prediction, returning the loss and a vector of per label gradients.Methods in org.tribuo.classification.sgd with parameters of type SGDVectorModifier and TypeMethodDescriptionLabelObjective.valueAndGradient
(int truth, SGDVector prediction) Scores a prediction, returning the loss and a vector of per label gradients. -
Uses of SGDVector in org.tribuo.classification.sgd.objectives
Methods in org.tribuo.classification.sgd.objectives that return types with arguments of type SGDVectorModifier and TypeMethodDescriptionHinge.valueAndGradient
(int truth, SGDVector prediction) LogMulticlass.valueAndGradient
(int truth, SGDVector prediction) Returns aPair
ofDouble
and the supplied prediction vector.Methods in org.tribuo.classification.sgd.objectives with parameters of type SGDVectorModifier and TypeMethodDescriptionHinge.valueAndGradient
(int truth, SGDVector prediction) LogMulticlass.valueAndGradient
(int truth, SGDVector prediction) Returns aPair
ofDouble
and the supplied prediction vector. -
Uses of SGDVector in org.tribuo.math
Methods in org.tribuo.math that return SGDVectorModifier and TypeMethodDescriptionLinearParameters.predict
(SparseVector example) 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[]
LinearParameters.gradients
(com.oracle.labs.mlrg.olcut.util.Pair<Double, SGDVector> score, SparseVector features) Generate the gradients for a particular feature vector given the loss and the per output gradients. -
Uses of SGDVector in org.tribuo.math.la
Classes in org.tribuo.math.la that implement SGDVectorModifier and TypeClassDescriptionclass
A dense vector, backed by a double array.class
A sparse vector.Methods in org.tribuo.math.la that return SGDVectorModifier and TypeMethodDescriptionAddsother
to this vector, producing a newSGDVector
.Addsother
to this vector, producing a newSGDVector
.SGDVector.copy()
Returns a deep copy of this vector.Matrix.getRow
(int i) Extract a row as anSGDVector
.Matrix.leftMultiply
(SGDVector input) Multiplies this Matrix by aSGDVector
returning a vector of the appropriate size.Matrix.rightMultiply
(SGDVector input) Multiplies this Matrix by aSGDVector
returning a vector of the appropriate size.SGDVector.scale
(double coefficient) Generates a new vector with each element scaled bycoefficient
.Subtractsother
from this vector, producing a newSGDVector
.Subtractsother
from this vector, producing a newSGDVector
.Methods in org.tribuo.math.la with parameters of type SGDVectorModifier and TypeMethodDescriptionAddsother
to this vector, producing a newDenseVector
.Addsother
to this vector, producing a newSGDVector
.Addsother
to this vector, producing a newSGDVector
.void
DenseMatrix.broadcastIntersectAndAddInPlace
(SGDVector input, boolean broadcastOverDim1) Broadcasts the input vector and adds it to each row/column of the matrix.default double
SGDVector.cosineDistance
(SGDVector other) Calculates the cosine distance of two vectors.default double
SGDVector.cosineSimilarity
(SGDVector other) Calculates the cosine similarity of two vectors.double
SparseVector.distance
(SGDVector other, DoubleUnaryOperator transformFunc, DoubleUnaryOperator normalizeFunc) double
double
Calculates the dot product between this vector andother
.double
double
DenseVector.euclideanDistance
(SGDVector other) The l2 or euclidean distance between this vector and the other vector.double
SGDVector.euclideanDistance
(SGDVector other) The l2 or euclidean distance between this vector and the other vector.double
SparseVector.euclideanDistance
(SGDVector other) double
DenseVector.l1Distance
(SGDVector other) The l1 or Manhattan distance between this vector and the other vector.double
SGDVector.l1Distance
(SGDVector other) The l1 or Manhattan distance between this vector and the other vector.double
SparseVector.l1Distance
(SGDVector other) default double
SGDVector.l2Distance
(SGDVector other) Synonym for euclideanDistance.DenseMatrix.leftMultiply
(SGDVector input) DenseSparseMatrix.leftMultiply
(SGDVector input) Matrix.leftMultiply
(SGDVector input) Multiplies this Matrix by aSGDVector
returning 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 aSGDVector
returning a vector of the appropriate size.Subtractsother
from this vector, producing a newDenseVector
.Subtractsother
from this vector, producing a newSGDVector
.Subtractsother
from this vector, producing a newSGDVector
. -
Uses of SGDVector in org.tribuo.math.optimisers.util
Classes in org.tribuo.math.optimisers.util that implement SGDVectorModifier and TypeClassDescriptionclass
A subclass ofDenseVector
which shrinks the value every time a new value is added.Methods in org.tribuo.math.optimisers.util with parameters of type SGDVector -
Uses of SGDVector in org.tribuo.regression.sgd
Methods in org.tribuo.regression.sgd that return types with arguments of type SGDVectorModifier and TypeMethodDescriptionRegressionObjective.loss
(DenseVector truth, SGDVector prediction) Scores a prediction, returning the loss.Methods in org.tribuo.regression.sgd with parameters of type SGDVectorModifier and TypeMethodDescriptionRegressionObjective.loss
(DenseVector truth, SGDVector prediction) Scores a prediction, returning the loss. -
Uses of SGDVector in org.tribuo.regression.sgd.objectives
Methods in org.tribuo.regression.sgd.objectives that return types with arguments of type SGDVectorModifier and TypeMethodDescriptionAbsoluteLoss.loss
(DenseVector truth, SGDVector prediction) Huber.loss
(DenseVector truth, SGDVector prediction) SquaredLoss.loss
(DenseVector truth, SGDVector prediction) Methods in org.tribuo.regression.sgd.objectives with parameters of type SGDVectorModifier and TypeMethodDescriptionAbsoluteLoss.loss
(DenseVector truth, SGDVector prediction) Huber.loss
(DenseVector truth, SGDVector prediction) SquaredLoss.loss
(DenseVector truth, SGDVector prediction)