Uses of Interface
org.tribuo.math.la.Tensor
Packages that use 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
Methods in org.tribuo.classification.sgd.crf that return TensorModifier and TypeMethodDescriptionTensor[]
CRFParameters.get()
Tensor[]
CRFParameters.getEmptyCopy()
Returns a 3 elementTensor
array.Tensor[]
Methods in org.tribuo.classification.sgd.crf with parameters of type Tensor -
Uses of Tensor in org.tribuo.common.sgd
Methods in org.tribuo.common.sgd that return TensorModifier 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[]
Methods in org.tribuo.common.sgd with parameters of type Tensor -
Uses of Tensor in org.tribuo.math
Methods in org.tribuo.math that return TensorModifier 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.Methods in org.tribuo.math with parameters of type TensorModifier 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
Subinterfaces of Tensor in org.tribuo.math.laModifier and TypeInterfaceDescriptioninterface
Interface for 2 dimensionalTensor
s.interface
Interface for 1 dimensionalTensor
s.Classes in org.tribuo.math.la that implement TensorModifier 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.Methods in org.tribuo.math.la that return TensorModifier 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.Methods in org.tribuo.math.la with parameters of type TensorModifier 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
Methods in org.tribuo.math.optimisers that return TensorModifier and TypeMethodDescriptionTensor[]
Tensor[]
Tensor[]
Tensor[]
Tensor[]
This passes the gradient update to the inner optimiser, then updates the average weight values.Tensor[]
Tensor[]
Tensor[]
Methods in org.tribuo.math.optimisers with parameters of type Tensor -
Uses of Tensor in org.tribuo.math.optimisers.util
Classes in org.tribuo.math.optimisers.util that implement TensorModifier 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.Methods in org.tribuo.math.optimisers.util that return TensorModifier and TypeMethodDescriptionShrinkingTensor.convertToDense()
Converts the tensor into a dense tensor.Methods in org.tribuo.math.optimisers.util with parameters of type TensorModifier and TypeMethodDescriptionvoid
ShrinkingMatrix.intersectAndAddInPlace
(Tensor other, DoubleUnaryOperator f) void
ShrinkingVector.intersectAndAddInPlace
(Tensor other, DoubleUnaryOperator f)