From 392bed726809aea3dea7eda67b4dfa1107194895 Mon Sep 17 00:00:00 2001 From: Maciej Tyczynski Date: Thu, 8 Jun 2023 20:20:28 +0200 Subject: [PATCH] fixed the issue with dataset being different in link and in loading it via huggingface load dataset --- zad1.ipynb | 788 ++++++++++++++++++++++++++--------------------------- zad1.py | 196 ++----------- 2 files changed, 412 insertions(+), 572 deletions(-) diff --git a/zad1.ipynb b/zad1.ipynb index d89f3d6..7937734 100644 --- a/zad1.ipynb +++ b/zad1.ipynb @@ -2,77 +2,44 @@ "cells": [ { "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "c:\\Users\\macty\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\tqdm\\auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", - " from .autonotebook import tqdm as notebook_tqdm\n" - ] - } - ], - "source": [ - "import pandas as pd\n", - "import sklearn.model_selection\n", - "from datasets import load_dataset" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Found cached dataset wine (C:/Users/macty/.cache/huggingface/datasets/mstz___wine/wine/1.0.0/7c3844cac7ac7a22d5fbbaf60fc1d4e9c9deb1b9b9c4dbae6a7b1a962dbc96d8)\n", - "100%|██████████| 1/1 [00:00<00:00, 49.24it/s]\n" - ] - } - ], - "source": [ - "dataset = load_dataset(\"mstz/wine\", \"wine\")" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Dataset({\n", - " features: ['fixed_acidity', 'volatile_acidity', 'citric_acid', 'residual_sugar', 'chlorides', 'free_sulfur_dioxide', 'total_sulfur_dioxide', 'density', 'pH', 'sulphates', 'alcohol', 'quality', 'is_red'],\n", - " num_rows: 6497\n", - "})" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "dataset[\"train\"]" - ] - }, - { - "cell_type": "code", - "execution_count": 5, + "execution_count": 56, "metadata": {}, "outputs": [], "source": [ - "wine_dataset = pd.DataFrame(dataset[\"train\"])" + "import pandas as pd\n", + "import sklearn.model_selection" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 57, + "metadata": {}, + "outputs": [], + "source": [ + "import requests\n", + "\n", + "url = \"https://huggingface.co/datasets/mstz/wine/raw/main/Wine_Quality_Data.csv\"\n", + "save_path = \"Wine_Quality_Data.csv\"\n", + "\n", + "response = requests.get(url)\n", + "response.raise_for_status()\n", + "\n", + "with open(save_path, \"wb\") as f:\n", + " f.write(response.content)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": {}, + "outputs": [], + "source": [ + "wine_dataset = pd.read_csv(\"Wine_Quality_Data.csv\")" + ] + }, + { + "cell_type": "code", + "execution_count": 59, "metadata": {}, "outputs": [ { @@ -108,7 +75,7 @@ " sulphates\n", " alcohol\n", " quality\n", - " is_red\n", + " color\n", " \n", " \n", " \n", @@ -126,7 +93,7 @@ " 0.56\n", " 9.4\n", " 5\n", - " 0\n", + " red\n", " \n", " \n", " 1\n", @@ -142,7 +109,7 @@ " 0.68\n", " 9.8\n", " 5\n", - " 0\n", + " red\n", " \n", " \n", " 2\n", @@ -158,7 +125,7 @@ " 0.65\n", " 9.8\n", " 5\n", - " 0\n", + " red\n", " \n", " \n", " 3\n", @@ -174,7 +141,7 @@ " 0.58\n", " 9.8\n", " 6\n", - " 0\n", + " red\n", " \n", " \n", " 4\n", @@ -190,7 +157,7 @@ " 0.56\n", " 9.4\n", " 5\n", - " 0\n", + " red\n", " \n", " \n", "\n", @@ -211,15 +178,15 @@ "3 17.0 60.0 0.9980 3.16 0.58 \n", "4 11.0 34.0 0.9978 3.51 0.56 \n", "\n", - " alcohol quality is_red \n", - "0 9.4 5 0 \n", - "1 9.8 5 0 \n", - "2 9.8 5 0 \n", - "3 9.8 6 0 \n", - "4 9.4 5 0 " + " alcohol quality color \n", + "0 9.4 5 red \n", + "1 9.8 5 red \n", + "2 9.8 5 red \n", + "3 9.8 6 red \n", + "4 9.4 5 red " ] }, - "execution_count": 6, + "execution_count": 59, "metadata": {}, "output_type": "execute_result" } @@ -230,7 +197,16 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 60, + "metadata": {}, + "outputs": [], + "source": [ + "wine_dataset['color'] = wine_dataset['color'].replace({'red': 1, 'white': 0})" + ] + }, + { + "cell_type": "code", + "execution_count": 61, "metadata": {}, "outputs": [ { @@ -266,7 +242,7 @@ " sulphates\n", " alcohol\n", " quality\n", - " is_red\n", + " color\n", " \n", " \n", " \n", @@ -300,7 +276,7 @@ " 0.531268\n", " 10.491801\n", " 5.818378\n", - " 0.753886\n", + " 0.246114\n", " \n", " \n", " std\n", @@ -348,7 +324,7 @@ " 0.430000\n", " 9.500000\n", " 5.000000\n", - " 1.000000\n", + " 0.000000\n", " \n", " \n", " 50%\n", @@ -364,7 +340,7 @@ " 0.510000\n", " 10.300000\n", " 6.000000\n", - " 1.000000\n", + " 0.000000\n", " \n", " \n", " 75%\n", @@ -380,7 +356,7 @@ " 0.600000\n", " 11.300000\n", " 6.000000\n", - " 1.000000\n", + " 0.000000\n", " \n", " \n", " max\n", @@ -423,18 +399,18 @@ "75% 0.065000 41.000000 156.000000 0.996990 \n", "max 0.611000 289.000000 440.000000 1.038980 \n", "\n", - " pH sulphates alcohol quality is_red \n", + " pH sulphates alcohol quality color \n", "count 6497.000000 6497.000000 6497.000000 6497.000000 6497.000000 \n", - "mean 3.218501 0.531268 10.491801 5.818378 0.753886 \n", + "mean 3.218501 0.531268 10.491801 5.818378 0.246114 \n", "std 0.160787 0.148806 1.192712 0.873255 0.430779 \n", "min 2.720000 0.220000 8.000000 3.000000 0.000000 \n", - "25% 3.110000 0.430000 9.500000 5.000000 1.000000 \n", - "50% 3.210000 0.510000 10.300000 6.000000 1.000000 \n", - "75% 3.320000 0.600000 11.300000 6.000000 1.000000 \n", + "25% 3.110000 0.430000 9.500000 5.000000 0.000000 \n", + "50% 3.210000 0.510000 10.300000 6.000000 0.000000 \n", + "75% 3.320000 0.600000 11.300000 6.000000 0.000000 \n", "max 4.010000 2.000000 14.900000 9.000000 1.000000 " ] }, - "execution_count": 7, + "execution_count": 61, "metadata": {}, "output_type": "execute_result" } @@ -445,7 +421,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 62, "metadata": {}, "outputs": [ { @@ -454,13 +430,13 @@ "" ] }, - "execution_count": 8, + "execution_count": 62, "metadata": {}, "output_type": "execute_result" }, { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjAAAAGYCAYAAABcVthxAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAeAElEQVR4nO3df2xV9f3H8Vcp9PLz3sqP9tJQtAvRUgUcdaN3Uza048oui46SiWPIBDSQYtY2AjYhVdkSCP5AmGI3mSvLJArJdEIDtSlSt3HlR0214CBuYtql3hbnei/0C20p9/vH0hPuQKRQuH2X5yM5Cfd8Pvf0c4ylz5yee0iIRqNRAQAAGNIv3gsAAADoLgIGAACYQ8AAAABzCBgAAGAOAQMAAMwhYAAAgDkEDAAAMIeAAQAA5vSP9wKulrNnz6qxsVHDhg1TQkJCvJcDAAAuQTQa1YkTJ5SWlqZ+/b76OkufDZjGxkalp6fHexkAAOAyNDQ0aMyYMV853mcDZtiwYZL++x/A7XbHeTUAAOBSRCIRpaenOz/Hv0qfDZiuXxu53W4CBgAAY77u9g9u4gUAAOYQMAAAwBwCBgAAmNOtgHnqqaeUkJAQs2VmZjrjp0+fVn5+vkaMGKGhQ4cqLy9PTU1NMceor69XIBDQ4MGDlZKSomXLlunMmTMxc/bs2aPJkyfL5XJp3LhxKisru/wzBAAAfU63r8Dceuut+vz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q1atksPhGNfY/fv3T/JqMNXxzAxMmjlzpnp6ej4xZv7zn/8oLS3tGq4KwKfly1/+sn7zm99o3rx5+tKXvhTv5WCKI2Zg0m233aZ77rlHd999t0pKSpSXl6eUlBT5/X719PTo5ZdfVmNjo2677bZ4LxXABNTU1CgzM1Nbt27VE088oblz58Z7SZjCeJkJJoVCIf32t7/Vk08+qYsXL161PyMjQytXrtTdd98tp5N3IACs+tGPfqSUlBTt2LEj3kvBFEbMwLQPP/xQx48fV09Pj4aGhpSWliaPx6OFCxcqJSUl3ssD8D/q7e3V66+/rq9+9avxXgqmMGIGAACYxv13AABgGjEDAABMI2YAAIBpxAwAADCNmAEAAKYRMwAAwDRiBgAAmEbMAAAA0/4fapCwNl9f+CcAAAAASUVORK5CYII=", "text/plain": [ "
" ] @@ -470,14 +446,14 @@ } ], "source": [ - "wine_dataset[\"is_red\"].value_counts().plot(kind=\"bar\")\n", + "wine_dataset[\"color\"].value_counts().plot(kind=\"bar\")\n", "\n", "\n" ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 63, "metadata": {}, "outputs": [ { @@ -486,7 +462,7 @@ "1.2964337577998153" ] }, - "execution_count": 9, + "execution_count": 63, "metadata": {}, "output_type": "execute_result" } @@ -497,7 +473,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 64, "metadata": {}, "outputs": [ { @@ -506,7 +482,7 @@ "(array([], dtype=int64), array([], dtype=int64))" ] }, - "execution_count": 10, + "execution_count": 64, "metadata": {}, "output_type": "execute_result" } @@ -518,7 +494,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 65, "metadata": {}, "outputs": [], "source": [ @@ -528,7 +504,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 66, "metadata": {}, "outputs": [ { @@ -564,7 +540,7 @@ " sulphates\n", " alcohol\n", " quality\n", - " is_red\n", + " color\n", " \n", " \n", " \n", @@ -598,7 +574,7 @@ " 0.265634\n", " 0.704148\n", " 0.646486\n", - " 0.753886\n", + " 0.246114\n", " \n", " \n", " std\n", @@ -646,7 +622,7 @@ " 0.215000\n", " 0.637584\n", " 0.555556\n", - " 1.000000\n", + " 0.000000\n", " \n", " \n", " 50%\n", @@ -662,7 +638,7 @@ " 0.255000\n", " 0.691275\n", " 0.666667\n", - " 1.000000\n", + " 0.000000\n", " \n", " \n", " 75%\n", @@ -678,7 +654,7 @@ " 0.300000\n", " 0.758389\n", " 0.666667\n", - " 1.000000\n", + " 0.000000\n", " \n", " \n", " max\n", @@ -721,18 +697,18 @@ "75% 0.106383 0.141869 0.354545 0.959585 \n", "max 1.000000 1.000000 1.000000 1.000000 \n", "\n", - " pH sulphates alcohol quality is_red \n", + " pH sulphates alcohol quality color \n", "count 6497.000000 6497.000000 6497.000000 6497.000000 6497.000000 \n", - "mean 0.802619 0.265634 0.704148 0.646486 0.753886 \n", + "mean 0.802619 0.265634 0.704148 0.646486 0.246114 \n", "std 0.040097 0.074403 0.080048 0.097028 0.430779 \n", "min 0.678304 0.110000 0.536913 0.333333 0.000000 \n", - "25% 0.775561 0.215000 0.637584 0.555556 1.000000 \n", - "50% 0.800499 0.255000 0.691275 0.666667 1.000000 \n", - "75% 0.827930 0.300000 0.758389 0.666667 1.000000 \n", + "25% 0.775561 0.215000 0.637584 0.555556 0.000000 \n", + "50% 0.800499 0.255000 0.691275 0.666667 0.000000 \n", + "75% 0.827930 0.300000 0.758389 0.666667 0.000000 \n", "max 1.000000 1.000000 1.000000 1.000000 1.000000 " ] }, - "execution_count": 12, + "execution_count": 66, "metadata": {}, "output_type": "execute_result" } @@ -743,7 +719,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 67, "metadata": {}, "outputs": [ { @@ -762,7 +738,7 @@ "Name: fixed_acidity, dtype: float64" ] }, - "execution_count": 13, + "execution_count": 67, "metadata": {}, "output_type": "execute_result" } @@ -773,107 +749,107 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 68, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "1.0 4408\n", - "0.0 1439\n", - "Name: is_red, dtype: int64" + "0.0 4408\n", + "1.0 1439\n", + "Name: color, dtype: int64" ] }, - "execution_count": 14, + "execution_count": 68, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from sklearn.model_selection import train_test_split\n", - "wine_train, wine_test = sklearn.model_selection.train_test_split(wine_dataset, test_size=0.1, random_state=1, stratify=wine_dataset[\"is_red\"])\n", - "wine_train[\"is_red\"].value_counts() \n", + "wine_train, wine_test = sklearn.model_selection.train_test_split(wine_dataset, test_size=0.1, random_state=1, stratify=wine_dataset[\"color\"])\n", + "wine_train[\"color\"].value_counts() \n", "# podzielenie na train i test" ] }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 69, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "1.0 490\n", - "0.0 160\n", - "Name: is_red, dtype: int64" + "0.0 490\n", + "1.0 160\n", + "Name: color, dtype: int64" ] }, - "execution_count": 15, + "execution_count": 69, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "wine_test[\"is_red\"].value_counts()" + "wine_test[\"color\"].value_counts()" ] }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 70, "metadata": {}, "outputs": [], "source": [ - "wine_test, wine_val = sklearn.model_selection.train_test_split(wine_test, test_size=0.5, random_state=1, stratify=wine_test[\"is_red\"]) # podzielenie na test i validation" + "wine_test, wine_val = sklearn.model_selection.train_test_split(wine_test, test_size=0.5, random_state=1, stratify=wine_test[\"color\"]) # podzielenie na test i validation" ] }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 71, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "1.0 245\n", - "0.0 80\n", - "Name: is_red, dtype: int64" + "0.0 245\n", + "1.0 80\n", + "Name: color, dtype: int64" ] }, - "execution_count": 17, + "execution_count": 71, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "wine_test[\"is_red\"].value_counts()" + "wine_test[\"color\"].value_counts()" ] }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 72, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "1.0 245\n", - "0.0 80\n", - "Name: is_red, dtype: int64" + "0.0 245\n", + "1.0 80\n", + "Name: color, dtype: int64" ] }, - "execution_count": 18, + "execution_count": 72, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "wine_val[\"is_red\"].value_counts()" + "wine_val[\"color\"].value_counts()" ] }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 73, "metadata": {}, "outputs": [], "source": [ @@ -883,7 +859,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 74, "metadata": {}, "outputs": [ { @@ -892,7 +868,7 @@ "13" ] }, - "execution_count": 20, + "execution_count": 74, "metadata": {}, "output_type": "execute_result" } @@ -910,16 +886,16 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 75, "metadata": {}, "outputs": [], "source": [ - "#sns.pairplot(data=wine_dataset, hue=\"is_red\")" + "#sns.pairplot(data=wine_dataset, hue=\"color\")" ] }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 76, "metadata": {}, "outputs": [ { @@ -955,7 +931,7 @@ " sulphates\n", " alcohol\n", " quality\n", - " is_red\n", + " color\n", " \n", " \n", " \n", @@ -977,114 +953,114 @@ " \n", " \n", " mean\n", - " 0.448244\n", - " 0.217069\n", - " 0.180630\n", - " 0.078990\n", - " 0.088742\n", - " 0.103024\n", - " 0.257462\n", - " 0.957255\n", - " 0.803553\n", - " 0.263877\n", - " 0.703930\n", - " 0.646154\n", - " 0.753846\n", + " 0.460126\n", + " 0.209883\n", + " 0.197294\n", + " 0.083839\n", + " 0.096352\n", + " 0.105307\n", + " 0.272028\n", + " 0.957685\n", + " 0.799770\n", + " 0.266477\n", + " 0.691389\n", + " 0.636239\n", + " 0.246154\n", " \n", " \n", " std\n", - " 0.074301\n", - " 0.107627\n", - " 0.078046\n", - " 0.070045\n", - " 0.051400\n", - " 0.054750\n", - " 0.125165\n", - " 0.002786\n", - " 0.039808\n", - " 0.072275\n", - " 0.078704\n", - " 0.095014\n", + " 0.087321\n", + " 0.100971\n", + " 0.086532\n", + " 0.072172\n", + " 0.066017\n", + " 0.061895\n", + " 0.131981\n", + " 0.002780\n", + " 0.038640\n", + " 0.082243\n", + " 0.073293\n", + " 0.088732\n", " 0.431433\n", " \n", " \n", " min\n", - " 0.314465\n", - " 0.063291\n", + " 0.308176\n", + " 0.066456\n", " 0.000000\n", - " 0.012158\n", - " 0.031097\n", - " 0.010381\n", + " 0.010638\n", + " 0.026187\n", + " 0.003460\n", " 0.020455\n", - " 0.951116\n", - " 0.713217\n", - " 0.130000\n", - " 0.570470\n", + " 0.952030\n", + " 0.698254\n", + " 0.115000\n", + " 0.577181\n", " 0.333333\n", " 0.000000\n", " \n", " \n", " 25%\n", - " 0.402516\n", - " 0.145570\n", - " 0.144578\n", + " 0.408805\n", + " 0.139241\n", + " 0.156627\n", " 0.027356\n", - " 0.060556\n", + " 0.062193\n", " 0.058824\n", - " 0.168182\n", - " 0.955168\n", - " 0.775561\n", - " 0.210000\n", - " 0.637584\n", + " 0.188636\n", + " 0.955322\n", + " 0.773067\n", + " 0.215000\n", + " 0.630872\n", " 0.555556\n", - " 1.000000\n", + " 0.000000\n", " \n", " \n", " 50%\n", - " 0.433962\n", - " 0.177215\n", - " 0.180723\n", - " 0.042553\n", + " 0.440252\n", + " 0.189873\n", + " 0.186747\n", + " 0.048632\n", " 0.078560\n", " 0.100346\n", - " 0.261364\n", - " 0.957478\n", - " 0.800499\n", + " 0.275000\n", + " 0.957978\n", + " 0.795511\n", " 0.250000\n", - " 0.691275\n", + " 0.671141\n", " 0.666667\n", - " 1.000000\n", + " 0.000000\n", " \n", " \n", " 75%\n", - " 0.471698\n", - " 0.253165\n", - " 0.222892\n", - " 0.113982\n", - " 0.101473\n", - " 0.141869\n", - " 0.343182\n", - " 0.959354\n", - " 0.827930\n", - " 0.300000\n", - " 0.758389\n", + " 0.484277\n", + " 0.240506\n", + " 0.246988\n", + " 0.121581\n", + " 0.116203\n", + " 0.145329\n", + " 0.356818\n", + " 0.959787\n", + " 0.822943\n", + " 0.305000\n", + " 0.738255\n", " 0.666667\n", - " 1.000000\n", + " 0.000000\n", " \n", " \n", " max\n", - " 0.817610\n", - " 0.569620\n", - " 0.445783\n", - " 0.334347\n", - " 0.679214\n", - " 0.231834\n", - " 0.575000\n", - " 0.965264\n", - " 0.917706\n", - " 0.585000\n", - " 0.939597\n", - " 1.000000\n", + " 0.943396\n", + " 0.715190\n", + " 0.469880\n", + " 0.303191\n", + " 0.764321\n", + " 0.479239\n", + " 0.781818\n", + " 0.966034\n", + " 0.895262\n", + " 0.975000\n", + " 0.906040\n", + " 0.888889\n", " 1.000000\n", " \n", " \n", @@ -1094,36 +1070,36 @@ "text/plain": [ " fixed_acidity volatile_acidity citric_acid residual_sugar \\\n", "count 325.000000 325.000000 325.000000 325.000000 \n", - "mean 0.448244 0.217069 0.180630 0.078990 \n", - "std 0.074301 0.107627 0.078046 0.070045 \n", - "min 0.314465 0.063291 0.000000 0.012158 \n", - "25% 0.402516 0.145570 0.144578 0.027356 \n", - "50% 0.433962 0.177215 0.180723 0.042553 \n", - "75% 0.471698 0.253165 0.222892 0.113982 \n", - "max 0.817610 0.569620 0.445783 0.334347 \n", + "mean 0.460126 0.209883 0.197294 0.083839 \n", + "std 0.087321 0.100971 0.086532 0.072172 \n", + "min 0.308176 0.066456 0.000000 0.010638 \n", + "25% 0.408805 0.139241 0.156627 0.027356 \n", + "50% 0.440252 0.189873 0.186747 0.048632 \n", + "75% 0.484277 0.240506 0.246988 0.121581 \n", + "max 0.943396 0.715190 0.469880 0.303191 \n", "\n", " chlorides free_sulfur_dioxide total_sulfur_dioxide density \\\n", "count 325.000000 325.000000 325.000000 325.000000 \n", - "mean 0.088742 0.103024 0.257462 0.957255 \n", - "std 0.051400 0.054750 0.125165 0.002786 \n", - "min 0.031097 0.010381 0.020455 0.951116 \n", - "25% 0.060556 0.058824 0.168182 0.955168 \n", - "50% 0.078560 0.100346 0.261364 0.957478 \n", - "75% 0.101473 0.141869 0.343182 0.959354 \n", - "max 0.679214 0.231834 0.575000 0.965264 \n", + "mean 0.096352 0.105307 0.272028 0.957685 \n", + "std 0.066017 0.061895 0.131981 0.002780 \n", + "min 0.026187 0.003460 0.020455 0.952030 \n", + "25% 0.062193 0.058824 0.188636 0.955322 \n", + "50% 0.078560 0.100346 0.275000 0.957978 \n", + "75% 0.116203 0.145329 0.356818 0.959787 \n", + "max 0.764321 0.479239 0.781818 0.966034 \n", "\n", - " pH sulphates alcohol quality is_red \n", + " pH sulphates alcohol quality color \n", "count 325.000000 325.000000 325.000000 325.000000 325.000000 \n", - "mean 0.803553 0.263877 0.703930 0.646154 0.753846 \n", - "std 0.039808 0.072275 0.078704 0.095014 0.431433 \n", - "min 0.713217 0.130000 0.570470 0.333333 0.000000 \n", - "25% 0.775561 0.210000 0.637584 0.555556 1.000000 \n", - "50% 0.800499 0.250000 0.691275 0.666667 1.000000 \n", - "75% 0.827930 0.300000 0.758389 0.666667 1.000000 \n", - "max 0.917706 0.585000 0.939597 1.000000 1.000000 " + "mean 0.799770 0.266477 0.691389 0.636239 0.246154 \n", + "std 0.038640 0.082243 0.073293 0.088732 0.431433 \n", + "min 0.698254 0.115000 0.577181 0.333333 0.000000 \n", + "25% 0.773067 0.215000 0.630872 0.555556 0.000000 \n", + "50% 0.795511 0.250000 0.671141 0.666667 0.000000 \n", + "75% 0.822943 0.305000 0.738255 0.666667 0.000000 \n", + "max 0.895262 0.975000 0.906040 0.888889 1.000000 " ] }, - "execution_count": 22, + "execution_count": 76, "metadata": {}, "output_type": "execute_result" } @@ -1134,7 +1110,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 77, "metadata": {}, "outputs": [ { @@ -1170,7 +1146,7 @@ " sulphates\n", " alcohol\n", " quality\n", - " is_red\n", + " color\n", " \n", " \n", " \n", @@ -1192,34 +1168,34 @@ " \n", " \n", " mean\n", - " 0.453848\n", - " 0.215061\n", - " 0.192235\n", - " 0.082331\n", - " 0.092161\n", - " 0.105659\n", - " 0.262894\n", - " 0.957364\n", - " 0.802569\n", - " 0.265798\n", - " 0.704326\n", - " 0.646732\n", - " 0.753891\n", + " 0.453724\n", + " 0.215128\n", + " 0.192091\n", + " 0.082877\n", + " 0.091656\n", + " 0.105899\n", + " 0.262834\n", + " 0.957374\n", + " 0.802637\n", + " 0.265601\n", + " 0.704572\n", + " 0.646846\n", + " 0.246109\n", " \n", " \n", " std\n", - " 0.081742\n", - " 0.104315\n", - " 0.088036\n", - " 0.071982\n", - " 0.058619\n", - " 0.061749\n", - " 0.128256\n", - " 0.002882\n", - " 0.039880\n", - " 0.074864\n", - " 0.079852\n", - " 0.096928\n", + " 0.081597\n", + " 0.104319\n", + " 0.087166\n", + " 0.072487\n", + " 0.057502\n", + " 0.061908\n", + " 0.128388\n", + " 0.002899\n", + " 0.040030\n", + " 0.074400\n", + " 0.080399\n", + " 0.097212\n", " 0.430780\n", " \n", " \n", @@ -1246,13 +1222,13 @@ " 0.027356\n", " 0.062193\n", " 0.058824\n", - " 0.176136\n", - " 0.955071\n", + " 0.175000\n", + " 0.955110\n", " 0.775561\n", " 0.215000\n", " 0.637584\n", " 0.555556\n", - " 1.000000\n", + " 0.000000\n", " \n", " \n", " 50%\n", @@ -1263,28 +1239,28 @@ " 0.076923\n", " 0.100346\n", " 0.268182\n", - " 0.957516\n", + " 0.957555\n", " 0.800499\n", " 0.255000\n", " 0.691275\n", " 0.666667\n", - " 1.000000\n", + " 0.000000\n", " \n", " \n", " 75%\n", " 0.484277\n", - " 0.253165\n", + " 0.259494\n", " 0.234940\n", " 0.123100\n", " 0.106383\n", " 0.141869\n", - " 0.353409\n", - " 0.959581\n", + " 0.354545\n", + " 0.959585\n", " 0.827930\n", " 0.300000\n", " 0.758389\n", " 0.666667\n", - " 1.000000\n", + " 0.000000\n", " \n", " \n", " max\n", @@ -1309,36 +1285,36 @@ "text/plain": [ " fixed_acidity volatile_acidity citric_acid residual_sugar \\\n", "count 5847.000000 5847.000000 5847.000000 5847.000000 \n", - "mean 0.453848 0.215061 0.192235 0.082331 \n", - "std 0.081742 0.104315 0.088036 0.071982 \n", + "mean 0.453724 0.215128 0.192091 0.082877 \n", + "std 0.081597 0.104319 0.087166 0.072487 \n", "min 0.238994 0.050633 0.000000 0.009119 \n", "25% 0.402516 0.145570 0.150602 0.027356 \n", "50% 0.440252 0.183544 0.186747 0.045593 \n", - "75% 0.484277 0.253165 0.234940 0.123100 \n", + "75% 0.484277 0.259494 0.234940 0.123100 \n", "max 1.000000 1.000000 1.000000 1.000000 \n", "\n", " chlorides free_sulfur_dioxide total_sulfur_dioxide density \\\n", "count 5847.000000 5847.000000 5847.000000 5847.000000 \n", - "mean 0.092161 0.105659 0.262894 0.957364 \n", - "std 0.058619 0.061749 0.128256 0.002882 \n", + "mean 0.091656 0.105899 0.262834 0.957374 \n", + "std 0.057502 0.061908 0.128388 0.002899 \n", "min 0.014730 0.003460 0.013636 0.950076 \n", - "25% 0.062193 0.058824 0.176136 0.955071 \n", - "50% 0.076923 0.100346 0.268182 0.957516 \n", - "75% 0.106383 0.141869 0.353409 0.959581 \n", + "25% 0.062193 0.058824 0.175000 0.955110 \n", + "50% 0.076923 0.100346 0.268182 0.957555 \n", + "75% 0.106383 0.141869 0.354545 0.959585 \n", "max 1.000000 1.000000 1.000000 1.000000 \n", "\n", - " pH sulphates alcohol quality is_red \n", + " pH sulphates alcohol quality color \n", "count 5847.000000 5847.000000 5847.000000 5847.000000 5847.000000 \n", - "mean 0.802569 0.265798 0.704326 0.646732 0.753891 \n", - "std 0.039880 0.074864 0.079852 0.096928 0.430780 \n", + "mean 0.802637 0.265601 0.704572 0.646846 0.246109 \n", + "std 0.040030 0.074400 0.080399 0.097212 0.430780 \n", "min 0.678304 0.110000 0.536913 0.333333 0.000000 \n", - "25% 0.775561 0.215000 0.637584 0.555556 1.000000 \n", - "50% 0.800499 0.255000 0.691275 0.666667 1.000000 \n", - "75% 0.827930 0.300000 0.758389 0.666667 1.000000 \n", + "25% 0.775561 0.215000 0.637584 0.555556 0.000000 \n", + "50% 0.800499 0.255000 0.691275 0.666667 0.000000 \n", + "75% 0.827930 0.300000 0.758389 0.666667 0.000000 \n", "max 1.000000 1.000000 1.000000 1.000000 1.000000 " ] }, - "execution_count": 23, + "execution_count": 77, "metadata": {}, "output_type": "execute_result" } @@ -1349,7 +1325,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 78, "metadata": {}, "outputs": [ { @@ -1385,7 +1361,7 @@ " sulphates\n", " alcohol\n", " quality\n", - " is_red\n", + " color\n", " \n", " \n", " \n", @@ -1407,49 +1383,49 @@ " \n", " \n", " mean\n", - " 0.458355\n", - " 0.211412\n", - " 0.198091\n", - " 0.093521\n", - " 0.086537\n", - " 0.107596\n", - " 0.271556\n", - " 0.957757\n", - " 0.802570\n", - " 0.264446\n", - " 0.701160\n", - " 0.642393\n", - " 0.753846\n", + " 0.448708\n", + " 0.217381\n", + " 0.184022\n", + " 0.078864\n", + " 0.088017\n", + " 0.100985\n", + " 0.258073\n", + " 0.957147\n", + " 0.805141\n", + " 0.265385\n", + " 0.709269\n", + " 0.650256\n", + " 0.246154\n", " \n", " \n", " std\n", - " 0.084621\n", - " 0.098749\n", - " 0.086862\n", - " 0.079346\n", - " 0.035141\n", - " 0.061805\n", - " 0.135185\n", - " 0.003031\n", - " 0.044183\n", - " 0.068086\n", - " 0.084939\n", - " 0.100957\n", + " 0.073960\n", + " 0.105388\n", + " 0.094736\n", + " 0.069232\n", + " 0.043159\n", + " 0.051174\n", + " 0.126120\n", + " 0.002746\n", + " 0.042584\n", + " 0.065946\n", + " 0.079198\n", + " 0.101225\n", " 0.431433\n", " \n", " \n", " min\n", - " 0.295597\n", - " 0.056962\n", + " 0.301887\n", + " 0.075949\n", " 0.000000\n", " 0.012158\n", - " 0.019640\n", - " 0.010381\n", + " 0.026187\n", + " 0.006920\n", " 0.018182\n", - " 0.950413\n", - " 0.715711\n", - " 0.140000\n", - " 0.563758\n", + " 0.950731\n", + " 0.683292\n", + " 0.150000\n", + " 0.570470\n", " 0.333333\n", " 0.000000\n", " \n", @@ -1457,63 +1433,63 @@ " 25%\n", " 0.402516\n", " 0.145570\n", - " 0.156627\n", - " 0.030395\n", - " 0.063830\n", - " 0.055363\n", + " 0.138554\n", + " 0.028875\n", + " 0.062193\n", + " 0.058824\n", " 0.179545\n", - " 0.955456\n", - " 0.773067\n", + " 0.954879\n", + " 0.775561\n", " 0.215000\n", - " 0.630872\n", + " 0.637584\n", " 0.555556\n", - " 1.000000\n", + " 0.000000\n", " \n", " \n", " 50%\n", - " 0.446541\n", - " 0.183544\n", + " 0.433962\n", + " 0.177215\n", " 0.186747\n", - " 0.069149\n", - " 0.078560\n", + " 0.042553\n", + " 0.076923\n", " 0.100346\n", - " 0.284091\n", - " 0.957978\n", - " 0.800499\n", - " 0.250000\n", - " 0.684564\n", + " 0.256818\n", + " 0.957189\n", + " 0.805486\n", + " 0.260000\n", + " 0.697987\n", " 0.666667\n", - " 1.000000\n", + " 0.000000\n", " \n", " \n", " 75%\n", - " 0.490566\n", + " 0.484277\n", " 0.253165\n", - " 0.240964\n", - " 0.133739\n", - " 0.098200\n", - " 0.155709\n", - " 0.370455\n", - " 0.960028\n", - " 0.827930\n", + " 0.234940\n", + " 0.117021\n", + " 0.101473\n", + " 0.138408\n", + " 0.356818\n", + " 0.959306\n", + " 0.830424\n", " 0.305000\n", " 0.758389\n", " 0.666667\n", - " 1.000000\n", + " 0.000000\n", " \n", " \n", " max\n", - " 0.943396\n", - " 0.746835\n", - " 0.445783\n", - " 0.480243\n", - " 0.278232\n", - " 0.266436\n", - " 0.570455\n", - " 0.972396\n", - " 1.000000\n", - " 0.570000\n", - " 0.939597\n", + " 0.798742\n", + " 0.696203\n", + " 0.602410\n", + " 0.303191\n", + " 0.436989\n", + " 0.280277\n", + " 0.575000\n", + " 0.962935\n", + " 0.935162\n", + " 0.490000\n", + " 0.953020\n", " 0.888889\n", " 1.000000\n", " \n", @@ -1524,36 +1500,36 @@ "text/plain": [ " fixed_acidity volatile_acidity citric_acid residual_sugar \\\n", "count 325.000000 325.000000 325.000000 325.000000 \n", - "mean 0.458355 0.211412 0.198091 0.093521 \n", - "std 0.084621 0.098749 0.086862 0.079346 \n", - "min 0.295597 0.056962 0.000000 0.012158 \n", - "25% 0.402516 0.145570 0.156627 0.030395 \n", - "50% 0.446541 0.183544 0.186747 0.069149 \n", - "75% 0.490566 0.253165 0.240964 0.133739 \n", - "max 0.943396 0.746835 0.445783 0.480243 \n", + "mean 0.448708 0.217381 0.184022 0.078864 \n", + "std 0.073960 0.105388 0.094736 0.069232 \n", + "min 0.301887 0.075949 0.000000 0.012158 \n", + "25% 0.402516 0.145570 0.138554 0.028875 \n", + "50% 0.433962 0.177215 0.186747 0.042553 \n", + "75% 0.484277 0.253165 0.234940 0.117021 \n", + "max 0.798742 0.696203 0.602410 0.303191 \n", "\n", " chlorides free_sulfur_dioxide total_sulfur_dioxide density \\\n", "count 325.000000 325.000000 325.000000 325.000000 \n", - "mean 0.086537 0.107596 0.271556 0.957757 \n", - "std 0.035141 0.061805 0.135185 0.003031 \n", - "min 0.019640 0.010381 0.018182 0.950413 \n", - "25% 0.063830 0.055363 0.179545 0.955456 \n", - "50% 0.078560 0.100346 0.284091 0.957978 \n", - "75% 0.098200 0.155709 0.370455 0.960028 \n", - "max 0.278232 0.266436 0.570455 0.972396 \n", + "mean 0.088017 0.100985 0.258073 0.957147 \n", + "std 0.043159 0.051174 0.126120 0.002746 \n", + "min 0.026187 0.006920 0.018182 0.950731 \n", + "25% 0.062193 0.058824 0.179545 0.954879 \n", + "50% 0.076923 0.100346 0.256818 0.957189 \n", + "75% 0.101473 0.138408 0.356818 0.959306 \n", + "max 0.436989 0.280277 0.575000 0.962935 \n", "\n", - " pH sulphates alcohol quality is_red \n", + " pH sulphates alcohol quality color \n", "count 325.000000 325.000000 325.000000 325.000000 325.000000 \n", - "mean 0.802570 0.264446 0.701160 0.642393 0.753846 \n", - "std 0.044183 0.068086 0.084939 0.100957 0.431433 \n", - "min 0.715711 0.140000 0.563758 0.333333 0.000000 \n", - "25% 0.773067 0.215000 0.630872 0.555556 1.000000 \n", - "50% 0.800499 0.250000 0.684564 0.666667 1.000000 \n", - "75% 0.827930 0.305000 0.758389 0.666667 1.000000 \n", - "max 1.000000 0.570000 0.939597 0.888889 1.000000 " + "mean 0.805141 0.265385 0.709269 0.650256 0.246154 \n", + "std 0.042584 0.065946 0.079198 0.101225 0.431433 \n", + "min 0.683292 0.150000 0.570470 0.333333 0.000000 \n", + "25% 0.775561 0.215000 0.637584 0.555556 0.000000 \n", + "50% 0.805486 0.260000 0.697987 0.666667 0.000000 \n", + "75% 0.830424 0.305000 0.758389 0.666667 0.000000 \n", + "max 0.935162 0.490000 0.953020 0.888889 1.000000 " ] }, - "execution_count": 24, + "execution_count": 78, "metadata": {}, "output_type": "execute_result" } @@ -1564,7 +1540,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 79, "metadata": {}, "outputs": [], "source": [ @@ -1575,7 +1551,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 80, "metadata": {}, "outputs": [], "source": [ @@ -1594,7 +1570,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 81, "metadata": {}, "outputs": [], "source": [ @@ -1614,7 +1590,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 82, "metadata": {}, "outputs": [], "source": [ @@ -1636,7 +1612,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 83, "metadata": {}, "outputs": [], "source": [ @@ -1650,7 +1626,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 84, "metadata": {}, "outputs": [], "source": [ @@ -1661,18 +1637,18 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 85, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Epoch 1, loss: 0.5358\n", - "Epoch 3, loss: 0.3417\n", - "Epoch 5, loss: 0.3344\n", - "Epoch 7, loss: 0.3338\n", - "Epoch 9, loss: 0.3318\n", + "Epoch 1, loss: 0.4864\n", + "Epoch 3, loss: 0.3413\n", + "Epoch 5, loss: 0.3345\n", + "Epoch 7, loss: 0.3337\n", + "Epoch 9, loss: 0.3331\n", "Finished Training\n" ] } @@ -1700,7 +1676,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 86, "metadata": {}, "outputs": [ { diff --git a/zad1.py b/zad1.py index ac14eb8..a95332b 100644 --- a/zad1.py +++ b/zad1.py @@ -1,171 +1,61 @@ -#!/usr/bin/env python -# coding: utf-8 - -# In[2]: - - import pandas as pd import sklearn.model_selection from datasets import load_dataset - - -# In[3]: - - -dataset = load_dataset("mstz/wine", "wine") - - -# In[4]: - - -dataset["train"] - - -# In[5]: - - -wine_dataset = pd.DataFrame(dataset["train"]) - - -# In[6]: - - -wine_dataset.head()# podgląd danych - - -# In[7]: - - -wine_dataset.describe(include='all') - - -# In[8]: - - -wine_dataset["is_red"].value_counts().plot(kind="bar") - - - - -# In[9]: - - -wine_dataset["fixed_acidity"].std() - - -# In[10]: - - +import mlflow +import mlflow.sklearn import numpy as np -np.where(pd.isnull(wine_dataset))## sprawdzanie czy istnieją puste wartości +import logging +from sklearn.metrics import mean_squared_error, mean_absolute_error, r2_score +# logging.basicConfig(level=logging.WARN) +# logger = logging.getLogger(__name__) -# In[11]: +# mlflow.set_tracking_uri("http://localhost:5000") +# mlflow.set_experiment("s123456") +# def eval_metrics(actual, pred): +# rmse = np.sqrt(mean_squared_error(actual, pred)) +# mae = mean_absolute_error(actual, pred) +# r2 = r2_score(actual, pred) +# return rmse, mae, r2 +import requests +url = "https://huggingface.co/datasets/mstz/wine/raw/main/Wine_Quality_Data.csv" +save_path = "Wine_Quality_Data.csv" + +response = requests.get(url) +response.raise_for_status() + +with open(save_path, "wb") as f: + f.write(response.content) +wine_dataset = pd.read_csv("Wine_Quality_Data.csv") +wine_dataset['color'] = wine_dataset['color'].replace({'red': 1, 'white': 0}) for column in wine_dataset.columns: wine_dataset[column] = wine_dataset[column] / wine_dataset[column].abs().max() # normalizacja -# In[12]: - - -wine_dataset.describe(include='all') # sprawdzanie wartości po znormalizowaniu - - -# In[13]: - - -wine_dataset["fixed_acidity"].nlargest(10) #sprawdza czy najwyższe wartości mają sens - - -# In[14]: - - from sklearn.model_selection import train_test_split -wine_train, wine_test = sklearn.model_selection.train_test_split(wine_dataset, test_size=0.1, random_state=1, stratify=wine_dataset["is_red"]) -wine_train["is_red"].value_counts() +wine_train, wine_test = sklearn.model_selection.train_test_split(wine_dataset, test_size=0.1, random_state=1, stratify=wine_dataset["color"]) +wine_train["color"].value_counts() # podzielenie na train i test - -# In[15]: +wine_test["color"].value_counts() -wine_test["is_red"].value_counts() +wine_test, wine_val = sklearn.model_selection.train_test_split(wine_test, test_size=0.5, random_state=1, stratify=wine_test["color"]) # podzielenie na test i validation +wine_test["color"].value_counts() -# In[16]: - - -wine_test, wine_val = sklearn.model_selection.train_test_split(wine_test, test_size=0.5, random_state=1, stratify=wine_test["is_red"]) # podzielenie na test i validation - - -# In[17]: - - -wine_test["is_red"].value_counts() - - -# In[18]: - - -wine_val["is_red"].value_counts() - - -# In[19]: - +wine_val["color"].value_counts() import seaborn as sns sns.set_theme() - -# In[20]: - - -len(wine_dataset.columns) - - -# In[ ]: - - - - - -# In[21]: - - -#sns.pairplot(data=wine_dataset, hue="is_red") - - -# In[22]: - - -wine_test.describe() - - -# In[23]: - - -wine_train.describe() - - -# In[24]: - - -wine_val.describe() - - -# In[25]: - - import torch from torch import nn from torch.utils.data import DataLoader, Dataset -# In[26]: - - class TabularDataset(Dataset): def __init__(self, data): self.data = data.values.astype('float32') @@ -179,9 +69,6 @@ class TabularDataset(Dataset): return len(self.data) -# In[27]: - - batch_size = 64 train_dataset = TabularDataset(wine_train) train_dataloader = DataLoader(train_dataset, batch_size=batch_size, shuffle=True) @@ -189,15 +76,6 @@ test_dataset = TabularDataset(wine_test) test_dataloader = DataLoader(test_dataset, batch_size=batch_size, shuffle=False) -# In[ ]: - - - - - -# In[28]: - - class TabularModel(nn.Module): def __init__(self, input_dim, hidden_dim, output_dim): super(TabularModel, self).__init__() @@ -213,10 +91,6 @@ class TabularModel(nn.Module): out = self.softmax(out) return out - -# In[29]: - - input_dim = wine_train.shape[1] - 1 hidden_dim = 32 output_dim = 2 @@ -225,17 +99,10 @@ criterion = nn.CrossEntropyLoss() optimizer = torch.optim.Adam(model.parameters()) -# In[30]: - - model = TabularModel(input_dim=len(wine_train.columns)-1, hidden_dim=32, output_dim=2) criterion = nn.CrossEntropyLoss() optimizer = torch.optim.Adam(model.parameters(), lr=0.01) - -# In[31]: - - num_epochs = 10 for epoch in range(num_epochs): running_loss = 0.0 @@ -256,9 +123,6 @@ for epoch in range(num_epochs): print('Finished Training') -# In[32]: - - correct = 0 total = 0 with torch.no_grad():