public static class GradientBoostingClassifier.Builder extends BasePythonClassifier.Builder<GradientBoostingClassifier.Builder,GradientBoostingClassifier>
modelName, workingDir| Constructor and Description |
|---|
Builder()
Instantiates a new Builder.
|
| Modifier and Type | Method and Description |
|---|---|
GradientBoostingClassifier |
build()
Build classifier.
|
GradientBoostingClassifier.Builder |
criterion(CriterionType criterion)
Sets the function to measure the quality of a split.
|
GradientBoostingClassifier.Builder |
estimators(int estimators)
Sets the number of boosting stages to perform.
|
GradientBoostingClassifier.Builder |
learningRate(double learningRate)
Sets the learning rate.
|
GradientBoostingClassifier.Builder |
lossFunction(LossFunctionType lossFunction)
Sets the loss function to be optimized.
|
GradientBoostingClassifier.Builder |
maxDepth(Integer maxDepth)
Sets maximum depth of the individual regression estimators.
|
GradientBoostingClassifier.Builder |
maxFeatures(double maxFeatures)
Sets the fraction of features to consider when looking for the best split.
|
GradientBoostingClassifier.Builder |
maxFeatures(int maxFeatures)
Sets the maximum number of features to consider when looking for the best split.
|
GradientBoostingClassifier.Builder |
maxFeatures(MaxFeaturesType maxFeatures)
Sets the maximum number of features to consider when looking for the best split.
|
GradientBoostingClassifier.Builder |
maxLeafNodes(Integer maxLeafNodes)
Sets max leaf nodes.
|
GradientBoostingClassifier.Builder |
minImpurityDecrease(double minImpurityDecrease)
Sets min impurity decrease.
|
GradientBoostingClassifier.Builder |
minSamplesLeaf(double minSamplesLeaf)
Sets the minimum fraction of samples required to be at a leaf node.
|
GradientBoostingClassifier.Builder |
minSamplesLeaf(int minSamplesLeaf)
Sets the minimum number of samples required to be at a leaf node.
|
GradientBoostingClassifier.Builder |
minSamplesSplit(double minSamplesSplit)
Sets the minimum fraction of samples required to split an internal node.
|
GradientBoostingClassifier.Builder |
minSamplesSplit(int minSamplesSplit)
Sets the minimum number of samples required to split an internal node.
|
GradientBoostingClassifier.Builder |
minWeightFractionLeaf(double minWeightFractionLeaf)
Sets the minimum weighted fraction of the sum total of weights (of all the input samples) required to be at a leaf node.
|
GradientBoostingClassifier.Builder |
modelName(String name)
Set a model name.
|
GradientBoostingClassifier.Builder |
presort(boolean presort)
Sets whether to presort the data to speed up the finding of best splits in fitting.
|
GradientBoostingClassifier.Builder |
presort(PresortType presort)
Sets whether to presort the data to speed up the finding of best splits in fitting.
|
GradientBoostingClassifier.Builder |
seed(Integer seed)
Sets the seed used by the random number generator.
|
GradientBoostingClassifier.Builder |
subsample(double subsample)
Sets the fraction of samples to be used for fitting the individual base learners.
|
GradientBoostingClassifier.Builder |
verbose(boolean verbose)
Sets whether verbose mode is used.
|
GradientBoostingClassifier.Builder |
warmStart(boolean warmStart)
Sets whether warm start is used.
|
createDefaultClassifierBridge, workingDirpublic GradientBoostingClassifier.Builder lossFunction(LossFunctionType lossFunction)
lossFunction - the loss functiton to set (LossFunctionType) (default: LossFunctionType.DEVIANCE)public GradientBoostingClassifier.Builder learningRate(double learningRate)
learningRate and estimators.learningRate - the learning rate (default: 1.0)public GradientBoostingClassifier.Builder estimators(int estimators)
estimators - the number of boosting stages (default: 100)public GradientBoostingClassifier.Builder maxDepth(Integer maxDepth)
maxDepth - the max depth (default: 3)public GradientBoostingClassifier.Builder criterion(CriterionType criterion)
criterion - the criterion (CriterionType) (default: CriterionType.FRIEDMAN_MSE)public GradientBoostingClassifier.Builder minSamplesSplit(double minSamplesSplit)
minSamplesSplit - the min samples splitpublic GradientBoostingClassifier.Builder minSamplesSplit(int minSamplesSplit)
minSamplesSplit - the min samples split (default: 2)public GradientBoostingClassifier.Builder minSamplesLeaf(int minSamplesLeaf)
minSamplesLeaf - the min samples leaf (default: 1)public GradientBoostingClassifier.Builder minSamplesLeaf(double minSamplesLeaf)
minSamplesLeaf - the min samples leafpublic GradientBoostingClassifier.Builder minWeightFractionLeaf(double minWeightFractionLeaf)
minWeightFractionLeaf - the min weight fraction leaf (default: 0.0)public GradientBoostingClassifier.Builder subsample(double subsample)
subsample - the fraction of samples (default: 1.0)public GradientBoostingClassifier.Builder maxFeatures(MaxFeaturesType maxFeatures)
maxFeatures - the max features (MaxFeaturesType) (default: MaxFeaturesType.AUTO)public GradientBoostingClassifier.Builder maxFeatures(int maxFeatures)
maxFeatures - the max featurespublic GradientBoostingClassifier.Builder maxFeatures(double maxFeatures)
maxFeatures - the max featurespublic GradientBoostingClassifier.Builder maxLeafNodes(Integer maxLeafNodes)
maxLeafNodes in best-first fashion. Best nodes are defined as relative reduction
in impurity. If null then unlimited number of leaf nodes.maxLeafNodes - the max leaf nodes (default: null)public GradientBoostingClassifier.Builder minImpurityDecrease(double minImpurityDecrease)
minImpurityDecrease - the min impurity decrease (default: 0.0)public GradientBoostingClassifier.Builder verbose(boolean verbose)
verbose - the verbose mode (default: false)public GradientBoostingClassifier.Builder warmStart(boolean warmStart)
warmStart - the warm start (default: false)public GradientBoostingClassifier.Builder seed(Integer seed)
seed - the seed (default: null)public GradientBoostingClassifier.Builder presort(PresortType presort)
presort - the verbose mode (PresortType) (default: PresortType.AUTO)public GradientBoostingClassifier.Builder presort(boolean presort)
presort - the verbose modepublic GradientBoostingClassifier.Builder modelName(String name)
BasePythonClassifier.BuildermodelName in class BasePythonClassifier.Builder<GradientBoostingClassifier.Builder,GradientBoostingClassifier>name - the model name (String)public GradientBoostingClassifier build()
BasePythonClassifier.Builderbuild in class BasePythonClassifier.Builder<GradientBoostingClassifier.Builder,GradientBoostingClassifier>Copyright © 2020. All rights reserved.