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

2018-10-04 Thread hager
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-unsubscr...@spark.apache.org



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

2018-05-15 Thread Mina Aslani
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