Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting empty p_micro_cluster_centers when trying the algorithm with less n_samples (10, 50, 100, 300 ...) #1

Open
onofricamila opened this issue Nov 7, 2019 · 0 comments

Comments

@onofricamila
Copy link

onofricamila commented Nov 7, 2019

As the title says, I'm struggling trying to decode **why I am getting empty p_micro_cluster_centers when running Test.py setting n_samples to a smaller number **. Any help will be appreciated.

image

image

I don't know why but there are not any issues of the kind if the data set you use has much more elements. I tried the algorithm with 500 n_samples and it worked fine.

IMPORTANT: there seems to be a problem in the _partial_fit method when it comes to generate p_micro_clusters ... I think it has to do with the if statement but I do not know what to do about it:

def _partial_fit(self, sample, weight):
     self._merging(sample, weight)
     if self.t % self.tp == 0:
         self.p_micro_clusters = [p_micro_cluster for p_micro_cluster
                                  in self.p_micro_clusters if
                                  p_micro_cluster.weight() >= self.beta *
                                  self.mu]
         Xis = [((self._decay_function(self.t - o_micro_cluster.creation_time
                                       + self.tp) - 1) /
                 (self._decay_function(self.tp) - 1)) for o_micro_cluster in
                self.o_micro_clusters]
         self.o_micro_clusters = [o_micro_cluster for Xi, o_micro_cluster in
                                  zip(Xis, self.o_micro_clusters) if
                                  o_micro_cluster.weight() >= Xi]
     self.t += 1

Thanks in advance!

@onofricamila onofricamila changed the title getting empty p_micro_cluster_centers when trying the algorithm with less n_samples (10, 50, 100, 300 ...)) getting empty p_micro_cluster_centers when trying the algorithm with less n_samples (10, 50, 100, 300 ...) Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant