Uses of Interface
org.tribuo.math.la.SGDVector
Packages that use SGDVector
Package
Description
Provides infrastructure for Stochastic Gradient Descent for classification problems.
Provides an implementation of a linear chain CRF trained using Stochastic Gradient Descent.
Provides classification loss functions for Stochastic Gradient Descent.
Provides a multithreaded implementation of K-Means, with a
configurable distance function.
Provides the base classes for models trained with stochastic gradient descent.
Provides an interface to TensorFlow, allowing the training of non-sequential models using any supported
Tribuo output type.
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 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 multi-label classification loss functions for Stochastic Gradient Descent.
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
Fields in org.tribuo.classification.sgd declared as SGDVectorModifier and TypeFieldDescriptionfinal SGDVector[][]
Util.SequenceExampleArray.features
The array of sequence example features.Methods in org.tribuo.classification.sgd that return types with arguments of type SGDVectorModifier and TypeMethodDescriptionLabelObjective.lossAndGradient
(Integer truth, SGDVector prediction) LabelObjective.valueAndGradient
(int truth, SGDVector prediction) Deprecated.Methods in org.tribuo.classification.sgd with parameters of type SGDVectorModifier and TypeMethodDescriptionLabelObjective.lossAndGradient
(Integer truth, SGDVector prediction) static Util.SequenceExampleArray
Util.shuffle
(SGDVector[][] features, int[][] labels, double[] weights, SplittableRandom rng) Shuffles a sequence of features, labels and weights, returning a tuple of the shuffled values.static void
Util.shuffleInPlace
(SGDVector[][] features, int[][] labels, double[] weights, SplittableRandom rng) In place shuffle used for sequence problems.LabelObjective.valueAndGradient
(int truth, SGDVector prediction) Deprecated.In 4.1, to migrate to the new nameLabelObjective.lossAndGradient(java.lang.Integer, org.tribuo.math.la.SGDVector)
. -
Uses of SGDVector in org.tribuo.classification.sgd.crf
Methods in org.tribuo.classification.sgd.crf that return SGDVectorModifier and TypeMethodDescriptionCRFModel.convertToVector
(SequenceExample<T> example, ImmutableFeatureMap featureIDMap) Converts aSequenceExample
into an array ofSGDVector
s suitable for CRF prediction.Methods in org.tribuo.classification.sgd.crf with parameters of type SGDVectorModifier and TypeMethodDescriptionCRFParameters.getCliqueValues
(SGDVector[] features) Generates the local scores and tuples them with the label - label transition weights.CRFParameters.getLocalScores
(SGDVector[] features) Generate the local scores (i.e., the linear classifier for each token).int[]
Generate a prediction using Viterbi.CRFParameters.predictConfidenceUsingCBP
(SGDVector[] features, List<Chunk> chunks) This predicts per chunk confidence using the constrained forward backward algorithm from Culotta and McCallum 2004.CRFParameters.predictMarginals
(SGDVector[] features) Generate a prediction using Belief Propagation.CRFParameters.valueAndGradient
(SGDVector[] features, int[] labels) Generates predictions based on the input features and labels, then scores those predictions to produce a loss for the example and a gradient update. -
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.lossAndGradient
(Integer truth, SGDVector prediction) LogMulticlass.lossAndGradient
(Integer truth, SGDVector prediction) Hinge.valueAndGradient
(int truth, SGDVector prediction) Deprecated.LogMulticlass.valueAndGradient
(int truth, SGDVector prediction) Deprecated.Methods in org.tribuo.classification.sgd.objectives with parameters of type SGDVectorModifier and TypeMethodDescriptionHinge.lossAndGradient
(Integer truth, SGDVector prediction) LogMulticlass.lossAndGradient
(Integer truth, SGDVector prediction) Hinge.valueAndGradient
(int truth, SGDVector prediction) Deprecated.LogMulticlass.valueAndGradient
(int truth, SGDVector prediction) Deprecated. -
Uses of SGDVector in org.tribuo.clustering.kmeans
Methods in org.tribuo.clustering.kmeans with parameters of type SGDVectorModifier and TypeMethodDescriptionprotected void
KMeansTrainer.mStep
(ForkJoinPool fjp, DenseVector[] centroidVectors, Map<Integer, List<Integer>> clusterAssignments, SGDVector[] data, double[] weights) Runs the mStep, writing to thecentroidVectors
array. -
Uses of SGDVector in org.tribuo.common.sgd
Methods in org.tribuo.common.sgd that return types with arguments of type SGDVectorModifier and TypeMethodDescriptionSGDObjective.lossAndGradient
(T truth, SGDVector prediction) Scores a prediction, returning the loss and a vector of per output dimension gradients.Methods in org.tribuo.common.sgd with parameters of type SGDVectorModifier and TypeMethodDescriptionTensor[]
FMParameters.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.SGDObjective.lossAndGradient
(T truth, SGDVector prediction) Scores a prediction, returning the loss and a vector of per output dimension gradients.Generates an unnormalised prediction by multiplying the weights with the incoming features, adding the bias and adding the feature factors.static <T> void
AbstractSGDTrainer.shuffleInPlace
(SGDVector[] features, T[] labels, double[] weights, SplittableRandom rng) Shuffles the features, outputs and weights in place.Method parameters in org.tribuo.common.sgd with type arguments of type SGDVector -
Uses of SGDVector in org.tribuo.interop.tensorflow
Methods in org.tribuo.interop.tensorflow with parameters of type SGDVectorModifier and TypeMethodDescriptionMethod parameters in org.tribuo.interop.tensorflow with type arguments of type SGDVectorModifier and TypeMethodDescription -
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.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) AnSGDVector
view of the row.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) Computes the distance between this vector and the other vector.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.onnx
Methods in org.tribuo.math.onnx with parameters of type SGDVectorModifier and TypeMethodDescriptionstatic ONNXInitializer
ONNXMathUtils.floatVector
(ONNXContext context, String name, SGDVector vector) Builds aONNXInitializer
containing theSGDVector
. -
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.multilabel.sgd.fm
Methods in org.tribuo.multilabel.sgd.fm that return types with arguments of type SGDVectorModifier and TypeMethodDescriptionprotected SGDObjective<SGDVector>
FMMultiLabelTrainer.getObjective()
-
Uses of SGDVector in org.tribuo.multilabel.sgd.linear
Methods in org.tribuo.multilabel.sgd.linear that return types with arguments of type SGDVectorModifier and TypeMethodDescriptionprotected SGDObjective<SGDVector>
LinearSGDTrainer.getObjective()
-
Uses of SGDVector in org.tribuo.multilabel.sgd.objectives
Methods in org.tribuo.multilabel.sgd.objectives that return types with arguments of type SGDVectorModifier and TypeMethodDescriptionBinaryCrossEntropy.lossAndGradient
(SGDVector truth, SGDVector prediction) Hinge.lossAndGradient
(SGDVector truth, SGDVector prediction) Methods in org.tribuo.multilabel.sgd.objectives with parameters of type SGDVectorModifier and TypeMethodDescriptionBinaryCrossEntropy.lossAndGradient
(SGDVector truth, SGDVector prediction) Hinge.lossAndGradient
(SGDVector truth, SGDVector prediction) -
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) Deprecated.In 4.1 to move to the new name, lossAndGradient.RegressionObjective.lossAndGradient
(DenseVector truth, SGDVector prediction) Methods in org.tribuo.regression.sgd with parameters of type SGDVectorModifier and TypeMethodDescriptionRegressionObjective.loss
(DenseVector truth, SGDVector prediction) Deprecated.In 4.1 to move to the new name, lossAndGradient.RegressionObjective.lossAndGradient
(DenseVector truth, SGDVector prediction) -
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) Deprecated.Huber.loss
(DenseVector truth, SGDVector prediction) Deprecated.SquaredLoss.loss
(DenseVector truth, SGDVector prediction) Deprecated.AbsoluteLoss.lossAndGradient
(DenseVector truth, SGDVector prediction) Huber.lossAndGradient
(DenseVector truth, SGDVector prediction) SquaredLoss.lossAndGradient
(DenseVector truth, SGDVector prediction) Methods in org.tribuo.regression.sgd.objectives with parameters of type SGDVectorModifier and TypeMethodDescriptionAbsoluteLoss.loss
(DenseVector truth, SGDVector prediction) Deprecated.Huber.loss
(DenseVector truth, SGDVector prediction) Deprecated.SquaredLoss.loss
(DenseVector truth, SGDVector prediction) Deprecated.AbsoluteLoss.lossAndGradient
(DenseVector truth, SGDVector prediction) Huber.lossAndGradient
(DenseVector truth, SGDVector prediction) SquaredLoss.lossAndGradient
(DenseVector truth, SGDVector prediction)
LabelObjective.lossAndGradient(java.lang.Integer, org.tribuo.math.la.SGDVector)
.