public class DecisionTreeClassifier extends ProbabilisticClassifier<Vector,DecisionTreeClassifier,DecisionTreeClassificationModel> implements DecisionTreeClassifierParams, DefaultParamsWritable
Constructor and Description |
---|
DecisionTreeClassifier() |
DecisionTreeClassifier(String uid) |
Modifier and Type | Method and Description |
---|---|
DecisionTreeClassifier |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
static DecisionTreeClassifier |
load(String path) |
static MLReader<T> |
read() |
DecisionTreeClassifier |
setCacheNodeIds(boolean value) |
DecisionTreeClassifier |
setCheckpointInterval(int value)
Specifies how often to checkpoint the cached node IDs.
|
DecisionTreeClassifier |
setImpurity(String value) |
DecisionTreeClassifier |
setMaxBins(int value) |
DecisionTreeClassifier |
setMaxDepth(int value) |
DecisionTreeClassifier |
setMaxMemoryInMB(int value) |
DecisionTreeClassifier |
setMinInfoGain(double value) |
DecisionTreeClassifier |
setMinInstancesPerNode(int value) |
DecisionTreeClassifier |
setSeed(long value) |
static String[] |
supportedImpurities()
Accessor for supported impurities: 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
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 DecisionTreeClassifier(String uid)
public DecisionTreeClassifier()
public static final String[] supportedImpurities()
public static DecisionTreeClassifier load(String path)
public static MLReader<T> read()
public String uid()
Identifiable
uid
in interface Identifiable
public DecisionTreeClassifier setMaxDepth(int value)
setMaxDepth
in interface DecisionTreeParams
value
- (undocumented)public DecisionTreeClassifier setMaxBins(int value)
setMaxBins
in interface DecisionTreeParams
value
- (undocumented)public DecisionTreeClassifier setMinInstancesPerNode(int value)
setMinInstancesPerNode
in interface DecisionTreeParams
value
- (undocumented)public DecisionTreeClassifier setMinInfoGain(double value)
setMinInfoGain
in interface DecisionTreeParams
value
- (undocumented)public DecisionTreeClassifier setMaxMemoryInMB(int value)
setMaxMemoryInMB
in interface DecisionTreeParams
value
- (undocumented)public DecisionTreeClassifier setCacheNodeIds(boolean value)
setCacheNodeIds
in interface DecisionTreeParams
value
- (undocumented)public DecisionTreeClassifier setCheckpointInterval(int value)
SparkContext
.
Must be at least 1.
(default = 10)setCheckpointInterval
in interface DecisionTreeParams
value
- (undocumented)public DecisionTreeClassifier setImpurity(String value)
setImpurity
in interface TreeClassifierParams
value
- (undocumented)public DecisionTreeClassifier setSeed(long value)
setSeed
in interface DecisionTreeParams
value
- (undocumented)public DecisionTreeClassifier copy(ParamMap extra)
Params
defaultCopy()
.copy
in interface Params
copy
in class Predictor<Vector,DecisionTreeClassifier,DecisionTreeClassificationModel>
extra
- (undocumented)