You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Nick Pentreath (JIRA)" <ji...@apache.org> on 2017/05/17 13:12:04 UTC
[jira] [Closed] (SPARK-12015) Auto convert int to Double when
required in pyspark.ml
[ https://issues.apache.org/jira/browse/SPARK-12015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nick Pentreath closed SPARK-12015.
----------------------------------
Resolution: Duplicate
> 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.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org