public final class DecisionTreeClassificationModel extends ProbabilisticClassificationModel<Vector,DecisionTreeClassificationModel> implements scala.Serializable
Decision tree model for classification.
It supports both binary and multiclass labels, as well as both continuous and categorical
features.| Modifier and Type | Method and Description |
|---|---|
DecisionTreeClassificationModel |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
Param<String> |
featuresCol()
Param for features column name.
|
static DecisionTreeClassificationModel |
fromOld(DecisionTreeModel oldModel,
DecisionTreeClassifier parent,
scala.collection.immutable.Map<Object,Object> categoricalFeatures,
int numFeatures)
(private[ml]) Convert a model from the old API
|
String |
getFeaturesCol() |
String |
getLabelCol() |
String |
getPredictionCol() |
String |
getRawPredictionCol() |
Param<String> |
labelCol()
Param for label column name.
|
int |
numClasses()
Number of classes (values which the label can take).
|
int |
numFeatures()
Returns the number of features the model was trained on.
|
Param<String> |
predictionCol()
Param for prediction column name.
|
Param<String> |
rawPredictionCol()
Param for raw prediction (a.k.a.
|
Node |
rootNode() |
String |
toString() |
String |
uid()
An immutable unique ID for the object and its derivatives.
|
StructType |
validateAndTransformSchema(StructType schema,
boolean fitting,
DataType featuresDataType) |
StructType |
validateAndTransformSchema(StructType schema,
boolean fitting,
DataType featuresDataType)
Validates and transforms the input schema with the provided param map.
|
normalizeToProbabilitiesInPlace, setProbabilityCol, setThresholds, transformsetRawPredictionColsetFeaturesCol, setPredictionCol, transformSchematransform, transform, transformclear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn, validateParamsinitializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarningpublic static DecisionTreeClassificationModel fromOld(DecisionTreeModel oldModel, DecisionTreeClassifier parent, scala.collection.immutable.Map<Object,Object> categoricalFeatures, int numFeatures)
public String uid()
Identifiableuid in interface Identifiablepublic Node rootNode()
public int numFeatures()
PredictionModelnumFeatures in class PredictionModel<Vector,DecisionTreeClassificationModel>public int numClasses()
ClassificationModelnumClasses in class ClassificationModel<Vector,DecisionTreeClassificationModel>public DecisionTreeClassificationModel copy(ParamMap extra)
Paramscopy in interface Paramscopy in class Model<DecisionTreeClassificationModel>extra - (undocumented)defaultCopy()public String toString()
toString in interface IdentifiabletoString in class Objectpublic StructType validateAndTransformSchema(StructType schema, boolean fitting, DataType featuresDataType)
public Param<String> rawPredictionCol()
public String getRawPredictionCol()
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<String> labelCol()
public String getLabelCol()
public Param<String> featuresCol()
public String getFeaturesCol()
public Param<String> predictionCol()
public String getPredictionCol()