{ "cells": [ { "cell_type": "code", "execution_count": 45, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import sklearn.model_selection" ] }, { "cell_type": "code", "execution_count": 46, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Found cached dataset wine (C:/Users/s487176/.cache/huggingface/datasets/mstz___wine/wine/1.0.0/0913b614badc418a000d75d098776831f39ebf5ee208ecd3cfad4d5db1418d76)\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "a8f1b9db0c8b41e1904e16e22ae351e0", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/1 [00:00\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
fixed_acidityvolatile_aciditycitric_acidresidual_sugarchloridesfree_sulfur_dioxidetotal_sulfur_dioxidedensitypHsulphatesalcoholqualitycolor
07.40.700.001.90.07611.034.00.99783.510.569.450
17.80.880.002.60.09825.067.00.99683.200.689.850
27.80.760.042.30.09215.054.00.99703.260.659.850
311.20.280.561.90.07517.060.00.99803.160.589.860
47.40.700.001.90.07611.034.00.99783.510.569.450
\n", "" ], "text/plain": [ " fixed_acidity volatile_acidity citric_acid residual_sugar chlorides \\\n", "0 7.4 0.70 0.00 1.9 0.076 \n", "1 7.8 0.88 0.00 2.6 0.098 \n", "2 7.8 0.76 0.04 2.3 0.092 \n", "3 11.2 0.28 0.56 1.9 0.075 \n", "4 7.4 0.70 0.00 1.9 0.076 \n", "\n", " free_sulfur_dioxide total_sulfur_dioxide density pH sulphates \\\n", "0 11.0 34.0 0.9978 3.51 0.56 \n", "1 25.0 67.0 0.9968 3.20 0.68 \n", "2 15.0 54.0 0.9970 3.26 0.65 \n", "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 color \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 " ] }, "execution_count": 49, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wine_dataset.head()# podgląd danych" ] }, { "cell_type": "code", "execution_count": 50, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
fixed_acidityvolatile_aciditycitric_acidresidual_sugarchloridesfree_sulfur_dioxidetotal_sulfur_dioxidedensitypHsulphatesalcoholqualitycolor
count6497.0000006497.0000006497.0000006497.0000006497.0000006497.0000006497.0000006497.0000006497.0000006497.0000006497.0000006497.0000006497.000000
mean7.2153070.3396660.3186335.4432350.05603430.525319115.7445740.9946973.2185010.53126810.4918015.8183780.753886
std1.2964340.1646360.1453184.7578040.03503417.74940056.5218550.0029990.1607870.1488061.1927120.8732550.430779
min3.8000000.0800000.0000000.6000000.0090001.0000006.0000000.9871102.7200000.2200008.0000003.0000000.000000
25%6.4000000.2300000.2500001.8000000.03800017.00000077.0000000.9923403.1100000.4300009.5000005.0000001.000000
50%7.0000000.2900000.3100003.0000000.04700029.000000118.0000000.9948903.2100000.51000010.3000006.0000001.000000
75%7.7000000.4000000.3900008.1000000.06500041.000000156.0000000.9969903.3200000.60000011.3000006.0000001.000000
max15.9000001.5800001.66000065.8000000.611000289.000000440.0000001.0389804.0100002.00000014.9000009.0000001.000000
\n", "
" ], "text/plain": [ " fixed_acidity volatile_acidity citric_acid residual_sugar \\\n", "count 6497.000000 6497.000000 6497.000000 6497.000000 \n", "mean 7.215307 0.339666 0.318633 5.443235 \n", "std 1.296434 0.164636 0.145318 4.757804 \n", "min 3.800000 0.080000 0.000000 0.600000 \n", "25% 6.400000 0.230000 0.250000 1.800000 \n", "50% 7.000000 0.290000 0.310000 3.000000 \n", "75% 7.700000 0.400000 0.390000 8.100000 \n", "max 15.900000 1.580000 1.660000 65.800000 \n", "\n", " chlorides free_sulfur_dioxide total_sulfur_dioxide density \\\n", "count 6497.000000 6497.000000 6497.000000 6497.000000 \n", "mean 0.056034 30.525319 115.744574 0.994697 \n", "std 0.035034 17.749400 56.521855 0.002999 \n", "min 0.009000 1.000000 6.000000 0.987110 \n", "25% 0.038000 17.000000 77.000000 0.992340 \n", "50% 0.047000 29.000000 118.000000 0.994890 \n", "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 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", "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", "max 4.010000 2.000000 14.900000 9.000000 1.000000 " ] }, "execution_count": 50, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wine_dataset.describe(include='all')" ] }, { "cell_type": "code", "execution_count": 51, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 51, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjMAAAGbCAYAAAAx9RHcAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAeNklEQVR4nO3df0xV9/3H8de9XH4J3g5RuLSG1uHEkW1F6zWQDMdMvqzZ3BZGl2URs7pqWWdGh2Omi/SXzq5LUTubudaotaYSZwbp1nRZTU2WtYtSYO2aFVmrVWM7gVIptyJwy733+4e5d15tC5dJL2/u85EY5ZzP+eRjOYc+PfdwcYRCoZAAAACMcsZ7AQAAAP8LYgYAAJhGzAAAANOIGQAAYBoxAwAATCNmAACAacQMAAAwjZgBAACmETMAAMA0V7wX8GkIhUIKBnmj40ThdDr4fAPTFNd34nA6HXI4HOMamxAxEwyGdP78YLyXgU+By+VUVlaGfL6LGh0Nxns5AK4hru/EMmtWhpKSxhczvMwEAABMI2YAAIBpxAwAADAt5pjp6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gYAAJhGzAAAANP+Hw4CsDavedeFAAAAAElFTkSuQmCC", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "wine_dataset[\"color\"].value_counts().plot(kind=\"bar\")\n", "\n", "\n" ] }, { "cell_type": "code", "execution_count": 52, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1.2964337577998153" ] }, "execution_count": 52, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wine_dataset[\"fixed_acidity\"].std()" ] }, { "cell_type": "code", "execution_count": 53, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(array([], dtype=int64), array([], dtype=int64))" ] }, "execution_count": 53, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import numpy as np\n", "np.where(pd.isnull(wine_dataset))## sprawdzanie czy istnieją puste wartości" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 54, "metadata": {}, "outputs": [], "source": [ "for column in wine_dataset.columns:\n", " wine_dataset[column] = wine_dataset[column] / wine_dataset[column].abs().max() # normalizacja" ] }, { "cell_type": "code", "execution_count": 55, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
fixed_acidityvolatile_aciditycitric_acidresidual_sugarchloridesfree_sulfur_dioxidetotal_sulfur_dioxidedensitypHsulphatesalcoholqualitycolor
count6497.0000006497.0000006497.0000006497.0000006497.0000006497.0000006497.0000006497.0000006497.0000006497.0000006497.0000006497.0000006497.000000
mean0.4537930.2149780.1919480.0827240.0917080.1056240.2630560.9573780.8026190.2656340.7041480.6464860.753886
std0.0815370.1042000.0875410.0723070.0573380.0614170.1284590.0028860.0400970.0744030.0800480.0970280.430779
min0.2389940.0506330.0000000.0091190.0147300.0034600.0136360.9500760.6783040.1100000.5369130.3333330.000000
25%0.4025160.1455700.1506020.0273560.0621930.0588240.1750000.9551100.7755610.2150000.6375840.5555561.000000
50%0.4402520.1835440.1867470.0455930.0769230.1003460.2681820.9575640.8004990.2550000.6912750.6666671.000000
75%0.4842770.2531650.2349400.1231000.1063830.1418690.3545450.9595850.8279300.3000000.7583890.6666671.000000
max1.0000001.0000001.0000001.0000001.0000001.0000001.0000001.0000001.0000001.0000001.0000001.0000001.000000
\n", "
" ], "text/plain": [ " fixed_acidity volatile_acidity citric_acid residual_sugar \\\n", "count 6497.000000 6497.000000 6497.000000 6497.000000 \n", "mean 0.453793 0.214978 0.191948 0.082724 \n", "std 0.081537 0.104200 0.087541 0.072307 \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", "max 1.000000 1.000000 1.000000 1.000000 \n", "\n", " chlorides free_sulfur_dioxide total_sulfur_dioxide density \\\n", "count 6497.000000 6497.000000 6497.000000 6497.000000 \n", "mean 0.091708 0.105624 0.263056 0.957378 \n", "std 0.057338 0.061417 0.128459 0.002886 \n", "min 0.014730 0.003460 0.013636 0.950076 \n", "25% 0.062193 0.058824 0.175000 0.955110 \n", "50% 0.076923 0.100346 0.268182 0.957564 \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 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", "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", "max 1.000000 1.000000 1.000000 1.000000 1.000000 " ] }, "execution_count": 55, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wine_dataset.describe(include='all') # sprawdzanie wartości po znormalizowaniu" ] }, { "cell_type": "code", "execution_count": 56, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "652 1.000000\n", "442 0.981132\n", "557 0.981132\n", "554 0.974843\n", "555 0.974843\n", "243 0.943396\n", "244 0.943396\n", "544 0.899371\n", "3125 0.893082\n", "374 0.880503\n", "Name: fixed_acidity, dtype: float64" ] }, "execution_count": 56, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wine_dataset[\"fixed_acidity\"].nlargest(10) #sprawdza czy najwyższe wartości mają sens" ] }, { "cell_type": "code", "execution_count": 57, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1.0 4408\n", "0.0 1439\n", "Name: color, dtype: int64" ] }, "execution_count": 57, "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[\"color\"])\n", "wine_train[\"color\"].value_counts() \n", "# podzielenie na train i test" ] }, { "cell_type": "code", "execution_count": 58, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1.0 490\n", "0.0 160\n", "Name: color, dtype: int64" ] }, "execution_count": 58, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wine_test[\"color\"].value_counts()" ] }, { "cell_type": "code", "execution_count": 59, "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[\"color\"]) # podzielenie na test i validation" ] }, { "cell_type": "code", "execution_count": 60, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1.0 245\n", "0.0 80\n", "Name: color, dtype: int64" ] }, "execution_count": 60, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wine_test[\"color\"].value_counts()" ] }, { "cell_type": "code", "execution_count": 61, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1.0 245\n", "0.0 80\n", "Name: color, dtype: int64" ] }, "execution_count": 61, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wine_val[\"color\"].value_counts()" ] }, { "cell_type": "code", "execution_count": 62, "metadata": {}, "outputs": [], "source": [ "import seaborn as sns\n", "sns.set_theme()" ] }, { "cell_type": "code", "execution_count": 63, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "13" ] }, "execution_count": 63, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(wine_dataset.columns)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 64, "metadata": {}, "outputs": [], "source": [ "sns.pairplot(data=wine_dataset, hue=\"color\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
fixed_acidityvolatile_aciditycitric_acidresidual_sugarchloridesfree_sulfur_dioxidetotal_sulfur_dioxidedensitypHsulphatesalcoholqualitycolor
count325.000000325.000000325.000000325.000000325.000000325.000000325.000000325.000000325.000000325.000000325.000000325.000000325.000000
mean7.1270770.3429690.2998465.1975380.05422229.773846113.2830770.9945683.2222460.52775410.4885645.8153850.753846
std1.1813910.1700500.1295564.6089780.03140515.82267055.0725660.0028950.1596300.1445501.1726820.8551280.431433
min5.0000000.1000000.0000000.8000000.0190003.0000009.0000000.9881902.8600000.2600008.5000003.0000000.000000
25%6.4000000.2300000.2400001.8000000.03700017.00000074.0000000.9924003.1100000.4200009.5000005.0000001.000000
50%6.9000000.2800000.3000002.8000000.04800029.000000115.0000000.9948003.2100000.50000010.3000006.0000001.000000
75%7.5000000.4000000.3700007.5000000.06200041.000000151.0000000.9967503.3200000.60000011.3000006.0000001.000000
max13.0000000.9000000.74000022.0000000.41500067.000000253.0000001.0028903.6800001.17000014.0000009.0000001.000000
\n", "
" ], "text/plain": [ " fixed_acidity volatile_acidity citric_acid residual_sugar \\\n", "count 325.000000 325.000000 325.000000 325.000000 \n", "mean 7.127077 0.342969 0.299846 5.197538 \n", "std 1.181391 0.170050 0.129556 4.608978 \n", "min 5.000000 0.100000 0.000000 0.800000 \n", "25% 6.400000 0.230000 0.240000 1.800000 \n", "50% 6.900000 0.280000 0.300000 2.800000 \n", "75% 7.500000 0.400000 0.370000 7.500000 \n", "max 13.000000 0.900000 0.740000 22.000000 \n", "\n", " chlorides free_sulfur_dioxide total_sulfur_dioxide density \\\n", "count 325.000000 325.000000 325.000000 325.000000 \n", "mean 0.054222 29.773846 113.283077 0.994568 \n", "std 0.031405 15.822670 55.072566 0.002895 \n", "min 0.019000 3.000000 9.000000 0.988190 \n", "25% 0.037000 17.000000 74.000000 0.992400 \n", "50% 0.048000 29.000000 115.000000 0.994800 \n", "75% 0.062000 41.000000 151.000000 0.996750 \n", "max 0.415000 67.000000 253.000000 1.002890 \n", "\n", " pH sulphates alcohol quality color \n", "count 325.000000 325.000000 325.000000 325.000000 325.000000 \n", "mean 3.222246 0.527754 10.488564 5.815385 0.753846 \n", "std 0.159630 0.144550 1.172682 0.855128 0.431433 \n", "min 2.860000 0.260000 8.500000 3.000000 0.000000 \n", "25% 3.110000 0.420000 9.500000 5.000000 1.000000 \n", "50% 3.210000 0.500000 10.300000 6.000000 1.000000 \n", "75% 3.320000 0.600000 11.300000 6.000000 1.000000 \n", "max 3.680000 1.170000 14.000000 9.000000 1.000000 " ] }, "execution_count": 44, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wine_test.describe()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
fixed_acidityvolatile_aciditycitric_acidresidual_sugarchloridesfree_sulfur_dioxidetotal_sulfur_dioxidedensitypHsulphatesalcoholqualitycolor
count5847.0000005847.0000005847.0000005847.0000005847.0000005847.0000005847.0000005847.0000005847.0000005847.0000005847.0000005847.0000005847.000000
mean7.2161790.3397960.3191115.4174020.05631030.535403115.6735080.9946823.2183030.53159610.4944555.8205920.753891
std1.2996950.1648170.1461414.7363990.03581617.84552256.4325120.0029950.1599190.1497281.1898010.8723530.430780
min3.8000000.0800000.0000000.6000000.0090001.0000006.0000000.9871102.7200000.2200008.0000003.0000000.000000
25%6.4000000.2300000.2500001.8000000.03800017.00000077.5000000.9923003.1100000.4300009.5000005.0000001.000000
50%7.0000000.2900000.3100003.0000000.04700029.000000118.0000000.9948403.2100000.51000010.3000006.0000001.000000
75%7.7000000.4000000.3900008.1000000.06500041.000000155.5000000.9969853.3200000.60000011.3000006.0000001.000000
max15.9000001.5800001.66000065.8000000.611000289.000000440.0000001.0389804.0100002.00000014.9000009.0000001.000000
\n", "
" ], "text/plain": [ " fixed_acidity volatile_acidity citric_acid residual_sugar \\\n", "count 5847.000000 5847.000000 5847.000000 5847.000000 \n", "mean 7.216179 0.339796 0.319111 5.417402 \n", "std 1.299695 0.164817 0.146141 4.736399 \n", "min 3.800000 0.080000 0.000000 0.600000 \n", "25% 6.400000 0.230000 0.250000 1.800000 \n", "50% 7.000000 0.290000 0.310000 3.000000 \n", "75% 7.700000 0.400000 0.390000 8.100000 \n", "max 15.900000 1.580000 1.660000 65.800000 \n", "\n", " chlorides free_sulfur_dioxide total_sulfur_dioxide density \\\n", "count 5847.000000 5847.000000 5847.000000 5847.000000 \n", "mean 0.056310 30.535403 115.673508 0.994682 \n", "std 0.035816 17.845522 56.432512 0.002995 \n", "min 0.009000 1.000000 6.000000 0.987110 \n", "25% 0.038000 17.000000 77.500000 0.992300 \n", "50% 0.047000 29.000000 118.000000 0.994840 \n", "75% 0.065000 41.000000 155.500000 0.996985 \n", "max 0.611000 289.000000 440.000000 1.038980 \n", "\n", " pH sulphates alcohol quality color \n", "count 5847.000000 5847.000000 5847.000000 5847.000000 5847.000000 \n", "mean 3.218303 0.531596 10.494455 5.820592 0.753891 \n", "std 0.159919 0.149728 1.189801 0.872353 0.430780 \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", "max 4.010000 2.000000 14.900000 9.000000 1.000000 " ] }, "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wine_train.describe()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
fixed_acidityvolatile_aciditycitric_acidresidual_sugarchloridesfree_sulfur_dioxidetotal_sulfur_dioxidedensitypHsulphatesalcoholqualitycolor
count325.000000325.000000325.000000325.000000325.000000325.000000325.000000325.000000325.000000325.000000325.000000325.000000325.000000
mean7.2878460.3340310.3288316.1536920.05287431.095385119.4846150.9950913.2183080.52889210.4472825.7815380.753846
std1.3454710.1560230.1441925.2209440.02147117.86174159.4815800.0031500.1771760.1361711.2655930.9086170.431433
min4.7000000.0900000.0000000.8000000.0120003.0000008.0000000.9874602.8700000.2800008.4000003.0000000.000000
25%6.4000000.2300000.2600002.0000000.03900016.00000079.0000000.9927003.1000000.4300009.4000005.0000001.000000
50%7.1000000.2900000.3100004.5500000.04800029.000000125.0000000.9953203.2100000.50000010.2000006.0000001.000000
75%7.8000000.4000000.4000008.8000000.06000045.000000163.0000000.9974503.3200000.61000011.3000006.0000001.000000
max15.0000001.1800000.74000031.6000000.17000077.000000251.0000001.0103004.0100001.14000014.0000008.0000001.000000
\n", "
" ], "text/plain": [ " fixed_acidity volatile_acidity citric_acid residual_sugar \\\n", "count 325.000000 325.000000 325.000000 325.000000 \n", "mean 7.287846 0.334031 0.328831 6.153692 \n", "std 1.345471 0.156023 0.144192 5.220944 \n", "min 4.700000 0.090000 0.000000 0.800000 \n", "25% 6.400000 0.230000 0.260000 2.000000 \n", "50% 7.100000 0.290000 0.310000 4.550000 \n", "75% 7.800000 0.400000 0.400000 8.800000 \n", "max 15.000000 1.180000 0.740000 31.600000 \n", "\n", " chlorides free_sulfur_dioxide total_sulfur_dioxide density \\\n", "count 325.000000 325.000000 325.000000 325.000000 \n", "mean 0.052874 31.095385 119.484615 0.995091 \n", "std 0.021471 17.861741 59.481580 0.003150 \n", "min 0.012000 3.000000 8.000000 0.987460 \n", "25% 0.039000 16.000000 79.000000 0.992700 \n", "50% 0.048000 29.000000 125.000000 0.995320 \n", "75% 0.060000 45.000000 163.000000 0.997450 \n", "max 0.170000 77.000000 251.000000 1.010300 \n", "\n", " pH sulphates alcohol quality color \n", "count 325.000000 325.000000 325.000000 325.000000 325.000000 \n", "mean 3.218308 0.528892 10.447282 5.781538 0.753846 \n", "std 0.177176 0.136171 1.265593 0.908617 0.431433 \n", "min 2.870000 0.280000 8.400000 3.000000 0.000000 \n", "25% 3.100000 0.430000 9.400000 5.000000 1.000000 \n", "50% 3.210000 0.500000 10.200000 6.000000 1.000000 \n", "75% 3.320000 0.610000 11.300000 6.000000 1.000000 \n", "max 4.010000 1.140000 14.000000 8.000000 1.000000 " ] }, "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wine_val.describe()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.10" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }