I'm trying to test the example given by spark regarding the linear regression machine learning algorithm which can be found here:
https://spark.apache.org/docs/2.2.0/ml-classification-regression.html#regression
I literally copy pasted the example code and downloaded the text file used in the example from here:
https://github.com/apache/spark/tree/master/data/mllib
Unfortunately it doesn't seem to work for me. When I try running the code it throws me the following exception:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 10582
If any of you have an idea as to why this is happening, please let me know!