public class DecisionTreeRegressor extends Regressor<Vector,DecisionTreeRegressor,DecisionTreeRegressionModel> implements DecisionTreeRegressorParams, DefaultParamsWritable
| Constructor and Description |
|---|
DecisionTreeRegressor() |
DecisionTreeRegressor(String uid) |
| Modifier and Type | Method and Description |
|---|---|
BooleanParam |
cacheNodeIds()
If false, the algorithm will pass trees to executors to match instances with nodes.
|
IntParam |
checkpointInterval()
Param for set checkpoint interval (>= 1) or disable checkpoint (-1).
|
DecisionTreeRegressor |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
Param<String> |
impurity()
Criterion used for information gain calculation (case-insensitive).
|
Param<String> |
leafCol()
Leaf indices column name.
|
static DecisionTreeRegressor |
load(String path) |
IntParam |
maxBins()
Maximum number of bins used for discretizing continuous features and for choosing how to split
on features at each node.
|
IntParam |
maxDepth()
Maximum depth of the tree (nonnegative).
|
IntParam |
maxMemoryInMB()
Maximum memory in MB allocated to histogram aggregation.
|
DoubleParam |
minInfoGain()
Minimum information gain for a split to be considered at a tree node.
|
IntParam |
minInstancesPerNode()
Minimum number of instances each child must have after split.
|
DoubleParam |
minWeightFractionPerNode()
Minimum fraction of the weighted sample count that each child must have after split.
|
static MLReader<T> |
read() |
LongParam |
seed()
Param for random seed.
|
DecisionTreeRegressor |
setCacheNodeIds(boolean value) |
DecisionTreeRegressor |
setCheckpointInterval(int value)
Specifies how often to checkpoint the cached node IDs.
|
DecisionTreeRegressor |
setImpurity(String value) |
DecisionTreeRegressor |
setMaxBins(int value) |
DecisionTreeRegressor |
setMaxDepth(int value) |
DecisionTreeRegressor |
setMaxMemoryInMB(int value) |
DecisionTreeRegressor |
setMinInfoGain(double value) |
DecisionTreeRegressor |
setMinInstancesPerNode(int value) |
DecisionTreeRegressor |
setMinWeightFractionPerNode(double value) |
DecisionTreeRegressor |
setSeed(long value) |
DecisionTreeRegressor |
setVarianceCol(String value) |
DecisionTreeRegressor |
setWeightCol(String value)
Sets the value of param
weightCol. |
static String[] |
supportedImpurities()
Accessor for supported impurities: variance
|
String |
uid()
An immutable unique ID for the object and its derivatives.
|
Param<String> |
varianceCol()
Param for Column name for the biased sample variance of prediction.
|
Param<String> |
weightCol()
Param for weight column name.
|
featuresCol, fit, labelCol, predictionCol, setFeaturesCol, setLabelCol, setPredictionCol, transformSchemaparamsequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitvalidateAndTransformSchemagetCacheNodeIds, getLeafCol, getMaxBins, getMaxDepth, getMaxMemoryInMB, getMinInfoGain, getMinInstancesPerNode, getMinWeightFractionPerNode, getOldStrategy, setLeafColextractInstances, extractInstancesgetLabelCol, labelColfeaturesCol, getFeaturesColgetPredictionCol, predictionColclear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, onParamChange, paramMap, params, set, set, set, setDefault, setDefault, shouldOwntoStringgetCheckpointIntervalgetWeightColgetImpurity, getOldImpuritygetVarianceColwritesave$init$, initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, initLock, isTraceEnabled, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning, org$apache$spark$internal$Logging$$log__$eq, org$apache$spark$internal$Logging$$log_, uninitializepublic DecisionTreeRegressor(String uid)
public DecisionTreeRegressor()
public static final String[] supportedImpurities()
public static DecisionTreeRegressor load(String path)
public static MLReader<T> read()
public final Param<String> varianceCol()
HasVarianceColvarianceCol in interface HasVarianceColpublic final Param<String> impurity()
HasVarianceImpurityimpurity in interface HasVarianceImpuritypublic final Param<String> leafCol()
DecisionTreeParamsleafCol in interface DecisionTreeParamspublic final IntParam maxDepth()
DecisionTreeParamsmaxDepth in interface DecisionTreeParamspublic final IntParam maxBins()
DecisionTreeParamsmaxBins in interface DecisionTreeParamspublic final IntParam minInstancesPerNode()
DecisionTreeParamsminInstancesPerNode in interface DecisionTreeParamspublic final DoubleParam minWeightFractionPerNode()
DecisionTreeParamsminWeightFractionPerNode in interface DecisionTreeParamspublic final DoubleParam minInfoGain()
DecisionTreeParamsminInfoGain in interface DecisionTreeParamspublic final IntParam maxMemoryInMB()
DecisionTreeParamsmaxMemoryInMB in interface DecisionTreeParamspublic final BooleanParam cacheNodeIds()
DecisionTreeParamscacheNodeIds in interface DecisionTreeParamspublic final Param<String> weightCol()
HasWeightColweightCol in interface HasWeightColpublic final LongParam seed()
HasSeedpublic final IntParam checkpointInterval()
HasCheckpointIntervalcheckpointInterval in interface HasCheckpointIntervalpublic String uid()
Identifiableuid in interface Identifiablepublic DecisionTreeRegressor setMaxDepth(int value)
public DecisionTreeRegressor setMaxBins(int value)
public DecisionTreeRegressor setMinInstancesPerNode(int value)
public DecisionTreeRegressor setMinWeightFractionPerNode(double value)
public DecisionTreeRegressor setMinInfoGain(double value)
public DecisionTreeRegressor setMaxMemoryInMB(int value)
public DecisionTreeRegressor setCacheNodeIds(boolean value)
public DecisionTreeRegressor setCheckpointInterval(int value)
SparkContext.
Must be at least 1.
(default = 10)value - (undocumented)public DecisionTreeRegressor setImpurity(String value)
public DecisionTreeRegressor setSeed(long value)
public DecisionTreeRegressor setVarianceCol(String value)
public DecisionTreeRegressor setWeightCol(String value)
weightCol.
If this is not set or empty, we treat all instance weights as 1.0.
Default is not set, so all instances have weight one.
value - (undocumented)public DecisionTreeRegressor copy(ParamMap extra)
ParamsdefaultCopy().copy in interface Paramscopy in class Predictor<Vector,DecisionTreeRegressor,DecisionTreeRegressionModel>extra - (undocumented)