Closed Tenceto closed 6 years ago
Sorry but it is not possible to do something like that.
do you have over-clustering? check to align your spikes better and/or increase the min_clus parameter
The thing is that I know the ground-truth so I know how many classes exist in my dataset. For example, I was trying with a dataset that has spikes of 5 classes, and WaveClus was returning 7 or 8 (I don't recall exactly).
The spikes are perfectly aligned (i.e. they all have the minimum value in the same sample). I'll try to increase min_clus
and see if that works out.
About the alignment, check that using an interpolated spike the peak is in the same sample.
min_clus
will help but it won't force a certain number of clusters. Maybe you could merge manually the closest ones, but it isn't a real solution.
Sorry for my ignorance, but what do you mean by "check that using an interpolated spike the peak is in the same sample"?
The spike can be miss aligned for less that a sample, the way to fix that is: interpolate the spike with more samples, align that spike with better temporal precision and then sub-sample to get a spike with the original size. You will get a spike with less samples, because you have to remove 2 samples of each side of the spike to fix the border effect of the interpolation.
I got it now. I will try that, but nevertheless I will close this thread as the answer to the original question was already provided by you and it was a simple "no, it's not possible". Thanks for your help!
When I apply the function
Do_clustering()
to my data, I want to be able to force the algorithm to find a fixed number of clusters. Is there a way to do this? Namely, to tell WaveClus "fit all the spikes into N clusters".