Get the assignments for X with GMM clusters.
(self, X)
| 115 | return False |
| 116 | |
| 117 | def _predict(self, X): |
| 118 | """Get the assignments for X with GMM clusters.""" |
| 119 | if not X.shape: |
| 120 | return self.assignments |
| 121 | likelihoods = self._get_likelihood(X) |
| 122 | weighted_likelihoods = self._get_weighted_likelihood(likelihoods) |
| 123 | assignments = weighted_likelihoods.argmax(axis=1) |
| 124 | return assignments |
| 125 | |
| 126 | def _get_likelihood(self, data): |
| 127 | n_data = data.shape[0] |
nothing calls this directly
no test coverage detected