public final class GBTClassifier extends Predictor<Vector,GBTClassifier,GBTClassificationModel> implements Logging
Gradient-Boosted Trees (GBTs)
learning algorithm for classification.
It supports binary labels, as well as both continuous and categorical features.
Note: Multiclass labels are not currently supported.Constructor and Description |
---|
GBTClassifier() |
GBTClassifier(java.lang.String uid) |
Modifier and Type | Method and Description |
---|---|
GBTClassifier |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
Param<java.lang.String> |
featuresCol()
Param for features column name.
|
java.lang.String |
getFeaturesCol() |
java.lang.String |
getLabelCol() |
java.lang.String |
getLossType() |
java.lang.String |
getPredictionCol() |
Param<java.lang.String> |
labelCol()
Param for label column name.
|
Param<java.lang.String> |
lossType()
Loss function which GBT tries to minimize.
|
Param<java.lang.String> |
predictionCol()
Param for prediction column name.
|
GBTClassifier |
setCacheNodeIds(boolean value) |
GBTClassifier |
setCheckpointInterval(int value) |
GBTClassifier |
setImpurity(java.lang.String value)
The impurity setting is ignored for GBT models.
|
GBTClassifier |
setLossType(java.lang.String value) |
GBTClassifier |
setMaxBins(int value) |
GBTClassifier |
setMaxDepth(int value) |
GBTClassifier |
setMaxIter(int value) |
GBTClassifier |
setMaxMemoryInMB(int value) |
GBTClassifier |
setMinInfoGain(double value) |
GBTClassifier |
setMinInstancesPerNode(int value) |
GBTClassifier |
setSeed(long value) |
GBTClassifier |
setStepSize(double value) |
GBTClassifier |
setSubsamplingRate(double value) |
static java.lang.String[] |
supportedLossTypes()
Accessor for supported loss settings: logistic
|
protected GBTClassificationModel |
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 GBTClassifier(java.lang.String uid)
public GBTClassifier()
public static final java.lang.String[] supportedLossTypes()
public java.lang.String uid()
Identifiable
uid
in interface Identifiable
public GBTClassifier setMaxDepth(int value)
public GBTClassifier setMaxBins(int value)
public GBTClassifier setMinInstancesPerNode(int value)
public GBTClassifier setMinInfoGain(double value)
public GBTClassifier setMaxMemoryInMB(int value)
public GBTClassifier setCacheNodeIds(boolean value)
public GBTClassifier setCheckpointInterval(int value)
public GBTClassifier setImpurity(java.lang.String value)
value
- (undocumented)public GBTClassifier setSubsamplingRate(double value)
public GBTClassifier setSeed(long value)
public GBTClassifier setMaxIter(int value)
public GBTClassifier setStepSize(double value)
public Param<java.lang.String> lossType()
public GBTClassifier setLossType(java.lang.String value)
public java.lang.String getLossType()
protected GBTClassificationModel train(DataFrame dataset)
Predictor
fit()
to avoid dealing with schema validation
and copying parameters into the model.
train
in class Predictor<Vector,GBTClassifier,GBTClassificationModel>
dataset
- Training datasetpublic GBTClassifier copy(ParamMap extra)
Params
copy
in interface Params
copy
in class Predictor<Vector,GBTClassifier,GBTClassificationModel>
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.public Param<java.lang.String> labelCol()
public java.lang.String getLabelCol()
public Param<java.lang.String> featuresCol()
public java.lang.String getFeaturesCol()
public Param<java.lang.String> predictionCol()
public java.lang.String getPredictionCol()