This 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 characters
reviews = pd.read_csv('epinions.csv') | |
reviews = reviews.as_matrix()[:, :] |
This 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 characters
import re | |
import coremltools | |
import pandas as pd | |
import numpy as np | |
from nltk.corpus import stopwords | |
from nltk import word_tokenize | |
from string import punctuation | |
from sklearn.feature_extraction import DictVectorizer | |
from sklearn.pipeline import Pipeline | |
from sklearn.svm import LinearSVC |
NewerOlder