Class Util
java.lang.Object
org.tribuo.classification.sgd.Util
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA nominal tuple.static classA nominal tuple. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Util.SequenceExampleArrayshuffle(SparseVector[][] features, int[][] labels, double[] weights, SplittableRandom rng) Shuffles a sequence of features, labels and weights, returning a tuple of the shuffled values.static Util.ExampleArrayshuffle(SparseVector[] features, int[] labels, double[] weights, SplittableRandom rng) Shuffles the features, labels and weights returning a tuple of the shuffled inputs.static voidshuffleInPlace(SparseVector[][] features, int[][] labels, double[] weights, SplittableRandom rng) In place shuffle used for sequence problems.static voidshuffleInPlace(SparseVector[] features, int[] labels, double[] weights, int[] indices, SplittableRandom rng) In place shuffle of the features, labels, weights and indices.static voidshuffleInPlace(SparseVector[] features, int[] labels, double[] weights, SplittableRandom rng) In place shuffle of the features, labels and weights.
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
shuffleInPlace
public static void shuffleInPlace(SparseVector[] features, int[] labels, double[] weights, SplittableRandom rng) In place shuffle of the features, labels and weights.- Parameters:
features- Input features.labels- Input labels.weights- Input weights.rng- SplittableRandom number generator.
-
shuffleInPlace
public static void shuffleInPlace(SparseVector[] features, int[] labels, double[] weights, int[] indices, SplittableRandom rng) In place shuffle of the features, labels, weights and indices.- Parameters:
features- Input features.labels- Input labels.weights- Input weights.indices- Input indices.rng- SplittableRandom number generator.
-
shuffle
public static Util.ExampleArray shuffle(SparseVector[] features, int[] labels, double[] weights, SplittableRandom rng) Shuffles the features, labels and weights returning a tuple of the shuffled inputs.- Parameters:
features- Input features.labels- Input labels.weights- Input weights.rng- SplittableRandom number generator.- Returns:
- A tuple of shuffled features, labels and weights.
-
shuffleInPlace
public static void shuffleInPlace(SparseVector[][] features, int[][] labels, double[] weights, SplittableRandom rng) In place shuffle used for sequence problems.- Parameters:
features- Input features.labels- Input labels.weights- Input weights.rng- SplittableRandom number generator.
-
shuffle
public static Util.SequenceExampleArray shuffle(SparseVector[][] features, int[][] labels, double[] weights, SplittableRandom rng) Shuffles a sequence of features, labels and weights, returning a tuple of the shuffled values.- Parameters:
features- Input features.labels- Input labels.weights- Input weights.rng- SplittableRandom number generator.- Returns:
- A tuple of shuffled features, labels and weights.
-