org.apache.spark.ml.regression
Class GBTRegressor

Object
  extended by org.apache.spark.ml.PipelineStage
      extended by org.apache.spark.ml.Estimator<M>
          extended by org.apache.spark.ml.Predictor<Vector,GBTRegressor,GBTRegressionModel>
              extended by org.apache.spark.ml.regression.GBTRegressor
All Implemented Interfaces:
java.io.Serializable, Logging, Params

public final class GBTRegressor
extends Predictor<Vector,GBTRegressor,GBTRegressionModel>
implements Logging

:: Experimental :: Gradient-Boosted Trees (GBTs) learning algorithm for regression. It supports both continuous and categorical features.

See Also:
Serialized Form

Constructor Summary
GBTRegressor()
           
GBTRegressor(String uid)
           
 
Method Summary
 GBTRegressor copy(ParamMap extra)
          Creates a copy of this instance with the same UID and some extra params.
 String getLossType()
           
 Param<String> lossType()
          Loss function which GBT tries to minimize.
 GBTRegressor setCacheNodeIds(boolean value)
           
 GBTRegressor setCheckpointInterval(int 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)
           
static String[] supportedLossTypes()
          Accessor for supported loss settings: squared (L2), absolute (L1)
 String uid()
           
 StructType validateAndTransformSchema(StructType schema, boolean fitting, DataType featuresDataType)
          Validates and transforms the input schema with the provided param map.
 
Methods inherited from class org.apache.spark.ml.Predictor
fit, setFeaturesCol, setLabelCol, setPredictionCol, transformSchema
 
Methods inherited from class org.apache.spark.ml.Estimator
fit, fit, fit, fit
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.spark.Logging
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
 
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
 

Constructor Detail

GBTRegressor

public GBTRegressor(String uid)

GBTRegressor

public GBTRegressor()
Method Detail

supportedLossTypes

public static final String[] supportedLossTypes()
Accessor for supported loss settings: squared (L2), absolute (L1)


uid

public String uid()

setMaxDepth

public GBTRegressor setMaxDepth(int value)

setMaxBins

public GBTRegressor setMaxBins(int value)

setMinInstancesPerNode

public GBTRegressor setMinInstancesPerNode(int value)

setMinInfoGain

public GBTRegressor setMinInfoGain(double value)

setMaxMemoryInMB

public GBTRegressor setMaxMemoryInMB(int value)

setCacheNodeIds

public GBTRegressor setCacheNodeIds(boolean value)

setCheckpointInterval

public GBTRegressor setCheckpointInterval(int value)

setImpurity

public GBTRegressor setImpurity(String value)
The impurity setting is ignored for GBT models. Individual trees are built using impurity "Variance."

Parameters:
value - (undocumented)
Returns:
(undocumented)

setSubsamplingRate

public GBTRegressor setSubsamplingRate(double value)

setSeed

public GBTRegressor setSeed(long value)

setMaxIter

public GBTRegressor setMaxIter(int value)

setStepSize

public GBTRegressor setStepSize(double value)

lossType

public Param<String> lossType()
Loss function which GBT tries to minimize. (case-insensitive) Supported: "squared" (L2) and "absolute" (L1) (default = squared)

Returns:
(undocumented)

setLossType

public GBTRegressor setLossType(String value)

getLossType

public String getLossType()

copy

public GBTRegressor 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,GBTRegressor,GBTRegressionModel>
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 schema
fitting - whether this is in fitting
featuresDataType - SQL DataType for FeaturesType. E.g., VectorUDT for vector features.
Returns:
output schema