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 elementTensorarray.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 aDenseMatrixthe 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 underlyingTensorarray.Tensor[]LinearParameters.getEmptyCopy()This returns aDenseMatrixthe same size as the Parameters.Tensor[]Parameters.getEmptyCopy()Generates an empty copy of the underlyingTensorarray.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 aTensorarray 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.voidvoidSet the underlyingTensorarray to newWeights.Tensor[]Take aTensorarray of gradients and transform them according to the current weight and learning rates.voidvoidApply gradients to the parameters. -
Uses of Tensor in org.tribuo.math.la
Subinterfaces of Tensor in org.tribuo.math.laModifier and TypeInterfaceDescriptioninterfaceInterface for 2 dimensionalTensors.interfaceInterface for 1 dimensionalTensors.Classes in org.tribuo.math.la that implement TensorModifier and TypeClassDescriptionclassA dense matrix, backed by a primitive array.classA matrix which is dense in the first dimension and sparse in the second.classA dense vector, backed by a double array.classA sparse vector.Methods in org.tribuo.math.la that return TensorModifier and TypeMethodDescriptionTensor.copy()Returns a copy of this 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 TypeMethodDescriptionvoidDenseMatrix.hadamardProductInPlace(Tensor other, DoubleUnaryOperator f) voidDenseSparseMatrix.hadamardProductInPlace(Tensor other, DoubleUnaryOperator f) Only implemented forDenseMatrix.voidDenseVector.hadamardProductInPlace(Tensor other, DoubleUnaryOperator f) voidSparseVector.hadamardProductInPlace(Tensor other, DoubleUnaryOperator f) default voidTensor.hadamardProductInPlace(Tensor other) Same ashadamardProductInPlace(org.tribuo.math.la.Tensor, java.util.function.DoubleUnaryOperator), but applies the identity function.voidTensor.hadamardProductInPlace(Tensor other, DoubleUnaryOperator f) Updates thisTensorwith the Hadamard product (i.e., a term by term multiply) of this andother.voidDenseMatrix.intersectAndAddInPlace(Tensor other, DoubleUnaryOperator f) voidDenseSparseMatrix.intersectAndAddInPlace(Tensor other, DoubleUnaryOperator f) Only implemented forDenseMatrix.voidDenseVector.intersectAndAddInPlace(Tensor other, DoubleUnaryOperator f) voidSparseVector.intersectAndAddInPlace(Tensor other, DoubleUnaryOperator f) default voidTensor.intersectAndAddInPlace(Tensor other) Same asintersectAndAddInPlace(org.tribuo.math.la.Tensor, java.util.function.DoubleUnaryOperator), but applies the identity function.voidTensor.intersectAndAddInPlace(Tensor other, DoubleUnaryOperator f) Updates thisTensorby adding all the values from the intersection withother.static booleanTensor.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 TypeClassDescriptionclassA subclass ofDenseMatrixwhich shrinks the value every time a new value is added.classA subclass ofDenseVectorwhich 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 TypeMethodDescriptionvoidShrinkingMatrix.intersectAndAddInPlace(Tensor other, DoubleUnaryOperator f) voidShrinkingVector.intersectAndAddInPlace(Tensor other, DoubleUnaryOperator f)