Uses of Class
org.tribuo.math.la.DenseVector
Package
Description
Provides an implementation of a linear chain CRF trained using 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.
Code for uploading models to Oracle Cloud Infrastructure Data Science, and also for scoring models deployed
in Oracle Cloud Infrastructure Data Science.
Contains the implementation of Tribuo's math library, it's gradient descent optimisers, kernels and a set of
math related utils.
A package of statistical distributions.
Provides a linear algebra system used for numerical operations in Tribuo.
Provides some utility tensors for use in gradient optimisers.
Provides classes and infrastructure for working with multi-label classification problems.
Provides infrastructure for Stochastic Gradient Descent based regression models.
Provides an implementation of factorization machines for regression using Stochastic Gradient Descent.
Provides an implementation of linear regression using Stochastic Gradient Descent.
Provides regression loss functions for Stochastic Gradient Descent.
Provides implementations of sparse linear regression using various forms of regularisation penalty.
-
Uses of DenseVector in org.tribuo.classification.sgd.crf
Modifier and TypeFieldDescriptionfinal DenseVector[]
ChainHelper.ChainBPResults.alphas
The alpha values array from forward propagation.final DenseVector[]
ChainHelper.ChainBPResults.betas
The beta values array from backward propagation.final DenseVector[]
ChainHelper.ChainCliqueValues.localValues
The per element values.Modifier and TypeMethodDescriptionCRFModel.getFeatureWeights
(int featureID) Get a copy of the weights for featurefeatureID
.CRFModel.getFeatureWeights
(String featureName) Get a copy of the weights for feature namedfeatureName
.CRFParameters.getFeatureWeights
(int id) Gets a copy of the weights for the specified label id.CRFParameters.getLocalScores
(SGDVector[] features) Generate the local scores (i.e., the linear classifier for each token).CRFParameters.predictMarginals
(SGDVector[] features) Generate a prediction using Belief Propagation.Modifier and TypeMethodDescriptionstatic double
ChainHelper.sumLogProbs
(DenseVector input) Sums the log probabilities. -
Uses of DenseVector in org.tribuo.clustering.kmeans
Modifier and TypeMethodDescriptionKMeansModel.getCentroidVectors()
Returns a copy of the centroids.Modifier 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 DenseVector in org.tribuo.common.sgd
Modifier and TypeFieldDescriptionfinal DenseVector
AbstractSGDModel.PredAndActive.prediction
The vector prediction.Modifier and TypeMethodDescriptionAbstractFMModel.getBiasesCopy()
Returns a copy of the output dimension biases.Generates an unnormalised prediction by multiplying the weights with the incoming features, adding the bias and adding the feature factors. -
Uses of DenseVector in org.tribuo.interop.oci
Modifier and TypeMethodDescriptionOCILabelConverter.convertOutput
(DenseVector scores, int numValidFeature, Example<Label> example, ImmutableOutputInfo<Label> outputIDInfo) OCIMultiLabelConverter.convertOutput
(DenseVector scores, int numValidFeature, Example<MultiLabel> example, ImmutableOutputInfo<MultiLabel> outputIDInfo) OCIOutputConverter.convertOutput
(DenseVector scores, int numValidFeature, Example<T> example, ImmutableOutputInfo<T> outputIDInfo) Converts a dense vector into a single prediction of the appropriate type.OCIRegressorConverter.convertOutput
(DenseVector scores, int numValidFeature, Example<Regressor> example, ImmutableOutputInfo<Regressor> outputIDInfo) -
Uses of DenseVector in org.tribuo.math
Modifier and TypeMethodDescriptionGenerates an un-normalized prediction by feeding the features through the parameters.Generates an unnormalised prediction by leftMultiply'ing the weights with the incoming features. -
Uses of DenseVector in org.tribuo.math.distributions
Modifier and TypeMethodDescriptionMultivariateNormalDistribution.sampleVector()
Sample a vector from this multivariate normal distribution.ModifierConstructorDescriptionMultivariateNormalDistribution
(DenseVector means, DenseMatrix covariance, long seed) Constructs a multivariate normal distribution that can be sampled from.MultivariateNormalDistribution
(DenseVector means, DenseMatrix covariance, long seed, boolean eigenDecomposition) Constructs a multivariate normal distribution that can be sampled from. -
Uses of DenseVector in org.tribuo.math.la
Modifier and TypeMethodDescriptionAddsother
to this vector, producing a newDenseVector
.DenseMatrix.columnSum()
Returns a dense vector containing each column sum.DenseVector.copy()
static DenseVector
DenseVector.createDenseVector
(double[] values) Defensively copies the values before construction.static <T extends Output<T>>
DenseVectorDenseVector.createDenseVector
(Example<T> example, ImmutableFeatureMap featureInfo, boolean addBias) Builds aDenseVector
from anExample
.SparseVector.densify()
Returns a dense vector copying this sparse vector.static DenseVector
DenseVector.deserializeFromProto
(int version, String className, com.google.protobuf.Any message) Deserialization factory.DenseMatrix.EigenDecomposition.diagonal()
The diagonal vector of the tridiagonal form.DenseMatrix.EigenDecomposition.eigenvalues()
The vector of eigenvalues, in descending order.DenseMatrix.gatherAcrossDim1
(int[] elements) Constructs a dense vector by gathering values across dimension 1.DenseMatrix.gatherAcrossDim2
(int[] elements) Constructs a dense vector by gathering values across dimension 2.DenseMatrix.getColumn
(int index) Returns a copy of the specified column.DenseMatrix.EigenDecomposition.getEigenVector
(int i) Returns the dense vector representing the i'th eigenvector.DenseMatrix.getRow
(int i) DenseMatrix.leftMultiply
(SGDVector input) DenseSparseMatrix.leftMultiply
(SGDVector input) DenseMatrix.EigenDecomposition.offDiagonal()
The off diagonal vector, with the first element set to zero.DenseMatrix.rightMultiply
(SGDVector input) DenseSparseMatrix.rightMultiply
(SGDVector input) rightMultiply is very inefficient on DenseSparseMatrix due to the storage format.DenseMatrix.rowSum()
DenseSparseMatrix.rowSum()
Matrix.rowSum()
Generates aDenseVector
representing the sum of each row.DenseVector.scale
(double coefficient) Solves a system of linear equations A * b = y, where y is the input vector, A is the matrix which produced this Cholesky factorization, and b is the returned value.Solves a system of linear equations A * b = y, where y is the input vector, A is the matrix which produced this eigen decomposition, and b is the returned value.Solves a system of linear equations A * b = y, where y is the input vector, A is the matrix which produced this LU factorization, and b is the returned value.Subtractsother
from this vector, producing a newDenseVector
.protected static DenseVector
DenseVector.unpackProto
(org.tribuo.math.protos.DenseTensorProto proto) Unpacks aDenseTensorProto
into aDenseVector
.Modifier and TypeMethodDescriptionvoid
DenseMatrix.rowScaleInPlace
(DenseVector scalingCoefficients) void
DenseSparseMatrix.rowScaleInPlace
(DenseVector scalingCoefficients) void
Matrix.rowScaleInPlace
(DenseVector scalingCoefficients) Scales each row by the appropriate value in theDenseVector
.void
DenseVector.setElements
(DenseVector other) Sets all the elements of this vector to be the same asother
. -
Uses of DenseVector in org.tribuo.math.optimisers.util
Modifier and TypeClassDescriptionclass
A subclass ofDenseVector
which shrinks the value every time a new value is added.Modifier and TypeMethodDescriptionShrinkingVector.convertToDense()
ShrinkingMatrix.leftMultiply
(SGDVector input) ModifierConstructorDescriptionShrinkingVector
(DenseVector v, double baseRate, boolean scaleShrinking) Constructs a shrinking vector copy of the supplied dense matrix.ShrinkingVector
(DenseVector v, double baseRate, double lambda) Constructs a shrinking vector copy of the supplied dense vector. -
Uses of DenseVector in org.tribuo.multilabel
Modifier and TypeMethodDescriptionMultiLabel.convertToDenseVector
(ImmutableOutputInfo<MultiLabel> info) Converts this MultiLabel into a DenseVector using the indices from the output info. -
Uses of DenseVector in org.tribuo.regression.sgd
Modifier and TypeMethodDescriptionRegressionObjective.loss
(DenseVector truth, SGDVector prediction) Deprecated.In 4.1 to move to the new name, lossAndGradient.RegressionObjective.lossAndGradient
(DenseVector truth, SGDVector prediction) static void
Util.shuffleInPlace
(SparseVector[] features, DenseVector[] regressors, double[] weights, int[] indices, SplittableRandom rng) In place shuffle of the features, labels and weights.static void
Util.shuffleInPlace
(SparseVector[] features, DenseVector[] regressors, double[] weights, SplittableRandom rng) In place shuffle of the features, labels and weights. -
Uses of DenseVector in org.tribuo.regression.sgd.fm
Modifier and TypeMethodDescriptionprotected DenseVector
FMRegressionTrainer.getTarget
(ImmutableOutputInfo<Regressor> outputInfo, Regressor output) Modifier and TypeMethodDescriptionprotected SGDObjective<DenseVector>
FMRegressionTrainer.getObjective()
-
Uses of DenseVector in org.tribuo.regression.sgd.linear
Modifier and TypeMethodDescriptionprotected DenseVector
LinearSGDTrainer.getTarget
(ImmutableOutputInfo<Regressor> outputInfo, Regressor output) Modifier and TypeMethodDescriptionprotected SGDObjective<DenseVector>
LinearSGDTrainer.getObjective()
-
Uses of DenseVector in org.tribuo.regression.sgd.objectives
Modifier 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) -
Uses of DenseVector in org.tribuo.regression.slm
Modifier and TypeMethodDescriptionprotected DenseVector
LARSLassoTrainer.newWeights
(org.tribuo.regression.slm.SLMTrainer.SLMState state) protected DenseVector
LARSTrainer.newWeights
(org.tribuo.regression.slm.SLMTrainer.SLMState state) protected DenseVector
SLMTrainer.newWeights
(org.tribuo.regression.slm.SLMTrainer.SLMState state) Computes the new feature weights.