You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "holdenk (JIRA)" <ji...@apache.org> on 2015/12/01 22:04:11 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=15034570#comment-15034570 ] 

holdenk commented on SPARK-12015:
---------------------------------

This is a duplicate of https://issues.apache.org/jira/browse/SPARK-7675 (which has a PR if someone has the time to review it).

> 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org