<jupyter_start><jupyter_text>HW2: SIDEQUEST -- ClassificationUsing [this tutorial](https://www.datacamp.com/community/tutorials/naive-bayes-scikit-learn?fbclid=IwAR0JmLK1orRgVDnATi_gCKf9-MHFHD86sU8CtroeIxASsMLHr-hwoI2hEnc) | 10-13-19<jupyter_code>import sklearn
from sklearn import datasets
wine = datasets.load_wine()
wine.feature_names
type(wine)
from sklearn.model_selection import train_test_split
x_train, x_test, y_train, y_test = train_test_split(wine.data, wine.target, test_size=0.3, random_state = 109)
wine.data[1]
wine.target
from sklearn.naive_bayes import GaussianNB
gnb = GaussianNB()
gnb.fit(x_train, y_train)
y_pred = gnb.predict(x_test)
from sklearn import metrics
print("Accuracy:", metrics.accuracy_score(y_test, y_pred))<jupyter_output>Accuracy: 0.9074074074074074
{'fraction_non_alphanumeric': 0.10573248407643313, 'fraction_numerical': 0.04713375796178344, 'mean_word_length': 8.357142857142858, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '347996', 'license': 'MIT', 'n_tokens_mistral': 352, 'n_tokens_neox': 312, 'n_words': 48, 'path': 'assets/all_html/2019_10_14_HW2_classification.ipynb', 'repo_name': 'dskw1/dskw1.github.io', 'size': '785'}