public final class RandomForestClassifier extends Predictor<Vector,RandomForestClassifier,RandomForestClassificationModel>
Random Forest
learning algorithm for
classification.
It supports both binary and multiclass labels, as well as both continuous and categorical
features.Constructor and Description |
---|
RandomForestClassifier() |
RandomForestClassifier(String uid) |
copy, fit, setFeaturesCol, setLabelCol, setPredictionCol, transformSchema
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, copyValues, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, setDefault, shouldOwn, validateParams
initializeIfNecessary, initializeLogging, 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 String uid()
public RandomForestClassifier setMaxDepth(int value)
public RandomForestClassifier setMaxBins(int value)
public RandomForestClassifier setMinInstancesPerNode(int value)
public RandomForestClassifier setMinInfoGain(double value)
public RandomForestClassifier setMaxMemoryInMB(int value)
public RandomForestClassifier setCacheNodeIds(boolean value)
public RandomForestClassifier setCheckpointInterval(int value)
public RandomForestClassifier setImpurity(String value)
public RandomForestClassifier setSubsamplingRate(double value)
public RandomForestClassifier setSeed(long value)
public RandomForestClassifier setNumTrees(int value)
public RandomForestClassifier setFeatureSubsetStrategy(String value)
public StructType validateAndTransformSchema(StructType schema, boolean fitting, DataType featuresDataType)
schema
- input schemafitting
- whether this is in fittingfeaturesDataType
- SQL DataType for FeaturesType.
E.g., VectorUDT
for vector features.