{ "cells": [ { "cell_type": "code", "execution_count": 76, "id": "configured-dover", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "from sklearn.naive_bayes import CategoricalNB\n", "from sklearn.model_selection import train_test_split\n", "from sklearn.metrics import classification_report\n", "from sklearn.preprocessing import OrdinalEncoder\n", "from sklearn.pipeline import Pipeline" ] }, { "cell_type": "code", "execution_count": 5, "id": "tracked-guidance", "metadata": {}, "outputs": [], "source": [ "df = pd.read_csv('C:/Users/student/Desktop/ipIndustija4/ballons.csv')" ] }, { "cell_type": "code", "execution_count": 6, "id": "diverse-logistics", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | color | \n", "size | \n", "act | \n", "age | \n", "inflated | \n", "
---|---|---|---|---|---|
count | \n", "76 | \n", "76 | \n", "76 | \n", "76 | \n", "76 | \n", "
unique | \n", "2 | \n", "2 | \n", "2 | \n", "2 | \n", "2 | \n", "
top | \n", "YELLOW | \n", "SMALL | \n", "DIP | \n", "ADULT | \n", "F | \n", "
freq | \n", "40 | \n", "40 | \n", "38 | \n", "38 | \n", "41 | \n", "