<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def predict(self, X):
 """Predict label for data. Parameters X : array-like, shape = [n_samples, n_features] Returns ------- C : array, shape = (n_samples,) """

        logprob, responsibilities = self.score_samples(X)
        return responsibilities.argmax(axis=1)