public static class RandomForestClassifier.Builder<B extends RandomForestClassifier.Builder,T extends RandomForestClassifier> extends BasePythonClassifier.Builder<RandomForestClassifier.Builder<B,T>,T>
modelName, workingDir| Constructor and Description |
|---|
Builder()
Instantiates a new Builder.
|
| Modifier and Type | Method and Description |
|---|---|
B |
bootstrap(boolean bootstrap)
Sets whether bootstrap samples are used when building trees.
|
T |
build()
Build classifier.
|
B |
classWeight(ClassWeightType classWeight)
Sets class weight.
|
B |
criterion(CriterionType criterion)
Sets the function to measure the quality of a split.
|
B |
estimators(int estimators)
Sets the number of estimators(trees) in the forest.
|
B |
jobs(int jobs)
Sets the number of jobs to run in parallel for both fit and predict.
|
B |
maxDepth(Integer maxDepth)
Sets the maximum depth of the tree.
|
B |
maxFeatures(double maxFeatures)
Sets the fraction of features to consider when looking for the best split.
|
B |
maxFeatures(int maxFeatures)
Sets the maximum number of features to consider when looking for the best split.
|
B |
maxFeatures(MaxFeaturesType maxFeatures)
Sets the maximum number of features to consider when looking for the best split.
|
B |
maxLeafNodes(Integer maxLeafNodes)
Sets max leaf nodes.
|
B |
minImpurityDecrease(double minImpurityDecrease)
Sets min impurity decrease.
|
B |
minSamplesLeaf(double minSamplesLeaf)
Sets the minimum number of samples required to be at a leaf node (the fraction of the samples).
|
B |
minSamplesLeaf(int minSamplesLeaf)
Sets the minimum number of samples required to be at a leaf node.
|
B |
minSamplesSplit(double minSamplesSplit)
Sets the minimum number of samples required to split an internal node (the fraction of the samples).
|
B |
minSamplesSplit(int minSamplesSplit)
Sets the minimum number of samples required to split an internal node.
|
B |
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.
|
B |
modelName(String name)
Set a model name.
|
B |
oobScore(boolean oobScore)
Sets whether to use out-of-bag samples to estimate the generalization accuracy.
|
B |
seed(Integer seed)
Sets the seed used by the random number generator.
|
B |
verbose(boolean verbose)
Sets whether warm start is used.
|
B |
warmStart(boolean warmStart)
Sets whether warm start is used.
|
createDefaultClassifierBridge, workingDirpublic B estimators(int estimators)
estimators - the number of estimators (default: 10)public B criterion(CriterionType criterion)
criterion - the criterion (CriterionType) (default: CriterionType.GINI)public B maxFeatures(MaxFeaturesType maxFeatures)
maxFeatures - the max features (MaxFeaturesType) (default: MaxFeaturesType.AUTO)public B maxFeatures(int maxFeatures)
maxFeatures - the max featurespublic B maxFeatures(double maxFeatures)
maxFeatures - the max featurespublic B maxDepth(Integer maxDepth)
maxDepth - the max depth (default: null)public B minSamplesSplit(double minSamplesSplit)
minSamplesSplit - the min samples splitpublic B minSamplesSplit(int minSamplesSplit)
minSamplesSplit - the min samples split (default: 2)public B minSamplesLeaf(int minSamplesLeaf)
minSamplesLeaf - the min samples leaf (default: 1)public B minSamplesLeaf(double minSamplesLeaf)
minSamplesLeaf - the min samples leafpublic B minWeightFractionLeaf(double minWeightFractionLeaf)
minWeightFractionLeaf - the min weight fraction leaf (default: 0.0)public B maxLeafNodes(Integer maxLeafNodes)
maxLeafNodes - the max leaf nodes (default: null)public B minImpurityDecrease(double minImpurityDecrease)
minImpurityDecrease - the min impurity decrease (default: 0.0)public B bootstrap(boolean bootstrap)
bootstrap - the bootstrap (default: true)public B oobScore(boolean oobScore)
oobScore - the oob score (default: false)public B jobs(int jobs)
jobs - the number of jobs (default: 1)public B seed(Integer seed)
seed - the seed (default: null)public B verbose(boolean verbose)
verbose - the verbose mode (default: false)public B warmStart(boolean warmStart)
warmStart - the warm start (default: false)public B classWeight(ClassWeightType classWeight)
classWeight - the class weight (ClassWeightType) (default: null)public B modelName(String name)
BasePythonClassifier.BuildermodelName in class BasePythonClassifier.Builder<RandomForestClassifier.Builder<B extends RandomForestClassifier.Builder,T extends RandomForestClassifier>,T extends RandomForestClassifier>name - the model name (String)public T build()
BasePythonClassifier.Builderbuild in class BasePythonClassifier.Builder<RandomForestClassifier.Builder<B extends RandomForestClassifier.Builder,T extends RandomForestClassifier>,T extends RandomForestClassifier>Copyright © 2020. All rights reserved.