-
- Downloads
[SPARK-11349][ML] Support transform string label for RFormula
Currently ```RFormula``` can only handle label with ```NumericType``` or ```BinaryType``` (cast it to ```DoubleType``` as the label of Linear Regression training), we should also support label of ```StringType``` which is needed for Logistic Regression (glm with family = "binomial"). For label of ```StringType```, we should use ```StringIndexer``` to transform it to 0-based index. Author: Yanbo Liang <ybliang8@gmail.com> Closes #9302 from yanboliang/spark-11349.
Showing
- mllib/src/main/scala/org/apache/spark/ml/feature/RFormula.scala 9 additions, 1 deletion...src/main/scala/org/apache/spark/ml/feature/RFormula.scala
- mllib/src/test/scala/org/apache/spark/ml/feature/RFormulaSuite.scala 19 additions, 0 deletions...est/scala/org/apache/spark/ml/feature/RFormulaSuite.scala
Please register or sign in to comment