public final class GBTRegressor extends Predictor<Vector,GBTRegressor,GBTRegressionModel> implements Logging
Gradient-Boosted Trees (GBTs)
learning algorithm for regression.
It supports both continuous and categorical features.Constructor and Description |
---|
GBTRegressor() |
GBTRegressor(java.lang.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.
|
java.lang.String |
getLossType() |
Param<java.lang.String> |
lossType()
Loss function which GBT tries to minimize.
|
GBTRegressor |
setCacheNodeIds(boolean value) |
GBTRegressor |
setCheckpointInterval(int value) |
GBTRegressor |
setImpurity(java.lang.String value)
The impurity setting is ignored for GBT models.
|
GBTRegressor |
setLossType(java.lang.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) |
static java.lang.String[] |
supportedLossTypes()
Accessor for supported loss settings: squared (L2), absolute (L1)
|
protected GBTRegressionModel |
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
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
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
public GBTRegressor(java.lang.String uid)
public GBTRegressor()
public static final java.lang.String[] supportedLossTypes()
public java.lang.String uid()
Identifiable
uid
in interface Identifiable
public GBTRegressor setMaxDepth(int value)
public GBTRegressor setMaxBins(int value)
public GBTRegressor setMinInstancesPerNode(int value)
public GBTRegressor setMinInfoGain(double value)
public GBTRegressor setMaxMemoryInMB(int value)
public GBTRegressor setCacheNodeIds(boolean value)
public GBTRegressor setCheckpointInterval(int value)
public GBTRegressor setImpurity(java.lang.String value)
value
- (undocumented)public GBTRegressor setSubsamplingRate(double value)
public GBTRegressor setSeed(long value)
public GBTRegressor setMaxIter(int value)
public GBTRegressor setStepSize(double value)
public Param<java.lang.String> lossType()
public GBTRegressor setLossType(java.lang.String value)
public java.lang.String getLossType()
protected GBTRegressionModel train(DataFrame dataset)
Predictor
fit()
to avoid dealing with schema validation
and copying parameters into the model.
train
in class Predictor<Vector,GBTRegressor,GBTRegressionModel>
dataset
- Training datasetpublic GBTRegressor copy(ParamMap extra)
Params
copy
in interface Params
copy
in class Predictor<Vector,GBTRegressor,GBTRegressionModel>
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.