Created
          March 5, 2017 19:44 
        
      - 
      
- 
        Save dbulgakov/55edd5eeccf112ad44bb10b1414ea21c to your computer and use it in GitHub Desktop. 
Revisions
- 
        dbulgakov created this gist Mar 5, 2017 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ from sklearn.naive_bayes import GaussianNB cv = CountVectorizer(ngram_range=(1, 5)) X = cv.fit_transform(X_train) X_t = cv.transform(X_test) clf = GaussianNB() clf.fit(X.toarray(), y_train) y_pred = clf.predict(X_t.toarray())