def train(self, pd): model = naive_bayes.GaussianNB() model.fit(pd.data, pd.target) print model return model