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 !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def $[T](param: Param[T]): T
    Attributes
    protected
    Definition Classes
    Params
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. lazy val classNameHelper: String
    Attributes
    protected
    Definition Classes
    BaseWrappable
  7. final def clear(param: Param[_]): TrainClassifier.this.type
    Definition Classes
    Params
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  9. def companionModelClassName: String
    Attributes
    protected
    Definition Classes
    BaseWrappable
  10. def convertLabel(dataset: Dataset[_], labelColumn: String, labelValues: Option[Array[_]]): (DataFrame, Option[Array[_]])
  11. def copy(extra: ParamMap): Estimator[TrainedClassifierModel]
    Definition Classes
    TrainClassifier → Estimator → PipelineStage → Params
  12. def copyValues[T <: Params](to: T, extra: ParamMap): T
    Attributes
    protected
    Definition Classes
    Params
  13. lazy val copyrightLines: String
    Attributes
    protected
    Definition Classes
    BaseWrappable
  14. final def defaultCopy[T <: Params](extra: ParamMap): T
    Attributes
    protected
    Definition Classes
    Params
  15. def dotnetAdditionalMethods: String
    Definition Classes
    DotnetWrappable
  16. def dotnetClass(): String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  17. lazy val dotnetClassName: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  18. lazy val dotnetClassNameString: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  19. lazy val dotnetClassWrapperName: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  20. lazy val dotnetCopyrightLines: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  21. def dotnetExtraEstimatorImports: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  22. def dotnetExtraMethods: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  23. lazy val dotnetInternalWrapper: Boolean
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  24. def dotnetMLReadWriteMethods: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  25. lazy val dotnetNamespace: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  26. lazy val dotnetObjectBaseClass: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  27. def dotnetParamGetter(p: Param[_]): String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  28. def dotnetParamGetters: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  29. def dotnetParamSetter(p: Param[_]): String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  30. def dotnetParamSetters: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  31. def dotnetWrapAsTypeMethod: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  32. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  34. def explainParam(param: Param[_]): String
    Definition Classes
    Params
  35. def explainParams(): String
    Definition Classes
    Params
  36. final def extractParamMap(): ParamMap
    Definition Classes
    Params
  37. final def extractParamMap(extra: ParamMap): ParamMap
    Definition Classes
    Params
  38. val featuresCol: Param[String]

    The name of the features column

    The name of the features column

    Definition Classes
    HasFeaturesCol
  39. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  40. 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
  41. def fit(dataset: Dataset[_], paramMaps: Seq[ParamMap]): Seq[TrainedClassifierModel]
    Definition Classes
    Estimator
    Annotations
    @Since( "2.0.0" )
  42. def fit(dataset: Dataset[_], paramMap: ParamMap): TrainedClassifierModel
    Definition Classes
    Estimator
    Annotations
    @Since( "2.0.0" )
  43. def fit(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): TrainedClassifierModel
    Definition Classes
    Estimator
    Annotations
    @Since( "2.0.0" ) @varargs()
  44. final def get[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  45. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  46. final def getDefault[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  47. def getFeaturesCol: String

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

    Definition Classes
    HasInputCols
  50. def getLabelCol: String

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

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

    Definition Classes
    AutoTrainer
  53. def getNumFeatures: Int

    Definition Classes
    AutoTrainer
  54. final def getOrDefault[T](param: Param[T]): T
    Definition Classes
    Params
  55. def getParam(paramName: String): Param[Any]
    Definition Classes
    Params
  56. def getParamInfo(p: Param[_]): ParamInfo[_]
    Definition Classes
    BaseWrappable
  57. def getReindexLabel: Boolean

  58. final def hasDefault[T](param: Param[T]): Boolean
    Definition Classes
    Params
  59. def hasParam(paramName: String): Boolean
    Definition Classes
    Params
  60. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  61. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  62. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  63. val inputCols: StringArrayParam

    The names of the inputColumns

    The names of the inputColumns

    Definition Classes
    HasInputCols
  64. final def isDefined(param: Param[_]): Boolean
    Definition Classes
    Params
  65. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  66. final def isSet(param: Param[_]): Boolean
    Definition Classes
    Params
  67. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  68. val labelCol: Param[String]

    The name of the label column

    The name of the label column

    Definition Classes
    HasLabelCol
  69. 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.

  70. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  71. def logBase(info: SynapseMLLogInfo): Unit
    Attributes
    protected
    Definition Classes
    SynapseMLLogging
  72. def logBase(methodName: String, columns: Option[Int]): Unit
    Attributes
    protected
    Definition Classes
    SynapseMLLogging
  73. def logClass(): Unit
    Definition Classes
    SynapseMLLogging
  74. def logDebug(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  75. def logDebug(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  76. def logError(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  77. def logError(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  78. def logErrorBase(methodName: String, e: Exception): Unit
    Attributes
    protected
    Definition Classes
    SynapseMLLogging
  79. def logFit[T](f: ⇒ T, columns: Int): T
    Definition Classes
    SynapseMLLogging
  80. def logInfo(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  81. def logInfo(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  82. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  83. def logTrace(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  84. def logTrace(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  85. def logTrain[T](f: ⇒ T, columns: Int): T
    Definition Classes
    SynapseMLLogging
  86. def logTransform[T](f: ⇒ T, columns: Int): T
    Definition Classes
    SynapseMLLogging
  87. def logVerb[T](verb: String, f: ⇒ T, columns: Int = -1): T
    Definition Classes
    SynapseMLLogging
  88. def logWarning(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  89. def logWarning(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  90. def makeDotnetFile(conf: CodegenConfig): Unit
    Definition Classes
    DotnetWrappable
  91. def makePyFile(conf: CodegenConfig): Unit
    Definition Classes
    PythonWrappable
  92. def makeRFile(conf: CodegenConfig): Unit
    Definition Classes
    RWrappable
  93. val model: EstimatorParam

    Model to run.

    Model to run. See doc on derived classes.

    Definition Classes
    AutoTrainer
  94. def modelDoc: String

    Doc for model to run.

    Doc for model to run.

    Definition Classes
    TrainClassifierAutoTrainer
  95. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  96. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  97. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  98. val numFeatures: IntParam

    Number of features to hash to

    Number of features to hash to

    Definition Classes
    AutoTrainer
  99. lazy val params: Array[Param[_]]
    Definition Classes
    Params
  100. def pyAdditionalMethods: String
    Definition Classes
    PythonWrappable
  101. lazy val pyClassDoc: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  102. lazy val pyClassName: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  103. def pyExtraEstimatorImports: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  104. def pyExtraEstimatorMethods: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  105. lazy val pyInheritedClasses: Seq[String]
    Attributes
    protected
    Definition Classes
    PythonWrappable
  106. def pyInitFunc(): String
    Definition Classes
    PythonWrappable
  107. lazy val pyInternalWrapper: Boolean
    Attributes
    protected
    Definition Classes
    PythonWrappable
  108. lazy val pyObjectBaseClass: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  109. def pyParamArg[T](p: Param[T]): String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  110. def pyParamDefault[T](p: Param[T]): Option[String]
    Attributes
    protected
    Definition Classes
    PythonWrappable
  111. def pyParamGetter(p: Param[_]): String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  112. def pyParamSetter(p: Param[_]): String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  113. def pyParamsArgs: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  114. def pyParamsDefaults: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  115. lazy val pyParamsDefinitions: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  116. def pyParamsGetters: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  117. def pyParamsSetters: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  118. def pythonClass(): String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  119. def rClass(): String
    Attributes
    protected
    Definition Classes
    RWrappable
  120. def rDocString: String
    Attributes
    protected
    Definition Classes
    RWrappable
  121. def rExtraBodyLines: String
    Attributes
    protected
    Definition Classes
    RWrappable
  122. def rExtraInitLines: String
    Attributes
    protected
    Definition Classes
    RWrappable
  123. lazy val rFuncName: String
    Attributes
    protected
    Definition Classes
    RWrappable
  124. lazy val rInternalWrapper: Boolean
    Attributes
    protected
    Definition Classes
    RWrappable
  125. def rParamArg[T](p: Param[T]): String
    Attributes
    protected
    Definition Classes
    RWrappable
  126. def rParamsArgs: String
    Attributes
    protected
    Definition Classes
    RWrappable
  127. def rSetterLines: String
    Attributes
    protected
    Definition Classes
    RWrappable
  128. 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.

  129. def save(path: String): Unit
    Definition Classes
    MLWritable
    Annotations
    @Since( "1.6.0" ) @throws( ... )
  130. final def set(paramPair: ParamPair[_]): TrainClassifier.this.type
    Attributes
    protected
    Definition Classes
    Params
  131. final def set(param: String, value: Any): TrainClassifier.this.type
    Attributes
    protected
    Definition Classes
    Params
  132. final def set[T](param: Param[T], value: T): TrainClassifier.this.type
    Definition Classes
    Params
  133. final def setDefault(paramPairs: ParamPair[_]*): TrainClassifier.this.type
    Attributes
    protected
    Definition Classes
    Params
  134. final def setDefault[T](param: Param[T], value: T): TrainClassifier.this.type
    Attributes
    protected
    Definition Classes
    Params
  135. def setFeaturesCol(value: String): TrainClassifier.this.type

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

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

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

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

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

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

  142. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  143. val thisStage: Params
    Attributes
    protected
    Definition Classes
    BaseWrappable
  144. def toString(): String
    Definition Classes
    Identifiable → AnyRef → Any
  145. def transformSchema(schema: StructType): StructType
    Definition Classes
    TrainClassifier → PipelineStage
    Annotations
    @DeveloperApi()
  146. def transformSchema(schema: StructType, logging: Boolean): StructType
    Attributes
    protected
    Definition Classes
    PipelineStage
    Annotations
    @DeveloperApi()
  147. val uid: String
    Definition Classes
    TrainClassifierSynapseMLLogging → Identifiable
  148. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  149. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  150. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  151. def write: MLWriter
    Definition Classes
    ComplexParamsWritable → MLWritable

Inherited from SynapseMLLogging

Inherited from Wrappable

Inherited from DotnetWrappable

Inherited from RWrappable

Inherited from PythonWrappable

Inherited from BaseWrappable

Inherited from HasFeaturesCol

Inherited from ComplexParamsWritable

Inherited from MLWritable

Inherited from HasInputCols

Inherited from HasLabelCol

Inherited from Estimator[TrainedClassifierModel]

Inherited from PipelineStage

Inherited from Logging

Inherited from Params

Inherited from Serializable

Inherited from Serializable

Inherited from Identifiable

Inherited from AnyRef

Inherited from Any

getParam

param

setParam

Ungrouped