[
https://issues.apache.org/jira/browse/SPARK-12015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15043636#comment-15043636
]
holdenk commented on SPARK-12015:
---------------------------------
Ah ok.
> Auto convert int to Double when required in pyspark.ml
> ------------------------------------------------------
>
> Key: SPARK-12015
> URL: https://issues.apache.org/jira/browse/SPARK-12015
> Project: Spark
> Issue Type: Bug
> Components: ML, PySpark
> Affects Versions: 1.5.2
> Reporter: Jose Antonio
> Labels: ml, py4j, pyspark, type-converter
>
> I have received the following exception:
> Why we cannot pass an integer when the required parameter is Double?
> I think this should be upcasted silently.
> java.lang.IllegalArgumentException: requirement failed: Column label must be
> of type DoubleType but was actually IntegerType.
> at scala.Predef$.require(Predef.scala:233)
> at
> org.apache.spark.ml.util.SchemaUtils$.checkColumnType(SchemaUtils.scala:42)
> at
> org.apache.spark.ml.PredictorParams$class.validateAndTransformSchema(Predictor.scala:53)
> at
> org.apache.spark.ml.classification.Classifier.org$apache$spark$ml$classification$ClassifierParams$$super$validateAndTransformSchema(Classifier.scala:56)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]