You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Mina Aslani <as...@gmail.com> on 2018/05/15 17:53:36 UTC

java.lang.IllegalArgumentException: requirement failed: BLAS.dot(x: Vector, y:Vector) was given Vectors with non-matching sizes

Hi,

I am trying to test my spark app implemented in Java. In my spark app I
load the logisticRegressionModel that I have already created, trained and
tested using the portion of training data.

Now, when I test my spark app with another set of data and try to predict,
I get below error when trying to read the prediction result and see how it
looks after applied the transform on the new test data :

org.apache.spark.SparkException: Failed to execute user defined
function($anonfun$4: (vector) => double)

java.lang.IllegalArgumentException: requirement failed: BLAS.dot(x:
Vector, y:Vector) was given Vectors with non-matching sizes


I know the cause as the new test data does not have the same vector size as
the trained model. However, I would like to know how I can resolve it? What
is the suggestion/workaround?

I really appreciate your quick response.

Best regards,
Mina

Re: java.lang.IllegalArgumentException: requirement failed: BLAS.dot(x: Vector, y:Vector) was given Vectors with non-matching sizes

Posted by hager <lo...@yahoo.com>.
please, I have same problem.
Have you found any solution?



--
Sent from: http://apache-spark-user-list.1001560.n3.nabble.com/

---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscribe@spark.apache.org