Closed epurdom closed 4 years ago
I'm reproducing this error. I think the appropriate way forward is to raise an exception. This can happen with K-means when the initialization is not good enough or that the number of clusters is not appropriate.
Actually, I'll raise a warning and edit the splines_kmeans_score_and_label to deal with NA clusters.
Note that if I use my old
testData
object that had only"C","K"
I didn't hit these errors, i.e.And I also don't hit these errors if
rescale=FALSE
,i.e.
This code is based on a test in the
test-cluster.R
forsplines_kmeans_score_and_label
. I was trying to convert it to use the small example data I created. Before I was just creating the example data with"C","K"
used, but now I run it with also "M" so as to be able to test more complicated contrasts.splines_kmeans_score_and_label
can't handle theNaN
in the centroids.Stepping through the function, I see that the
NaN
values are given by the output ofClusterR
, in otherwords, it's not the result of errors in post-processing the results.Final note: I am converting to support bioconductor class on the
EAP/moaninClass
branch, where I first discovered it, but the code above is from before that conversion.