# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import numpy as np
import pandas as pd
from sklearn.datasets import load_iris 
from sklearn import metrics
from sklearn.naive_bayes import GaussianNB
from sklearn.model_selection import train_test_split

iris_d = load_iris()

X= iris_d.data
Y= iris_d.target

print(iris_d.DESCR)

model =GaussianNB()

X_train, X_test, Y_train, Y_test = train_test_split(X, Y)

model.fit(X_train,Y_train)

y_predict = model.predict(X_test)

expected = Y_test

print(metrics.accuracy_score(expected, y_predict))



StarcoderdataJupyterScriptsDedupFiltered