Uses of Interface
org.tribuo.math.la.Tensor
Package
Description
Provides an implementation of a linear chain CRF trained using Stochastic Gradient Descent.
Provides the base classes for models trained with 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 implementations of
StochasticGradientOptimiser
.Provides some utility tensors for use in gradient optimisers.
-
Uses of Tensor in org.tribuo.classification.sgd.crf
-
Uses of Tensor in org.tribuo.common.sgd
Modifier and TypeMethodDescriptionTensor[]
FMParameters.get()
Tensor[]
FMParameters.getEmptyCopy()
This returns aDenseMatrix
the same size as the Parameters.Tensor[]
AbstractFMModel.getFactorsCopy()
Returns a copy of the factors.Tensor[]
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.Tensor[]
-
Uses of Tensor in org.tribuo.math
Modifier and TypeMethodDescriptionTensor[]
LinearParameters.get()
Tensor[]
Parameters.get()
Get a reference to the underlyingTensor
array.Tensor[]
LinearParameters.getEmptyCopy()
This returns aDenseMatrix
the same size as the Parameters.Tensor[]
Parameters.getEmptyCopy()
Generates an empty copy of the underlyingTensor
array.Tensor[]
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.Tensor[]
Tensor[]
Merge together an array of gradient arrays.Tensor[]
Take aTensor
array of gradients and transform them according to the current weight and learning rates.Modifier and TypeMethodDescriptionTensor[]
Tensor[]
Merge together an array of gradient arrays.void
void
Set the underlyingTensor
array to newWeights.Tensor[]
Take aTensor
array of gradients and transform them according to the current weight and learning rates.void
void
Apply gradients to the parameters. -
Uses of Tensor in org.tribuo.math.la
Modifier and TypeInterfaceDescriptioninterface
Interface for 2 dimensionalTensor
s.interface
Interface for 1 dimensionalTensor
s.Modifier and TypeClassDescriptionclass
A dense matrix, backed by a primitive array.class
A matrix which is dense in the first dimension and sparse in the second.class
A dense vector, backed by a double array.class
A sparse vector.Modifier and TypeMethodDescriptionTensor.copy()
Returns a copy of this Tensor.static Tensor
Tensor.deserialize
(org.tribuo.math.protos.TensorProto proto) Deserialize a tensor proto into a Tensor.DenseMatrix.reshape
(int[] newShape) DenseSparseMatrix.reshape
(int[] newShape) DenseVector.reshape
(int[] newShape) SparseVector.reshape
(int[] newShape) Tensor.reshape
(int[] shape) Reshapes the Tensor to the supplied shape.Modifier and TypeMethodDescriptionvoid
DenseMatrix.hadamardProductInPlace
(Tensor other, DoubleUnaryOperator f) void
DenseSparseMatrix.hadamardProductInPlace
(Tensor other, DoubleUnaryOperator f) Only implemented forDenseMatrix
.void
DenseVector.hadamardProductInPlace
(Tensor other, DoubleUnaryOperator f) void
SparseVector.hadamardProductInPlace
(Tensor other, DoubleUnaryOperator f) default void
Tensor.hadamardProductInPlace
(Tensor other) Same ashadamardProductInPlace(org.tribuo.math.la.Tensor, java.util.function.DoubleUnaryOperator)
, but applies the identity function.void
Tensor.hadamardProductInPlace
(Tensor other, DoubleUnaryOperator f) Updates thisTensor
with the Hadamard product (i.e., a term by term multiply) of this andother
.void
DenseMatrix.intersectAndAddInPlace
(Tensor other, DoubleUnaryOperator f) void
DenseSparseMatrix.intersectAndAddInPlace
(Tensor other, DoubleUnaryOperator f) Only implemented forDenseMatrix
.void
DenseVector.intersectAndAddInPlace
(Tensor other, DoubleUnaryOperator f) void
SparseVector.intersectAndAddInPlace
(Tensor other, DoubleUnaryOperator f) default void
Tensor.intersectAndAddInPlace
(Tensor other) Same asintersectAndAddInPlace(org.tribuo.math.la.Tensor, java.util.function.DoubleUnaryOperator)
, but applies the identity function.void
Tensor.intersectAndAddInPlace
(Tensor other, DoubleUnaryOperator f) Updates thisTensor
by adding all the values from the intersection withother
.static boolean
Tensor.shapeCheck
(Tensor first, Tensor second) Checks that the two tensors have compatible shapes. -
Uses of Tensor in org.tribuo.math.optimisers
Modifier and TypeMethodDescriptionTensor[]
Tensor[]
Tensor[]
Tensor[]
Tensor[]
This passes the gradient update to the inner optimiser, then updates the average weight values.Tensor[]
Tensor[]
Tensor[]
-
Uses of Tensor in org.tribuo.math.optimisers.util
Modifier and TypeClassDescriptionclass
A subclass ofDenseMatrix
which shrinks the value every time a new value is added.class
A subclass ofDenseVector
which shrinks the value every time a new value is added.Modifier and TypeMethodDescriptionShrinkingTensor.convertToDense()
Converts the tensor into a dense tensor.Modifier and TypeMethodDescriptionvoid
ShrinkingMatrix.intersectAndAddInPlace
(Tensor other, DoubleUnaryOperator f) void
ShrinkingVector.intersectAndAddInPlace
(Tensor other, DoubleUnaryOperator f)