public class RandomForestClassifier extends ProbabilisticClassifier<Vector,RandomForestClassifier,RandomForestClassificationModel> implements RandomForestClassifierParams, DefaultParamsWritable
Constructor and Description |
---|
RandomForestClassifier() |
RandomForestClassifier(String uid) |
Modifier and Type | Method and Description |
---|---|
RandomForestClassifier |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
static RandomForestClassifier |
load(String path) |
static MLReader<T> |
read() |
RandomForestClassifier |
setCacheNodeIds(boolean value) |
RandomForestClassifier |
setCheckpointInterval(int value)
Specifies how often to checkpoint the cached node IDs.
|
RandomForestClassifier |
setFeatureSubsetStrategy(String value) |
RandomForestClassifier |
setImpurity(String value) |
RandomForestClassifier |
setMaxBins(int value) |
RandomForestClassifier |
setMaxDepth(int value) |
RandomForestClassifier |
setMaxMemoryInMB(int value) |
RandomForestClassifier |
setMinInfoGain(double value) |
RandomForestClassifier |
setMinInstancesPerNode(int value) |
RandomForestClassifier |
setNumTrees(int value) |
RandomForestClassifier |
setSeed(long value) |
RandomForestClassifier |
setSubsamplingRate(double value) |
static String[] |
supportedFeatureSubsetStrategies()
Accessor for supported featureSubsetStrategy settings: auto, all, onethird, sqrt, log2
|
static String[] |
supportedImpurities()
Accessor for supported impurity settings: entropy, gini
|
String |
uid()
An immutable unique ID for the object and its derivatives.
|
setProbabilityCol, setThresholds
setRawPredictionCol
fit, setFeaturesCol, setLabelCol, setPredictionCol, transformSchema
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNumTrees, numTrees
featureSubsetStrategy, getFeatureSubsetStrategy, getOldStrategy, getSubsamplingRate, subsamplingRate
cacheNodeIds, getCacheNodeIds, getMaxBins, getMaxDepth, getMaxMemoryInMB, getMinInfoGain, getMinInstancesPerNode, getOldStrategy, maxBins, maxDepth, maxMemoryInMB, minInfoGain, minInstancesPerNode
validateAndTransformSchema
getLabelCol, labelCol
featuresCol, getFeaturesCol
getPredictionCol, predictionCol
clear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn
toString
checkpointInterval, getCheckpointInterval
getImpurity, getOldImpurity, impurity
write
save
validateAndTransformSchema
getRawPredictionCol, rawPredictionCol
getProbabilityCol, probabilityCol
getThresholds, thresholds
initializeLogging, initializeLogIfNecessary, initializeLogIfNecessary, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public RandomForestClassifier(String uid)
public RandomForestClassifier()
public static final String[] supportedImpurities()
public static final String[] supportedFeatureSubsetStrategies()
public static RandomForestClassifier load(String path)
public static MLReader<T> read()
public String uid()
Identifiable
uid
in interface Identifiable
public RandomForestClassifier setMaxDepth(int value)
setMaxDepth
in interface DecisionTreeParams
value
- (undocumented)public RandomForestClassifier setMaxBins(int value)
setMaxBins
in interface DecisionTreeParams
value
- (undocumented)public RandomForestClassifier setMinInstancesPerNode(int value)
setMinInstancesPerNode
in interface DecisionTreeParams
value
- (undocumented)public RandomForestClassifier setMinInfoGain(double value)
setMinInfoGain
in interface DecisionTreeParams
value
- (undocumented)public RandomForestClassifier setMaxMemoryInMB(int value)
setMaxMemoryInMB
in interface DecisionTreeParams
value
- (undocumented)public RandomForestClassifier setCacheNodeIds(boolean value)
setCacheNodeIds
in interface DecisionTreeParams
value
- (undocumented)public RandomForestClassifier setCheckpointInterval(int value)
SparkContext
.
Must be at least 1.
(default = 10)setCheckpointInterval
in interface DecisionTreeParams
value
- (undocumented)public RandomForestClassifier setImpurity(String value)
setImpurity
in interface TreeClassifierParams
value
- (undocumented)public RandomForestClassifier setSubsamplingRate(double value)
setSubsamplingRate
in interface TreeEnsembleParams
value
- (undocumented)public RandomForestClassifier setSeed(long value)
setSeed
in interface DecisionTreeParams
value
- (undocumented)public RandomForestClassifier setNumTrees(int value)
setNumTrees
in interface RandomForestParams
value
- (undocumented)public RandomForestClassifier setFeatureSubsetStrategy(String value)
setFeatureSubsetStrategy
in interface TreeEnsembleParams
value
- (undocumented)public RandomForestClassifier copy(ParamMap extra)
Params
defaultCopy()
.copy
in interface Params
copy
in class Predictor<Vector,RandomForestClassifier,RandomForestClassificationModel>
extra
- (undocumented)