Class GradientBoosting
java.lang.Object
ai.beestream.jitnn.ml.GradientBoosting
Gradient-boosted trees with second-order (Newton) leaves on binned features, after
scikit-learn's HistGradientBoosting and XGBoost: squared error for regression, the logistic
loss for two classes and the softmax loss (one tree per class and round) for more. Gradients
are computed on the device each round; the trees are grown as in
RandomForest.-
Constructor Summary
ConstructorsConstructorDescriptionGradientBoosting(boolean classification, int rounds, float learningRate, int maxDepth) Boosting with scikit-learn's defaults for the rest: 20 samples per leaf, no L2 penalty, 255 bins.GradientBoosting(boolean classification, int rounds, float learningRate, int maxDepth, int minSamplesLeaf, float lambda, int maxBins) Boosting for classification or regression:roundstrees of depth at mostmaxDepth, shrunk bylearningRate, with at leastminSamplesLeafsamples per leaf, L2 penaltylambdaon the leaf values, and features in at mostmaxBinsbins. -
Method Summary
Modifier and TypeMethodDescriptionRaw scores [m, outputs]: the baseline plus every tree.Fits a classifier to samples x [n, features] and labels y.Regression targets [n].int[]The most probable label of each sample.Class probabilities [n, classes] for samples x.Regression predictions [m].
-
Constructor Details
-
GradientBoosting
public GradientBoosting(boolean classification, int rounds, float learningRate, int maxDepth, int minSamplesLeaf, float lambda, int maxBins) Boosting for classification or regression:roundstrees of depth at mostmaxDepth, shrunk bylearningRate, with at leastminSamplesLeafsamples per leaf, L2 penaltylambdaon the leaf values, and features in at mostmaxBinsbins. -
GradientBoosting
public GradientBoosting(boolean classification, int rounds, float learningRate, int maxDepth) Boosting with scikit-learn's defaults for the rest: 20 samples per leaf, no L2 penalty, 255 bins.
-
-
Method Details
-
fit
Fits a classifier to samples x [n, features] and labels y. -
fit
Regression targets [n]. -
decisionFunction
-
predictValues
-
predictProba
-
predict
The most probable label of each sample.
-