Package | Description |
---|---|
org.tribuo.classification.sgd |
Provides infrastructure for Stochastic Gradient Descent for classification problems.
|
org.tribuo.classification.sgd.crf |
Provides an implementation of a linear chain CRF trained using Stochastic Gradient Descent.
|
org.tribuo.classification.sgd.objectives |
Provides classification loss functions for Stochastic Gradient Descent.
|
org.tribuo.common.sgd |
Provides the base classes for models trained with stochastic gradient descent.
|
org.tribuo.interop.tensorflow |
Provides an interface to TensorFlow, allowing the training of non-sequential models using any supported
Tribuo output type.
|
org.tribuo.math |
Contains the implementation of Tribuo's math library, it's gradient descent optimisers, kernels and a set of
math related utils.
|
org.tribuo.math.la |
Provides a linear algebra system used for numerical operations in Tribuo.
|
org.tribuo.math.optimisers.util |
Provides some utility tensors for use in gradient optimisers.
|
org.tribuo.multilabel.sgd.linear |
Provides an implementation of a multi-label classification linear model using Stochastic Gradient Descent.
|
org.tribuo.multilabel.sgd.objectives |
Provides multi-label classification loss functions for Stochastic Gradient Descent.
|
org.tribuo.regression.sgd |
Provides infrastructure for Stochastic Gradient Descent based regression models.
|
org.tribuo.regression.sgd.objectives |
Provides regression loss functions for Stochastic Gradient Descent.
|
Modifier and Type | Field and Description |
---|---|
SGDVector[][] |
Util.SequenceExampleArray.features |
Modifier and Type | Method and Description |
---|---|
default com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
LabelObjective.lossAndGradient(Integer truth,
SGDVector prediction) |
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
LabelObjective.valueAndGradient(int truth,
SGDVector prediction)
Deprecated.
In 4.1, to migrate to the new name
LabelObjective.lossAndGradient(java.lang.Integer, org.tribuo.math.la.SGDVector) . |
Modifier and Type | Method and Description |
---|---|
default com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
LabelObjective.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.
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
LabelObjective.valueAndGradient(int truth,
SGDVector prediction)
Deprecated.
In 4.1, to migrate to the new name
LabelObjective.lossAndGradient(java.lang.Integer, org.tribuo.math.la.SGDVector) . |
Modifier and Type | Method and Description |
---|---|
static <T extends Output<T>> |
CRFModel.convertToVector(SequenceExample<T> example,
ImmutableFeatureMap featureIDMap)
Converts a
SequenceExample into an array of SGDVector s suitable for CRF prediction. |
Modifier and Type | Method and Description |
---|---|
ChainHelper.ChainCliqueValues |
CRFParameters.getCliqueValues(SGDVector[] features)
Generates the local scores and tuples them with the label - label transition weights.
|
DenseVector[] |
CRFParameters.getLocalScores(SGDVector[] features)
Generate the local scores (i.e., the linear classifier for each token).
|
int[] |
CRFParameters.predict(SGDVector[] features)
Generate a prediction using Viterbi.
|
List<Double> |
CRFParameters.predictConfidenceUsingCBP(SGDVector[] features,
List<Chunk> chunks)
This predicts per chunk confidence using the constrained forward backward algorithm from
Culotta and McCallum 2004.
|
DenseVector[] |
CRFParameters.predictMarginals(SGDVector[] features)
Generate a prediction using Belief Propagation.
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,Tensor[]> |
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.
|
Modifier and Type | Method and Description |
---|---|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
LogMulticlass.lossAndGradient(Integer truth,
SGDVector prediction)
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
Hinge.lossAndGradient(Integer truth,
SGDVector prediction)
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
LogMulticlass.valueAndGradient(int truth,
SGDVector prediction)
Deprecated.
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
Hinge.valueAndGradient(int truth,
SGDVector prediction)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
LogMulticlass.lossAndGradient(Integer truth,
SGDVector prediction)
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
Hinge.lossAndGradient(Integer truth,
SGDVector prediction)
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
LogMulticlass.valueAndGradient(int truth,
SGDVector prediction)
Deprecated.
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
Hinge.valueAndGradient(int truth,
SGDVector prediction)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
SGDObjective.lossAndGradient(T truth,
SGDVector prediction)
Scores a prediction, returning the loss and a vector of per output dimension gradients.
|
Modifier and Type | Method and Description |
---|---|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
SGDObjective.lossAndGradient(T truth,
SGDVector prediction)
Scores a prediction, returning the loss and a vector of per output dimension gradients.
|
static <T> void |
AbstractSGDTrainer.shuffleInPlace(SGDVector[] features,
T[] labels,
double[] weights,
SplittableRandom rng)
Shuffles the features, outputs and weights in place.
|
Modifier and Type | Method and Description |
---|---|
TensorMap |
ImageConverter.convert(SGDVector vector) |
TensorMap |
FeatureConverter.convert(SGDVector vector)
|
TensorMap |
DenseFeatureConverter.convert(SGDVector vector) |
Modifier and Type | Method and Description |
---|---|
TensorMap |
ImageConverter.convert(List<? extends SGDVector> vectors) |
TensorMap |
FeatureConverter.convert(List<? extends SGDVector> vectors)
|
TensorMap |
DenseFeatureConverter.convert(List<? extends SGDVector> vectors) |
Modifier and Type | Method and Description |
---|---|
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[] |
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.
|
DenseVector |
LinearParameters.predict(SGDVector example)
Generates an unnormalised prediction by leftMultiply'ing the weights with the incoming features.
|
DenseVector |
FeedForwardParameters.predict(SGDVector example)
Generates an un-normalized prediction by feeding the features through the parameters.
|
Modifier and Type | Method and Description |
---|---|
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[] |
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.
|
Modifier and Type | Class and Description |
---|---|
class |
DenseVector
A dense vector, backed by a double array.
|
class |
SparseVector
A sparse vector.
|
Modifier and Type | Method and Description |
---|---|
SGDVector |
SparseVector.add(SGDVector other)
Adds
other to this vector, producing a new SGDVector . |
SGDVector |
SGDVector.add(SGDVector other)
Adds
other to this vector, producing a new SGDVector . |
SGDVector |
SGDVector.copy()
Returns a deep copy of this vector.
|
SGDVector |
Matrix.getRow(int i)
Extract a row as an
SGDVector . |
SGDVector |
Matrix.leftMultiply(SGDVector input)
Multiplies this Matrix by a
SGDVector returning a vector of the appropriate size. |
SGDVector |
Matrix.rightMultiply(SGDVector input)
Multiplies this Matrix by a
SGDVector returning a vector of the appropriate size. |
SGDVector |
SGDVector.scale(double coefficient)
Generates a new vector with each element scaled by
coefficient . |
SGDVector |
SparseVector.subtract(SGDVector other)
Subtracts
other from this vector, producing a new SGDVector . |
SGDVector |
SGDVector.subtract(SGDVector other)
Subtracts
other from this vector, producing a new SGDVector . |
Modifier and Type | Method and Description |
---|---|
SGDVector |
SparseVector.add(SGDVector other)
Adds
other to this vector, producing a new SGDVector . |
SGDVector |
SGDVector.add(SGDVector other)
Adds
other to this vector, producing a new SGDVector . |
DenseVector |
DenseVector.add(SGDVector other)
Adds
other to this vector, producing a new DenseVector . |
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) |
double |
SparseVector.dot(SGDVector other) |
double |
SGDVector.dot(SGDVector other)
Calculates the dot product between this vector and
other . |
double |
DenseVector.dot(SGDVector other) |
double |
SparseVector.euclideanDistance(SGDVector other) |
double |
SGDVector.euclideanDistance(SGDVector other)
The l2 or euclidean distance between this vector and the other vector.
|
double |
DenseVector.euclideanDistance(SGDVector other)
The l2 or euclidean distance between this vector and the other vector.
|
double |
SparseVector.l1Distance(SGDVector other) |
double |
SGDVector.l1Distance(SGDVector other)
The l1 or Manhattan distance between this vector and the other vector.
|
double |
DenseVector.l1Distance(SGDVector other)
The l1 or Manhattan distance between this vector and the other vector.
|
default double |
SGDVector.l2Distance(SGDVector other)
Synonym for euclideanDistance.
|
SGDVector |
Matrix.leftMultiply(SGDVector input)
Multiplies this Matrix by a
SGDVector returning a vector of the appropriate size. |
DenseVector |
DenseSparseMatrix.leftMultiply(SGDVector input) |
DenseVector |
DenseMatrix.leftMultiply(SGDVector input) |
Matrix |
SparseVector.outer(SGDVector other)
This generates the outer product when dotted with another
SparseVector . |
Matrix |
SGDVector.outer(SGDVector other)
Generates the matrix representing the outer product between the two vectors.
|
Matrix |
DenseVector.outer(SGDVector other) |
SGDVector |
Matrix.rightMultiply(SGDVector input)
Multiplies this Matrix by a
SGDVector returning a vector of the appropriate size. |
DenseVector |
DenseSparseMatrix.rightMultiply(SGDVector input)
rightMultiply is very inefficient on DenseSparseMatrix due to the storage format.
|
DenseVector |
DenseMatrix.rightMultiply(SGDVector input) |
SGDVector |
SparseVector.subtract(SGDVector other)
Subtracts
other from this vector, producing a new SGDVector . |
SGDVector |
SGDVector.subtract(SGDVector other)
Subtracts
other from this vector, producing a new SGDVector . |
DenseVector |
DenseVector.subtract(SGDVector other)
Subtracts
other from this vector, producing a new DenseVector . |
Modifier and Type | Class and Description |
---|---|
class |
ShrinkingVector
A subclass of
DenseVector which shrinks the value every time a new value is added. |
Modifier and Type | Method and Description |
---|---|
double |
ShrinkingVector.dot(SGDVector other) |
DenseVector |
ShrinkingMatrix.leftMultiply(SGDVector input) |
Modifier and Type | Method and Description |
---|---|
protected SGDObjective<SGDVector> |
LinearSGDTrainer.getObjective() |
Modifier and Type | Method and Description |
---|---|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
Hinge.lossAndGradient(SGDVector truth,
SGDVector prediction)
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
BinaryCrossEntropy.lossAndGradient(SGDVector truth,
SGDVector prediction)
|
Modifier and Type | Method and Description |
---|---|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
Hinge.lossAndGradient(SGDVector truth,
SGDVector prediction)
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
BinaryCrossEntropy.lossAndGradient(SGDVector truth,
SGDVector prediction)
|
Modifier and Type | Method and Description |
---|---|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
RegressionObjective.loss(DenseVector truth,
SGDVector prediction)
Deprecated.
In 4.1 to move to the new name, lossAndGradient.
|
default com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
RegressionObjective.lossAndGradient(DenseVector truth,
SGDVector prediction) |
Modifier and Type | Method and Description |
---|---|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
RegressionObjective.loss(DenseVector truth,
SGDVector prediction)
Deprecated.
In 4.1 to move to the new name, lossAndGradient.
|
default com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
RegressionObjective.lossAndGradient(DenseVector truth,
SGDVector prediction) |
Modifier and Type | Method and Description |
---|---|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
SquaredLoss.loss(DenseVector truth,
SGDVector prediction)
Deprecated.
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
Huber.loss(DenseVector truth,
SGDVector prediction)
Deprecated.
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
AbsoluteLoss.loss(DenseVector truth,
SGDVector prediction)
Deprecated.
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
SquaredLoss.lossAndGradient(DenseVector truth,
SGDVector prediction) |
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
Huber.lossAndGradient(DenseVector truth,
SGDVector prediction) |
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
AbsoluteLoss.lossAndGradient(DenseVector truth,
SGDVector prediction) |
Modifier and Type | Method and Description |
---|---|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
SquaredLoss.loss(DenseVector truth,
SGDVector prediction)
Deprecated.
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
Huber.loss(DenseVector truth,
SGDVector prediction)
Deprecated.
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
AbsoluteLoss.loss(DenseVector truth,
SGDVector prediction)
Deprecated.
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
SquaredLoss.lossAndGradient(DenseVector truth,
SGDVector prediction) |
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
Huber.lossAndGradient(DenseVector truth,
SGDVector prediction) |
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
AbsoluteLoss.lossAndGradient(DenseVector truth,
SGDVector prediction) |
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.