org.apache.spark.ml.regression
Class DecisionTreeRegressor
Object
org.apache.spark.ml.PipelineStage
org.apache.spark.ml.Estimator<M>
org.apache.spark.ml.Predictor<Vector,DecisionTreeRegressor,DecisionTreeRegressionModel>
org.apache.spark.ml.regression.DecisionTreeRegressor
- All Implemented Interfaces:
- java.io.Serializable, Logging, Params
public final class DecisionTreeRegressor
- extends Predictor<Vector,DecisionTreeRegressor,DecisionTreeRegressionModel>
:: Experimental ::
Decision tree
learning algorithm
for regression.
It supports both continuous and categorical features.
- See Also:
- Serialized Form
Methods inherited from class Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.spark.ml.param.Params |
clear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, setDefault, shouldOwn, validateParams |
Methods inherited from interface org.apache.spark.Logging |
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning |
DecisionTreeRegressor
public DecisionTreeRegressor(String uid)
DecisionTreeRegressor
public DecisionTreeRegressor()
supportedImpurities
public static final String[] supportedImpurities()
- Accessor for supported impurities: variance
uid
public String uid()
setMaxDepth
public DecisionTreeRegressor setMaxDepth(int value)
setMaxBins
public DecisionTreeRegressor setMaxBins(int value)
setMinInstancesPerNode
public DecisionTreeRegressor setMinInstancesPerNode(int value)
setMinInfoGain
public DecisionTreeRegressor setMinInfoGain(double value)
setMaxMemoryInMB
public DecisionTreeRegressor setMaxMemoryInMB(int value)
setCacheNodeIds
public DecisionTreeRegressor setCacheNodeIds(boolean value)
setCheckpointInterval
public DecisionTreeRegressor setCheckpointInterval(int value)
setImpurity
public DecisionTreeRegressor setImpurity(String value)
copy
public DecisionTreeRegressor copy(ParamMap extra)
- Description copied from interface:
Params
- Creates a copy of this instance with the same UID and some extra params.
Subclasses should implement this method and set the return type properly.
- Specified by:
copy
in interface Params
- Specified by:
copy
in class Predictor<Vector,DecisionTreeRegressor,DecisionTreeRegressionModel>
- Parameters:
extra
- (undocumented)
- Returns:
- (undocumented)
- See Also:
defaultCopy()
validateAndTransformSchema
public StructType validateAndTransformSchema(StructType schema,
boolean fitting,
DataType featuresDataType)
- Validates and transforms the input schema with the provided param map.
- Parameters:
schema
- input schemafitting
- whether this is in fittingfeaturesDataType
- SQL DataType for FeaturesType.
E.g., VectorUDT
for vector features.
- Returns:
- output schema