Packages

class TrainClassifier extends Estimator[TrainedClassifierModel] with AutoTrainer[TrainedClassifierModel] with SynapseMLLogging

Trains a classification model. Featurizes the given data into a vector of doubles.

Note the behavior of the reindex and labels parameters, the parameters interact as:

reindex -> false labels -> false (Empty) Assume all double values, don't use metadata, assume natural ordering

reindex -> true labels -> false (Empty) Index, use natural ordering of string indexer

reindex -> false labels -> true (Specified) Assume user knows indexing, apply label values. Currently only string type supported.

reindex -> true labels -> true (Specified) Validate labels matches column type, try to recast to label type, reindex label column

The currently supported classifiers are: Logistic Regression Classifier Decision Tree Classifier Random Forest Classifier Gradient Boosted Trees Classifier Naive Bayes Classifier Multilayer Perceptron Classifier In addition to any generic learner that inherits from Predictor.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TrainClassifier
  2. SynapseMLLogging
  3. AutoTrainer
  4. Wrappable
  5. DotnetWrappable
  6. RWrappable
  7. PythonWrappable
  8. BaseWrappable
  9. HasFeaturesCol
  10. ComplexParamsWritable
  11. MLWritable
  12. HasInputCols
  13. HasLabelCol
  14. Estimator
  15. PipelineStage
  16. Logging
  17. Params
  18. Serializable
  19. Serializable
  20. Identifiable
  21. AnyRef
  22. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TrainClassifier()
  2. new TrainClassifier(uid: String)

Value Members

  1. final def clear(param: Param[_]): TrainClassifier.this.type
    Definition Classes
    Params
  2. def convertLabel(dataset: Dataset[_], labelColumn: String, labelValues: Option[Array[_]]): (DataFrame, Option[Array[_]])
  3. def copy(extra: ParamMap): Estimator[TrainedClassifierModel]
    Definition Classes
    TrainClassifier → Estimator → PipelineStage → Params
  4. def dotnetAdditionalMethods: String
    Definition Classes
    DotnetWrappable
  5. def explainParam(param: Param[_]): String
    Definition Classes
    Params
  6. def explainParams(): String
    Definition Classes
    Params
  7. final def extractParamMap(): ParamMap
    Definition Classes
    Params
  8. final def extractParamMap(extra: ParamMap): ParamMap
    Definition Classes
    Params
  9. val featuresCol: Param[String]

    The name of the features column

    The name of the features column

    Definition Classes
    HasFeaturesCol
  10. def fit(dataset: Dataset[_]): TrainedClassifierModel

    Fits the classification model.

    Fits the classification model.

    dataset

    The input dataset to train.

    returns

    The trained classification model.

    Definition Classes
    TrainClassifier → Estimator
  11. def fit(dataset: Dataset[_], paramMaps: Seq[ParamMap]): Seq[TrainedClassifierModel]
    Definition Classes
    Estimator
    Annotations
    @Since( "2.0.0" )
  12. def fit(dataset: Dataset[_], paramMap: ParamMap): TrainedClassifierModel
    Definition Classes
    Estimator
    Annotations
    @Since( "2.0.0" )
  13. def fit(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): TrainedClassifierModel
    Definition Classes
    Estimator
    Annotations
    @Since( "2.0.0" ) @varargs()
  14. final def get[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  15. final def getDefault[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  16. def getFeaturesCol: String

    Definition Classes
    HasFeaturesCol
  17. def getFeaturizeParams: (Boolean, Boolean, Int)
  18. def getInputCols: Array[String]

    Definition Classes
    HasInputCols
  19. def getLabelCol: String

    Definition Classes
    HasLabelCol
  20. def getLabels: Array[String]

  21. def getModel: Estimator[_ <: Model[_]]

    Definition Classes
    AutoTrainer
  22. def getNumFeatures: Int

    Definition Classes
    AutoTrainer
  23. final def getOrDefault[T](param: Param[T]): T
    Definition Classes
    Params
  24. def getParam(paramName: String): Param[Any]
    Definition Classes
    Params
  25. def getParamInfo(p: Param[_]): ParamInfo[_]
    Definition Classes
    BaseWrappable
  26. def getReindexLabel: Boolean

  27. final def hasDefault[T](param: Param[T]): Boolean
    Definition Classes
    Params
  28. def hasParam(paramName: String): Boolean
    Definition Classes
    Params
  29. val inputCols: StringArrayParam

    The names of the inputColumns

    The names of the inputColumns

    Definition Classes
    HasInputCols
  30. final def isDefined(param: Param[_]): Boolean
    Definition Classes
    Params
  31. final def isSet(param: Param[_]): Boolean
    Definition Classes
    Params
  32. val labelCol: Param[String]

    The name of the label column

    The name of the label column

    Definition Classes
    HasLabelCol
  33. val labels: StringArrayParam

    Specifies the labels metadata on the column.

    Specifies the labels metadata on the column. See class documentation for how this parameter interacts with reindex labels parameter.

  34. def logClass(featureName: String): Unit
    Definition Classes
    SynapseMLLogging
  35. def logFit[T](f: ⇒ T, columns: Int): T
    Definition Classes
    SynapseMLLogging
  36. def logTransform[T](f: ⇒ T, columns: Int): T
    Definition Classes
    SynapseMLLogging
  37. def logVerb[T](verb: String, f: ⇒ T, columns: Option[Int] = None): T
    Definition Classes
    SynapseMLLogging
  38. def makeDotnetFile(conf: CodegenConfig): Unit
    Definition Classes
    DotnetWrappable
  39. def makePyFile(conf: CodegenConfig): Unit
    Definition Classes
    PythonWrappable
  40. def makeRFile(conf: CodegenConfig): Unit
    Definition Classes
    RWrappable
  41. val model: EstimatorParam

    Model to run.

    Model to run. See doc on derived classes.

    Definition Classes
    AutoTrainer
  42. def modelDoc: String

    Doc for model to run.

    Doc for model to run.

    Definition Classes
    TrainClassifierAutoTrainer
  43. val numFeatures: IntParam

    Number of features to hash to

    Number of features to hash to

    Definition Classes
    AutoTrainer
  44. lazy val params: Array[Param[_]]
    Definition Classes
    Params
  45. def pyAdditionalMethods: String
    Definition Classes
    PythonWrappable
  46. def pyInitFunc(): String
    Definition Classes
    PythonWrappable
  47. val reindexLabel: BooleanParam

    Specifies whether to reindex the given label column.

    Specifies whether to reindex the given label column. See class documentation for how this parameter interacts with specified labels.

  48. def save(path: String): Unit
    Definition Classes
    MLWritable
    Annotations
    @Since( "1.6.0" ) @throws( ... )
  49. final def set[T](param: Param[T], value: T): TrainClassifier.this.type
    Definition Classes
    Params
  50. def setFeaturesCol(value: String): TrainClassifier.this.type

    Definition Classes
    HasFeaturesCol
  51. def setInputCols(value: Array[String]): TrainClassifier.this.type

    Definition Classes
    HasInputCols
  52. def setLabelCol(value: String): TrainClassifier.this.type

    Definition Classes
    HasLabelCol
  53. def setLabels(value: Array[String]): TrainClassifier.this.type

  54. def setModel(value: Estimator[_ <: Model[_]]): TrainClassifier.this.type

    Definition Classes
    AutoTrainer
  55. def setNumFeatures(value: Int): TrainClassifier.this.type

    Definition Classes
    AutoTrainer
  56. def setReindexLabel(value: Boolean): TrainClassifier.this.type

  57. def toString(): String
    Definition Classes
    Identifiable → AnyRef → Any
  58. def transformSchema(schema: StructType): StructType
    Definition Classes
    TrainClassifier → PipelineStage
    Annotations
    @DeveloperApi()
  59. val uid: String
    Definition Classes
    TrainClassifierSynapseMLLogging → Identifiable
  60. def write: MLWriter
    Definition Classes
    ComplexParamsWritable → MLWritable