I get an inexplicable exception when trying to build an ALSModel with the
implicit set to true. I can’t find any help online.
Thanks in advance.
My code is:
ALS als = new ALS()
.setMaxIter(5)
.setRegParam(0.01)
.setUserCol("customer")
.setItemCol("item")
.setImplicitPrefs(true)
.setRatingCol("rating");
ALSModel model = als.fit(training);
The exception is:
org.apache.spark.ml.optim.SingularMatrixException: LAPACK.dppsv returned 6
because A is not positive definite. Is A derived from a singular matrix (e.g.
collinear column values)?
at
org.apache.spark.mllib.linalg.CholeskyDecomposition$.checkReturnValue(CholeskyDecomposition.scala:65)
~[spark-mllib_2.11-2.3.1.jar:2.3.1]
at
org.apache.spark.mllib.linalg.CholeskyDecomposition$.solve(CholeskyDecomposition.scala:41)
~[spark-mllib_2.11-2.3.1.jar:2.3.1]
at
org.apache.spark.ml.recommendation.ALS$CholeskySolver.solve(ALS.scala:747)
~[spark-mllib_2.11-2.3.1.jar:2.3.1]