public final class DecisionTreeRegressor extends Predictor<Vector,DecisionTreeRegressor,DecisionTreeRegressionModel>
Decision tree
learning algorithm
for regression.
It supports both continuous and categorical features.Constructor and Description |
---|
DecisionTreeRegressor() |
DecisionTreeRegressor(java.lang.String uid) |
Modifier and Type | Method and Description |
---|---|
DecisionTreeRegressor |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
DecisionTreeRegressor |
setCacheNodeIds(boolean value) |
DecisionTreeRegressor |
setCheckpointInterval(int value) |
DecisionTreeRegressor |
setImpurity(java.lang.String value) |
DecisionTreeRegressor |
setMaxBins(int value) |
DecisionTreeRegressor |
setMaxDepth(int value) |
DecisionTreeRegressor |
setMaxMemoryInMB(int value) |
DecisionTreeRegressor |
setMinInfoGain(double value) |
DecisionTreeRegressor |
setMinInstancesPerNode(int value) |
static java.lang.String[] |
supportedImpurities()
Accessor for supported impurities: variance
|
protected DecisionTreeRegressionModel |
train(DataFrame dataset)
Train a model using the given dataset and parameters.
|
java.lang.String |
uid()
An immutable unique ID for the object and its derivatives.
|
StructType |
validateAndTransformSchema(StructType schema,
boolean fitting,
DataType featuresDataType)
Validates and transforms the input schema with the provided param map.
|
extractLabeledPoints, fit, setFeaturesCol, setLabelCol, setPredictionCol, transformSchema
transformSchema
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn, validateParams
toString
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public DecisionTreeRegressor(java.lang.String uid)
public DecisionTreeRegressor()
public static final java.lang.String[] supportedImpurities()
public java.lang.String uid()
Identifiable
public DecisionTreeRegressor setMaxDepth(int value)
public DecisionTreeRegressor setMaxBins(int value)
public DecisionTreeRegressor setMinInstancesPerNode(int value)
public DecisionTreeRegressor setMinInfoGain(double value)
public DecisionTreeRegressor setMaxMemoryInMB(int value)
public DecisionTreeRegressor setCacheNodeIds(boolean value)
public DecisionTreeRegressor setCheckpointInterval(int value)
public DecisionTreeRegressor setImpurity(java.lang.String value)
protected DecisionTreeRegressionModel train(DataFrame dataset)
Predictor
fit()
to avoid dealing with schema validation
and copying parameters into the model.
train
in class Predictor<Vector,DecisionTreeRegressor,DecisionTreeRegressionModel>
dataset
- Training datasetpublic DecisionTreeRegressor copy(ParamMap extra)
Params
copy
in interface Params
copy
in class Predictor<Vector,DecisionTreeRegressor,DecisionTreeRegressionModel>
extra
- (undocumented)defaultCopy()
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.