I want to cluster my data using spark's MLlib functions. The problem is that in my dataset sometimes I get NULL as the features value.
I can't write 0.0 instead of it since it's just wrong. So I tried using Double.NaN for the value. This doesn't work and the clustering fails with:
java.lang.IllegalArgumentException: requirement failed
What is the common way to handle this issue?