public class GBTRegressor extends Predictor<Vector,GBTRegressor,GBTRegressionModel> implements GBTRegressorParams, DefaultParamsWritable, Logging
The implementation is based upon: J.H. Friedman. "Stochastic Gradient Boosting." 1999.
Notes on Gradient Boosting vs. TreeBoost: - This implementation is for Stochastic Gradient Boosting, not for TreeBoost. - Both algorithms learn tree ensembles by minimizing loss functions. - TreeBoost (Friedman, 1999) additionally modifies the outputs at tree leaf nodes based on the loss function, whereas the original gradient boosting method does not. - When the loss is SquaredError, these methods give the same result, but they could differ for other loss functions. - We expect to implement TreeBoost in the future: [https://issues.apache.org/jira/browse/SPARK-4240]
Constructor and Description |
---|
GBTRegressor() |
GBTRegressor(String uid) |
Modifier and Type | Method and Description |
---|---|
GBTRegressor |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
static GBTRegressor |
load(String path) |
static MLReader<T> |
read() |
GBTRegressor |
setCacheNodeIds(boolean value) |
GBTRegressor |
setCheckpointInterval(int value)
Specifies how often to checkpoint the cached node IDs.
|
GBTRegressor |
setFeatureSubsetStrategy(String value) |
GBTRegressor |
setImpurity(String value)
The impurity setting is ignored for GBT models.
|
GBTRegressor |
setLossType(String value) |
GBTRegressor |
setMaxBins(int value) |
GBTRegressor |
setMaxDepth(int value) |
GBTRegressor |
setMaxIter(int value) |
GBTRegressor |
setMaxMemoryInMB(int value) |
GBTRegressor |
setMinInfoGain(double value) |
GBTRegressor |
setMinInstancesPerNode(int value) |
GBTRegressor |
setSeed(long value) |
GBTRegressor |
setStepSize(double value) |
GBTRegressor |
setSubsamplingRate(double value) |
GBTRegressor |
setValidationIndicatorCol(String value) |
static String[] |
supportedLossTypes()
Accessor for supported loss settings: squared (L2), absolute (L1)
|
String |
uid()
An immutable unique ID for the object and its derivatives.
|
fit, setFeaturesCol, setLabelCol, setPredictionCol, transformSchema
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convertToOldLossType, getLossType, getOldLossType, lossType
getOldBoostingStrategy, getValidationTol, stepSize, validationTol
featureSubsetStrategy, getFeatureSubsetStrategy, getOldStrategy, getSubsamplingRate, subsamplingRate
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
getMaxIter, maxIter
getStepSize
getValidationIndicatorCol, validationIndicatorCol
getImpurity, getOldImpurity, impurity
write
save
initializeLogging, initializeLogIfNecessary, initializeLogIfNecessary, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public static final String[] supportedLossTypes()
public static GBTRegressor load(String path)
public static MLReader<T> read()
public String uid()
Identifiable
uid
in interface Identifiable
public GBTRegressor setMaxDepth(int value)
setMaxDepth
in interface DecisionTreeParams
value
- (undocumented)public GBTRegressor setMaxBins(int value)
setMaxBins
in interface DecisionTreeParams
value
- (undocumented)public GBTRegressor setMinInstancesPerNode(int value)
setMinInstancesPerNode
in interface DecisionTreeParams
value
- (undocumented)public GBTRegressor setMinInfoGain(double value)
setMinInfoGain
in interface DecisionTreeParams
value
- (undocumented)public GBTRegressor setMaxMemoryInMB(int value)
setMaxMemoryInMB
in interface DecisionTreeParams
value
- (undocumented)public GBTRegressor setCacheNodeIds(boolean value)
setCacheNodeIds
in interface DecisionTreeParams
value
- (undocumented)public GBTRegressor setCheckpointInterval(int value)
SparkContext
.
Must be at least 1.
(default = 10)setCheckpointInterval
in interface DecisionTreeParams
value
- (undocumented)public GBTRegressor setImpurity(String value)
setImpurity
in interface TreeRegressorParams
value
- (undocumented)public GBTRegressor setSubsamplingRate(double value)
setSubsamplingRate
in interface TreeEnsembleParams
value
- (undocumented)public GBTRegressor setSeed(long value)
setSeed
in interface DecisionTreeParams
value
- (undocumented)public GBTRegressor setMaxIter(int value)
setMaxIter
in interface GBTParams
value
- (undocumented)public GBTRegressor setStepSize(double value)
setStepSize
in interface GBTParams
value
- (undocumented)public GBTRegressor setLossType(String value)
public GBTRegressor setFeatureSubsetStrategy(String value)
setFeatureSubsetStrategy
in interface TreeEnsembleParams
value
- (undocumented)public GBTRegressor setValidationIndicatorCol(String value)
public GBTRegressor copy(ParamMap extra)
Params
defaultCopy()
.copy
in interface Params
copy
in class Predictor<Vector,GBTRegressor,GBTRegressionModel>
extra
- (undocumented)