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, transformSchemaequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertToOldLossType, getLossType, getOldLossType, lossTypegetOldBoostingStrategy, getValidationTol, stepSize, validationTolfeatureSubsetStrategy, getFeatureSubsetStrategy, getOldStrategy, getSubsamplingRate, subsamplingRatecacheNodeIds, getCacheNodeIds, getMaxBins, getMaxDepth, getMaxMemoryInMB, getMinInfoGain, getMinInstancesPerNode, getOldStrategy, maxBins, maxDepth, maxMemoryInMB, minInfoGain, minInstancesPerNodevalidateAndTransformSchemagetLabelCol, labelColfeaturesCol, getFeaturesColgetPredictionCol, predictionColclear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwntoStringcheckpointInterval, getCheckpointIntervalgetMaxIter, maxItergetStepSizegetValidationIndicatorCol, validationIndicatorColgetImpurity, getOldImpurity, impuritywritesaveinitializeLogging, initializeLogIfNecessary, initializeLogIfNecessary, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarningpublic static final String[] supportedLossTypes()
public static GBTRegressor load(String path)
public static MLReader<T> read()
public String uid()
Identifiableuid in interface Identifiablepublic GBTRegressor setMaxDepth(int value)
setMaxDepth in interface DecisionTreeParamsvalue - (undocumented)public GBTRegressor setMaxBins(int value)
setMaxBins in interface DecisionTreeParamsvalue - (undocumented)public GBTRegressor setMinInstancesPerNode(int value)
setMinInstancesPerNode in interface DecisionTreeParamsvalue - (undocumented)public GBTRegressor setMinInfoGain(double value)
setMinInfoGain in interface DecisionTreeParamsvalue - (undocumented)public GBTRegressor setMaxMemoryInMB(int value)
setMaxMemoryInMB in interface DecisionTreeParamsvalue - (undocumented)public GBTRegressor setCacheNodeIds(boolean value)
setCacheNodeIds in interface DecisionTreeParamsvalue - (undocumented)public GBTRegressor setCheckpointInterval(int value)
SparkContext.
Must be at least 1.
(default = 10)setCheckpointInterval in interface DecisionTreeParamsvalue - (undocumented)public GBTRegressor setImpurity(String value)
setImpurity in interface TreeRegressorParamsvalue - (undocumented)public GBTRegressor setSubsamplingRate(double value)
setSubsamplingRate in interface TreeEnsembleParamsvalue - (undocumented)public GBTRegressor setSeed(long value)
setSeed in interface DecisionTreeParamsvalue - (undocumented)public GBTRegressor setMaxIter(int value)
setMaxIter in interface GBTParamsvalue - (undocumented)public GBTRegressor setStepSize(double value)
setStepSize in interface GBTParamsvalue - (undocumented)public GBTRegressor setLossType(String value)
public GBTRegressor setFeatureSubsetStrategy(String value)
setFeatureSubsetStrategy in interface TreeEnsembleParamsvalue - (undocumented)public GBTRegressor setValidationIndicatorCol(String value)
public GBTRegressor copy(ParamMap extra)
ParamsdefaultCopy().copy in interface Paramscopy in class Predictor<Vector,GBTRegressor,GBTRegressionModel>extra - (undocumented)