diff --git a/IUM_1_434788.ipynb b/IUM_1_434788.ipynb
new file mode 100644
index 0000000..aa6d173
--- /dev/null
+++ b/IUM_1_434788.ipynb
@@ -0,0 +1,2688 @@
+{
+ "nbformat": 4,
+ "nbformat_minor": 0,
+ "metadata": {
+ "colab": {
+ "name": "IUM_1_434788.ipynb",
+ "provenance": [],
+ "collapsed_sections": [],
+ "toc_visible": true
+ },
+ "kernelspec": {
+ "name": "python3",
+ "display_name": "Python 3"
+ }
+ },
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "shaFKPEixPn4"
+ },
+ "source": [
+ "# 1. Pobranie zbioru danych z Repozytorium"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "-03GDjWtxD7W",
+ "outputId": "35c4ed64-62c4-47f9-a407-571b072bf831"
+ },
+ "source": [
+ "!curl -OL https://git.wmi.amu.edu.pl/s434788/ium_434788/raw/branch/master/winequality-red.csv"
+ ],
+ "execution_count": 1,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "text": [
+ " % Total % Received % Xferd Average Speed Time Time Time Current\n",
+ " Dload Upload Total Spent Left Speed\n",
+ "100 98k 0 98k 0 0 282k 0 --:--:-- --:--:-- --:--:-- 281k\n"
+ ],
+ "name": "stdout"
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 419
+ },
+ "id": "sAUNi0ylxWUm",
+ "outputId": "27072275-680f-4154-bdf2-e952a63ab25e"
+ },
+ "source": [
+ "import pandas as pd\n",
+ "wine=pd.read_csv('winequality-red.csv')\n",
+ "wine"
+ ],
+ "execution_count": 2,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/html": [
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " fixed acidity | \n",
+ " volatile acidity | \n",
+ " citric acid | \n",
+ " residual sugar | \n",
+ " chlorides | \n",
+ " free sulfur dioxide | \n",
+ " total sulfur dioxide | \n",
+ " density | \n",
+ " pH | \n",
+ " sulphates | \n",
+ " alcohol | \n",
+ " quality | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 7.4 | \n",
+ " 0.700 | \n",
+ " 0.00 | \n",
+ " 1.9 | \n",
+ " 0.076 | \n",
+ " 11.0 | \n",
+ " 34.0 | \n",
+ " 0.99780 | \n",
+ " 3.51 | \n",
+ " 0.56 | \n",
+ " 9.4 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " 7.8 | \n",
+ " 0.880 | \n",
+ " 0.00 | \n",
+ " 2.6 | \n",
+ " 0.098 | \n",
+ " 25.0 | \n",
+ " 67.0 | \n",
+ " 0.99680 | \n",
+ " 3.20 | \n",
+ " 0.68 | \n",
+ " 9.8 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 7.8 | \n",
+ " 0.760 | \n",
+ " 0.04 | \n",
+ " 2.3 | \n",
+ " 0.092 | \n",
+ " 15.0 | \n",
+ " 54.0 | \n",
+ " 0.99700 | \n",
+ " 3.26 | \n",
+ " 0.65 | \n",
+ " 9.8 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " 11.2 | \n",
+ " 0.280 | \n",
+ " 0.56 | \n",
+ " 1.9 | \n",
+ " 0.075 | \n",
+ " 17.0 | \n",
+ " 60.0 | \n",
+ " 0.99800 | \n",
+ " 3.16 | \n",
+ " 0.58 | \n",
+ " 9.8 | \n",
+ " 6 | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " 7.4 | \n",
+ " 0.700 | \n",
+ " 0.00 | \n",
+ " 1.9 | \n",
+ " 0.076 | \n",
+ " 11.0 | \n",
+ " 34.0 | \n",
+ " 0.99780 | \n",
+ " 3.51 | \n",
+ " 0.56 | \n",
+ " 9.4 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ "
\n",
+ " \n",
+ " 1594 | \n",
+ " 6.2 | \n",
+ " 0.600 | \n",
+ " 0.08 | \n",
+ " 2.0 | \n",
+ " 0.090 | \n",
+ " 32.0 | \n",
+ " 44.0 | \n",
+ " 0.99490 | \n",
+ " 3.45 | \n",
+ " 0.58 | \n",
+ " 10.5 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " 1595 | \n",
+ " 5.9 | \n",
+ " 0.550 | \n",
+ " 0.10 | \n",
+ " 2.2 | \n",
+ " 0.062 | \n",
+ " 39.0 | \n",
+ " 51.0 | \n",
+ " 0.99512 | \n",
+ " 3.52 | \n",
+ " 0.76 | \n",
+ " 11.2 | \n",
+ " 6 | \n",
+ "
\n",
+ " \n",
+ " 1596 | \n",
+ " 6.3 | \n",
+ " 0.510 | \n",
+ " 0.13 | \n",
+ " 2.3 | \n",
+ " 0.076 | \n",
+ " 29.0 | \n",
+ " 40.0 | \n",
+ " 0.99574 | \n",
+ " 3.42 | \n",
+ " 0.75 | \n",
+ " 11.0 | \n",
+ " 6 | \n",
+ "
\n",
+ " \n",
+ " 1597 | \n",
+ " 5.9 | \n",
+ " 0.645 | \n",
+ " 0.12 | \n",
+ " 2.0 | \n",
+ " 0.075 | \n",
+ " 32.0 | \n",
+ " 44.0 | \n",
+ " 0.99547 | \n",
+ " 3.57 | \n",
+ " 0.71 | \n",
+ " 10.2 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " 1598 | \n",
+ " 6.0 | \n",
+ " 0.310 | \n",
+ " 0.47 | \n",
+ " 3.6 | \n",
+ " 0.067 | \n",
+ " 18.0 | \n",
+ " 42.0 | \n",
+ " 0.99549 | \n",
+ " 3.39 | \n",
+ " 0.66 | \n",
+ " 11.0 | \n",
+ " 6 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
1599 rows × 12 columns
\n",
+ "
"
+ ],
+ "text/plain": [
+ " fixed acidity volatile acidity citric acid ... sulphates alcohol quality\n",
+ "0 7.4 0.700 0.00 ... 0.56 9.4 5\n",
+ "1 7.8 0.880 0.00 ... 0.68 9.8 5\n",
+ "2 7.8 0.760 0.04 ... 0.65 9.8 5\n",
+ "3 11.2 0.280 0.56 ... 0.58 9.8 6\n",
+ "4 7.4 0.700 0.00 ... 0.56 9.4 5\n",
+ "... ... ... ... ... ... ... ...\n",
+ "1594 6.2 0.600 0.08 ... 0.58 10.5 5\n",
+ "1595 5.9 0.550 0.10 ... 0.76 11.2 6\n",
+ "1596 6.3 0.510 0.13 ... 0.75 11.0 6\n",
+ "1597 5.9 0.645 0.12 ... 0.71 10.2 5\n",
+ "1598 6.0 0.310 0.47 ... 0.66 11.0 6\n",
+ "\n",
+ "[1599 rows x 12 columns]"
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 2
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "4H-i6DJlxduP"
+ },
+ "source": [
+ "# 2. Podział na zbiory test/train przy pomocy SciKit"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "nZO_naLatT0o"
+ },
+ "source": [
+ "Próbowałem również podzielić na podzbiory Train:Dev:Test 6:2:2 Przy pomocy basha ale uznałem, że wygodniejsze jest korzystanie z \"train_test_split()\". Docelowo podział będzie dokonywany na 4 zmienne ` X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33, random_state=42)`, jednak chciałem zachować konwencje z przykładu, z ćwiczeń."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "ebHl5Aw1uuK1"
+ },
+ "source": [
+ "https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "id": "X88VMhb0x3gJ"
+ },
+ "source": [
+ "from sklearn.model_selection import train_test_split\n",
+ "\n",
+ "wine_train, wine_test = train_test_split(wine, test_size=360,train_size=959, random_state=1)"
+ ],
+ "execution_count": 3,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "OzjEfgNOyAWs",
+ "outputId": "0035e197-98c9-4a15-c1f9-23742d6a0595"
+ },
+ "source": [
+ "wine_test[\"quality\"].value_counts()"
+ ],
+ "execution_count": 4,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "5 155\n",
+ "6 149\n",
+ "7 37\n",
+ "4 16\n",
+ "8 2\n",
+ "3 1\n",
+ "Name: quality, dtype: int64"
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 4
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "SpQZIuSxyAd0",
+ "outputId": "6302469b-8853-45ea-b4d4-eae6078e96cf"
+ },
+ "source": [
+ "wine_train[\"quality\"].value_counts()"
+ ],
+ "execution_count": 5,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "5 400\n",
+ "6 388\n",
+ "7 125\n",
+ "4 30\n",
+ "8 11\n",
+ "3 5\n",
+ "Name: quality, dtype: int64"
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 5
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "wAq8KmNdyNOm"
+ },
+ "source": [
+ "# 3. Statystyki dla zbior"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "id": "Wcq9YSTfXbs1"
+ },
+ "source": [
+ "from matplotlib import pyplot as plt\n",
+ "import seaborn as sns"
+ ],
+ "execution_count": 6,
+ "outputs": []
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "EjDFpgdPy_of"
+ },
+ "source": [
+ "## 3.1. Zbiór Train"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 419
+ },
+ "id": "SscUak3AydG0",
+ "outputId": "edcf5523-066f-4c75-bc9c-1628a413edf7"
+ },
+ "source": [
+ "wine_train"
+ ],
+ "execution_count": 7,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " fixed acidity | \n",
+ " volatile acidity | \n",
+ " citric acid | \n",
+ " residual sugar | \n",
+ " chlorides | \n",
+ " free sulfur dioxide | \n",
+ " total sulfur dioxide | \n",
+ " density | \n",
+ " pH | \n",
+ " sulphates | \n",
+ " alcohol | \n",
+ " quality | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 1589 | \n",
+ " 6.6 | \n",
+ " 0.725 | \n",
+ " 0.20 | \n",
+ " 7.8 | \n",
+ " 0.073 | \n",
+ " 29.0 | \n",
+ " 79.0 | \n",
+ " 0.99770 | \n",
+ " 3.29 | \n",
+ " 0.54 | \n",
+ " 9.2 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " 854 | \n",
+ " 9.3 | \n",
+ " 0.360 | \n",
+ " 0.39 | \n",
+ " 1.5 | \n",
+ " 0.080 | \n",
+ " 41.0 | \n",
+ " 55.0 | \n",
+ " 0.99652 | \n",
+ " 3.47 | \n",
+ " 0.73 | \n",
+ " 10.9 | \n",
+ " 6 | \n",
+ "
\n",
+ " \n",
+ " 83 | \n",
+ " 7.3 | \n",
+ " 0.670 | \n",
+ " 0.26 | \n",
+ " 1.8 | \n",
+ " 0.401 | \n",
+ " 16.0 | \n",
+ " 51.0 | \n",
+ " 0.99690 | \n",
+ " 3.16 | \n",
+ " 1.14 | \n",
+ " 9.4 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " 1106 | \n",
+ " 8.2 | \n",
+ " 0.230 | \n",
+ " 0.42 | \n",
+ " 1.9 | \n",
+ " 0.069 | \n",
+ " 9.0 | \n",
+ " 17.0 | \n",
+ " 0.99376 | \n",
+ " 3.21 | \n",
+ " 0.54 | \n",
+ " 12.3 | \n",
+ " 6 | \n",
+ "
\n",
+ " \n",
+ " 650 | \n",
+ " 10.7 | \n",
+ " 0.430 | \n",
+ " 0.39 | \n",
+ " 2.2 | \n",
+ " 0.106 | \n",
+ " 8.0 | \n",
+ " 32.0 | \n",
+ " 0.99860 | \n",
+ " 2.89 | \n",
+ " 0.50 | \n",
+ " 9.6 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ "
\n",
+ " \n",
+ " 526 | \n",
+ " 7.3 | \n",
+ " 0.365 | \n",
+ " 0.49 | \n",
+ " 2.5 | \n",
+ " 0.088 | \n",
+ " 39.0 | \n",
+ " 106.0 | \n",
+ " 0.99660 | \n",
+ " 3.36 | \n",
+ " 0.78 | \n",
+ " 11.0 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " 583 | \n",
+ " 12.0 | \n",
+ " 0.280 | \n",
+ " 0.49 | \n",
+ " 1.9 | \n",
+ " 0.074 | \n",
+ " 10.0 | \n",
+ " 21.0 | \n",
+ " 0.99760 | \n",
+ " 2.98 | \n",
+ " 0.66 | \n",
+ " 9.9 | \n",
+ " 7 | \n",
+ "
\n",
+ " \n",
+ " 975 | \n",
+ " 7.2 | \n",
+ " 0.410 | \n",
+ " 0.30 | \n",
+ " 2.1 | \n",
+ " 0.083 | \n",
+ " 35.0 | \n",
+ " 72.0 | \n",
+ " 0.99700 | \n",
+ " 3.44 | \n",
+ " 0.52 | \n",
+ " 9.4 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " 566 | \n",
+ " 8.7 | \n",
+ " 0.700 | \n",
+ " 0.24 | \n",
+ " 2.5 | \n",
+ " 0.226 | \n",
+ " 5.0 | \n",
+ " 15.0 | \n",
+ " 0.99910 | \n",
+ " 3.32 | \n",
+ " 0.60 | \n",
+ " 9.0 | \n",
+ " 6 | \n",
+ "
\n",
+ " \n",
+ " 1232 | \n",
+ " 7.6 | \n",
+ " 0.430 | \n",
+ " 0.29 | \n",
+ " 2.1 | \n",
+ " 0.075 | \n",
+ " 19.0 | \n",
+ " 66.0 | \n",
+ " 0.99718 | \n",
+ " 3.40 | \n",
+ " 0.64 | \n",
+ " 9.5 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
959 rows × 12 columns
\n",
+ "
"
+ ],
+ "text/plain": [
+ " fixed acidity volatile acidity citric acid ... sulphates alcohol quality\n",
+ "1589 6.6 0.725 0.20 ... 0.54 9.2 5\n",
+ "854 9.3 0.360 0.39 ... 0.73 10.9 6\n",
+ "83 7.3 0.670 0.26 ... 1.14 9.4 5\n",
+ "1106 8.2 0.230 0.42 ... 0.54 12.3 6\n",
+ "650 10.7 0.430 0.39 ... 0.50 9.6 5\n",
+ "... ... ... ... ... ... ... ...\n",
+ "526 7.3 0.365 0.49 ... 0.78 11.0 5\n",
+ "583 12.0 0.280 0.49 ... 0.66 9.9 7\n",
+ "975 7.2 0.410 0.30 ... 0.52 9.4 5\n",
+ "566 8.7 0.700 0.24 ... 0.60 9.0 6\n",
+ "1232 7.6 0.430 0.29 ... 0.64 9.5 5\n",
+ "\n",
+ "[959 rows x 12 columns]"
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 7
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "hZAn8j4byMF2",
+ "outputId": "9d7d799f-7018-4b9d-9d4c-153abe0a53f3"
+ },
+ "source": [
+ "wine_train[\"quality\"].value_counts()"
+ ],
+ "execution_count": 8,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "5 400\n",
+ "6 388\n",
+ "7 125\n",
+ "4 30\n",
+ "8 11\n",
+ "3 5\n",
+ "Name: quality, dtype: int64"
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 8
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 297
+ },
+ "id": "EOEuj8sRyL8v",
+ "outputId": "cb7c369c-9bdd-457a-98fe-3537c569730b"
+ },
+ "source": [
+ "wine_train.describe(include='all')"
+ ],
+ "execution_count": 9,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " fixed acidity | \n",
+ " volatile acidity | \n",
+ " citric acid | \n",
+ " residual sugar | \n",
+ " chlorides | \n",
+ " free sulfur dioxide | \n",
+ " total sulfur dioxide | \n",
+ " density | \n",
+ " pH | \n",
+ " sulphates | \n",
+ " alcohol | \n",
+ " quality | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " count | \n",
+ " 959.000000 | \n",
+ " 959.000000 | \n",
+ " 959.000000 | \n",
+ " 959.000000 | \n",
+ " 959.000000 | \n",
+ " 959.000000 | \n",
+ " 959.000000 | \n",
+ " 959.000000 | \n",
+ " 959.00000 | \n",
+ " 959.000000 | \n",
+ " 959.000000 | \n",
+ " 959.000000 | \n",
+ "
\n",
+ " \n",
+ " mean | \n",
+ " 8.329093 | \n",
+ " 0.526809 | \n",
+ " 0.269864 | \n",
+ " 2.493743 | \n",
+ " 0.088230 | \n",
+ " 15.883733 | \n",
+ " 45.738790 | \n",
+ " 0.996736 | \n",
+ " 3.31048 | \n",
+ " 0.661481 | \n",
+ " 10.433160 | \n",
+ " 5.657977 | \n",
+ "
\n",
+ " \n",
+ " std | \n",
+ " 1.808394 | \n",
+ " 0.175221 | \n",
+ " 0.198377 | \n",
+ " 1.262329 | \n",
+ " 0.050555 | \n",
+ " 10.485739 | \n",
+ " 31.897095 | \n",
+ " 0.001925 | \n",
+ " 0.15462 | \n",
+ " 0.171639 | \n",
+ " 1.084349 | \n",
+ " 0.805654 | \n",
+ "
\n",
+ " \n",
+ " min | \n",
+ " 4.600000 | \n",
+ " 0.120000 | \n",
+ " 0.000000 | \n",
+ " 0.900000 | \n",
+ " 0.012000 | \n",
+ " 1.000000 | \n",
+ " 6.000000 | \n",
+ " 0.990070 | \n",
+ " 2.74000 | \n",
+ " 0.370000 | \n",
+ " 8.400000 | \n",
+ " 3.000000 | \n",
+ "
\n",
+ " \n",
+ " 25% | \n",
+ " 7.100000 | \n",
+ " 0.400000 | \n",
+ " 0.090000 | \n",
+ " 1.900000 | \n",
+ " 0.070000 | \n",
+ " 7.000000 | \n",
+ " 22.000000 | \n",
+ " 0.995540 | \n",
+ " 3.21000 | \n",
+ " 0.550000 | \n",
+ " 9.500000 | \n",
+ " 5.000000 | \n",
+ "
\n",
+ " \n",
+ " 50% | \n",
+ " 7.900000 | \n",
+ " 0.520000 | \n",
+ " 0.250000 | \n",
+ " 2.200000 | \n",
+ " 0.079000 | \n",
+ " 14.000000 | \n",
+ " 37.000000 | \n",
+ " 0.996770 | \n",
+ " 3.31000 | \n",
+ " 0.620000 | \n",
+ " 10.100000 | \n",
+ " 6.000000 | \n",
+ "
\n",
+ " \n",
+ " 75% | \n",
+ " 9.300000 | \n",
+ " 0.635000 | \n",
+ " 0.430000 | \n",
+ " 2.600000 | \n",
+ " 0.090000 | \n",
+ " 22.000000 | \n",
+ " 61.000000 | \n",
+ " 0.997870 | \n",
+ " 3.40000 | \n",
+ " 0.730000 | \n",
+ " 11.100000 | \n",
+ " 6.000000 | \n",
+ "
\n",
+ " \n",
+ " max | \n",
+ " 15.900000 | \n",
+ " 1.330000 | \n",
+ " 1.000000 | \n",
+ " 15.400000 | \n",
+ " 0.610000 | \n",
+ " 72.000000 | \n",
+ " 278.000000 | \n",
+ " 1.003690 | \n",
+ " 4.01000 | \n",
+ " 2.000000 | \n",
+ " 14.900000 | \n",
+ " 8.000000 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " fixed acidity volatile acidity ... alcohol quality\n",
+ "count 959.000000 959.000000 ... 959.000000 959.000000\n",
+ "mean 8.329093 0.526809 ... 10.433160 5.657977\n",
+ "std 1.808394 0.175221 ... 1.084349 0.805654\n",
+ "min 4.600000 0.120000 ... 8.400000 3.000000\n",
+ "25% 7.100000 0.400000 ... 9.500000 5.000000\n",
+ "50% 7.900000 0.520000 ... 10.100000 6.000000\n",
+ "75% 9.300000 0.635000 ... 11.100000 6.000000\n",
+ "max 15.900000 1.330000 ... 14.900000 8.000000\n",
+ "\n",
+ "[8 rows x 12 columns]"
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 9
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "JWXJ2CZQuylE"
+ },
+ "source": [
+ "Testowy Wykres (quality, volatile acidity)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 405
+ },
+ "id": "HbsfwCL7XpNe",
+ "outputId": "3e95f7ba-b73f-4861-e3a5-c3ec3029e3a5"
+ },
+ "source": [
+ "fig = plt.figure(figsize = (10,6))\n",
+ "sns.barplot(x = 'quality', y = 'volatile acidity', data = wine)"
+ ],
+ "execution_count": 10,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 10
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAA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JN8yONNRo4RNrKq2VNV9Z8/vmeSRSd49NtVy6+6f6e5Tu/v0rE4ZvK67l+Yvp0VUVSdW1Ul3PE/ynUneNTbVcuvulSQ3V9X9Z7sekeT6gZE2kotiKnK9vD/JQ6rqXrMvuj0iyQ2DMx01k14xnyTJVyR5yeybNMcluby7XTKBZfPlSV61+t/IbE7y0u7+k7GRNoQfT/L7s+mxG5M8YXCepTf7I+ORSX50dJaNoLvfUlVXJHlrktuSvC1LdOV8l6gAABjAdCQAwABKGADAAEoYAMAAShgAwABKGADAAEoYwExVnV5V75o931ZVvzx7/vCqWpoLRAKLwXXCAA6gu3cl2TXbfHiSTyT562GBgKXjTBiwFKrqGVX1d1X1V1X1sqr66ap6Q1Vtmx0/eXYrqzvOeP1lVb119nOXs1yzs19/XFWnJ/mxJE+tqmur6tuq6r1VdY/ZuHuv3QaYlzNhwDGvqr4xq7eoemBW/7v21iSHuoH7LUke2d2fqaozs3oLmm0HGtjd76uqX0/yie5+3uz93pDku5L84ex9Xzm7rx3A3JwJA5bBtyV5VXd/qrs/luTKw4y/R5LfqKp3JnlFkrOO8P1elH+5RdATkrz4CH8fwJkwYKndln/5Y/OENfufmuQfk3zD7PhnjuRFu/tNsynNhyfZ1N1uVg4cMWfCgGXwF0n+Y1Xds6pOSvLds/3vS/KNs+ePXTP+Pkk+0N23J3l8kk2Hef2PJzlpv32/k+SlcRYMuJuUMOCY191vTfIHSd6e5DVJrp4del6S/1JVb0ty8ppf+dUkP1RVb0/yNUk+eZi3eHWS/3THwvzZvt9P8sVZXU8GcMSqu0dnADiqqurnsmYh/UTv8dgkF3T346d6D2C5WRMGcISq6gVJzkvyqNFZgGOXM2EAAANYEwYAMIASBgAwgBIGADCAEgYAMIASBgAwgBIGADDA/wcZSI2TQNquRgAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "tags": [],
+ "needs_background": "light"
+ }
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "1W_oRCVczIgJ"
+ },
+ "source": [
+ "## 3.2. Zbiór Test"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 419
+ },
+ "id": "LJzygNqKzOWY",
+ "outputId": "b5751c9a-6f9e-48b8-88c2-0b6feec17af9"
+ },
+ "source": [
+ "wine_test"
+ ],
+ "execution_count": 11,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " fixed acidity | \n",
+ " volatile acidity | \n",
+ " citric acid | \n",
+ " residual sugar | \n",
+ " chlorides | \n",
+ " free sulfur dioxide | \n",
+ " total sulfur dioxide | \n",
+ " density | \n",
+ " pH | \n",
+ " sulphates | \n",
+ " alcohol | \n",
+ " quality | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 75 | \n",
+ " 8.8 | \n",
+ " 0.410 | \n",
+ " 0.64 | \n",
+ " 2.2 | \n",
+ " 0.093 | \n",
+ " 9.0 | \n",
+ " 42.0 | \n",
+ " 0.99860 | \n",
+ " 3.54 | \n",
+ " 0.66 | \n",
+ " 10.5 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " 1283 | \n",
+ " 8.7 | \n",
+ " 0.630 | \n",
+ " 0.28 | \n",
+ " 2.7 | \n",
+ " 0.096 | \n",
+ " 17.0 | \n",
+ " 69.0 | \n",
+ " 0.99734 | \n",
+ " 3.26 | \n",
+ " 0.63 | \n",
+ " 10.2 | \n",
+ " 6 | \n",
+ "
\n",
+ " \n",
+ " 408 | \n",
+ " 10.4 | \n",
+ " 0.340 | \n",
+ " 0.58 | \n",
+ " 3.7 | \n",
+ " 0.174 | \n",
+ " 6.0 | \n",
+ " 16.0 | \n",
+ " 0.99700 | \n",
+ " 3.19 | \n",
+ " 0.70 | \n",
+ " 11.3 | \n",
+ " 6 | \n",
+ "
\n",
+ " \n",
+ " 1281 | \n",
+ " 7.1 | \n",
+ " 0.460 | \n",
+ " 0.20 | \n",
+ " 1.9 | \n",
+ " 0.077 | \n",
+ " 28.0 | \n",
+ " 54.0 | \n",
+ " 0.99560 | \n",
+ " 3.37 | \n",
+ " 0.64 | \n",
+ " 10.4 | \n",
+ " 6 | \n",
+ "
\n",
+ " \n",
+ " 1118 | \n",
+ " 7.1 | \n",
+ " 0.390 | \n",
+ " 0.12 | \n",
+ " 2.1 | \n",
+ " 0.065 | \n",
+ " 14.0 | \n",
+ " 24.0 | \n",
+ " 0.99252 | \n",
+ " 3.30 | \n",
+ " 0.53 | \n",
+ " 13.3 | \n",
+ " 6 | \n",
+ "
\n",
+ " \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ "
\n",
+ " \n",
+ " 1461 | \n",
+ " 6.2 | \n",
+ " 0.785 | \n",
+ " 0.00 | \n",
+ " 2.1 | \n",
+ " 0.060 | \n",
+ " 6.0 | \n",
+ " 13.0 | \n",
+ " 0.99664 | \n",
+ " 3.59 | \n",
+ " 0.61 | \n",
+ " 10.0 | \n",
+ " 4 | \n",
+ "
\n",
+ " \n",
+ " 1016 | \n",
+ " 8.9 | \n",
+ " 0.380 | \n",
+ " 0.40 | \n",
+ " 2.2 | \n",
+ " 0.068 | \n",
+ " 12.0 | \n",
+ " 28.0 | \n",
+ " 0.99486 | \n",
+ " 3.27 | \n",
+ " 0.75 | \n",
+ " 12.6 | \n",
+ " 7 | \n",
+ "
\n",
+ " \n",
+ " 1412 | \n",
+ " 8.2 | \n",
+ " 0.240 | \n",
+ " 0.34 | \n",
+ " 5.1 | \n",
+ " 0.062 | \n",
+ " 8.0 | \n",
+ " 22.0 | \n",
+ " 0.99740 | \n",
+ " 3.22 | \n",
+ " 0.94 | \n",
+ " 10.9 | \n",
+ " 6 | \n",
+ "
\n",
+ " \n",
+ " 424 | \n",
+ " 7.7 | \n",
+ " 0.960 | \n",
+ " 0.20 | \n",
+ " 2.0 | \n",
+ " 0.047 | \n",
+ " 15.0 | \n",
+ " 60.0 | \n",
+ " 0.99550 | \n",
+ " 3.36 | \n",
+ " 0.44 | \n",
+ " 10.9 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " 120 | \n",
+ " 7.3 | \n",
+ " 1.070 | \n",
+ " 0.09 | \n",
+ " 1.7 | \n",
+ " 0.178 | \n",
+ " 10.0 | \n",
+ " 89.0 | \n",
+ " 0.99620 | \n",
+ " 3.30 | \n",
+ " 0.57 | \n",
+ " 9.0 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
360 rows × 12 columns
\n",
+ "
"
+ ],
+ "text/plain": [
+ " fixed acidity volatile acidity citric acid ... sulphates alcohol quality\n",
+ "75 8.8 0.410 0.64 ... 0.66 10.5 5\n",
+ "1283 8.7 0.630 0.28 ... 0.63 10.2 6\n",
+ "408 10.4 0.340 0.58 ... 0.70 11.3 6\n",
+ "1281 7.1 0.460 0.20 ... 0.64 10.4 6\n",
+ "1118 7.1 0.390 0.12 ... 0.53 13.3 6\n",
+ "... ... ... ... ... ... ... ...\n",
+ "1461 6.2 0.785 0.00 ... 0.61 10.0 4\n",
+ "1016 8.9 0.380 0.40 ... 0.75 12.6 7\n",
+ "1412 8.2 0.240 0.34 ... 0.94 10.9 6\n",
+ "424 7.7 0.960 0.20 ... 0.44 10.9 5\n",
+ "120 7.3 1.070 0.09 ... 0.57 9.0 5\n",
+ "\n",
+ "[360 rows x 12 columns]"
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 11
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "1IAtBylEzS8w",
+ "outputId": "538fe66b-8dc1-4338-d0d8-492fbef2940e"
+ },
+ "source": [
+ "wine_test[\"quality\"].value_counts()"
+ ],
+ "execution_count": 12,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "5 155\n",
+ "6 149\n",
+ "7 37\n",
+ "4 16\n",
+ "8 2\n",
+ "3 1\n",
+ "Name: quality, dtype: int64"
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 12
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 297
+ },
+ "id": "V-9cwcrczS-3",
+ "outputId": "78da725e-3105-4d3e-8880-00dbc8cf8910"
+ },
+ "source": [
+ "wine_test.describe(include='all')"
+ ],
+ "execution_count": 13,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " fixed acidity | \n",
+ " volatile acidity | \n",
+ " citric acid | \n",
+ " residual sugar | \n",
+ " chlorides | \n",
+ " free sulfur dioxide | \n",
+ " total sulfur dioxide | \n",
+ " density | \n",
+ " pH | \n",
+ " sulphates | \n",
+ " alcohol | \n",
+ " quality | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " count | \n",
+ " 360.000000 | \n",
+ " 360.000000 | \n",
+ " 360.000000 | \n",
+ " 360.000000 | \n",
+ " 360.000000 | \n",
+ " 360.000000 | \n",
+ " 360.000000 | \n",
+ " 360.000000 | \n",
+ " 360.000000 | \n",
+ " 360.000000 | \n",
+ " 360.000000 | \n",
+ " 360.000000 | \n",
+ "
\n",
+ " \n",
+ " mean | \n",
+ " 8.348611 | \n",
+ " 0.518764 | \n",
+ " 0.275444 | \n",
+ " 2.542222 | \n",
+ " 0.086114 | \n",
+ " 16.093056 | \n",
+ " 48.777778 | \n",
+ " 0.996747 | \n",
+ " 3.301083 | \n",
+ " 0.653833 | \n",
+ " 10.368889 | \n",
+ " 5.586111 | \n",
+ "
\n",
+ " \n",
+ " std | \n",
+ " 1.580574 | \n",
+ " 0.182554 | \n",
+ " 0.182508 | \n",
+ " 1.528465 | \n",
+ " 0.043445 | \n",
+ " 10.421097 | \n",
+ " 35.005778 | \n",
+ " 0.001792 | \n",
+ " 0.145379 | \n",
+ " 0.168306 | \n",
+ " 1.041729 | \n",
+ " 0.767245 | \n",
+ "
\n",
+ " \n",
+ " min | \n",
+ " 5.000000 | \n",
+ " 0.120000 | \n",
+ " 0.000000 | \n",
+ " 0.900000 | \n",
+ " 0.042000 | \n",
+ " 3.000000 | \n",
+ " 6.000000 | \n",
+ " 0.990070 | \n",
+ " 2.870000 | \n",
+ " 0.370000 | \n",
+ " 8.700000 | \n",
+ " 3.000000 | \n",
+ "
\n",
+ " \n",
+ " 25% | \n",
+ " 7.200000 | \n",
+ " 0.380000 | \n",
+ " 0.120000 | \n",
+ " 1.900000 | \n",
+ " 0.070000 | \n",
+ " 8.000000 | \n",
+ " 23.000000 | \n",
+ " 0.995760 | \n",
+ " 3.210000 | \n",
+ " 0.550000 | \n",
+ " 9.500000 | \n",
+ " 5.000000 | \n",
+ "
\n",
+ " \n",
+ " 50% | \n",
+ " 8.000000 | \n",
+ " 0.500000 | \n",
+ " 0.270000 | \n",
+ " 2.150000 | \n",
+ " 0.079000 | \n",
+ " 14.000000 | \n",
+ " 40.000000 | \n",
+ " 0.996645 | \n",
+ " 3.300000 | \n",
+ " 0.620000 | \n",
+ " 10.100000 | \n",
+ " 6.000000 | \n",
+ "
\n",
+ " \n",
+ " 75% | \n",
+ " 9.200000 | \n",
+ " 0.640000 | \n",
+ " 0.420000 | \n",
+ " 2.600000 | \n",
+ " 0.090000 | \n",
+ " 21.000000 | \n",
+ " 65.750000 | \n",
+ " 0.997683 | \n",
+ " 3.390000 | \n",
+ " 0.720000 | \n",
+ " 11.000000 | \n",
+ " 6.000000 | \n",
+ "
\n",
+ " \n",
+ " max | \n",
+ " 15.600000 | \n",
+ " 1.115000 | \n",
+ " 0.790000 | \n",
+ " 15.500000 | \n",
+ " 0.611000 | \n",
+ " 68.000000 | \n",
+ " 289.000000 | \n",
+ " 1.003690 | \n",
+ " 3.750000 | \n",
+ " 1.950000 | \n",
+ " 14.000000 | \n",
+ " 8.000000 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " fixed acidity volatile acidity ... alcohol quality\n",
+ "count 360.000000 360.000000 ... 360.000000 360.000000\n",
+ "mean 8.348611 0.518764 ... 10.368889 5.586111\n",
+ "std 1.580574 0.182554 ... 1.041729 0.767245\n",
+ "min 5.000000 0.120000 ... 8.700000 3.000000\n",
+ "25% 7.200000 0.380000 ... 9.500000 5.000000\n",
+ "50% 8.000000 0.500000 ... 10.100000 6.000000\n",
+ "75% 9.200000 0.640000 ... 11.000000 6.000000\n",
+ "max 15.600000 1.115000 ... 14.000000 8.000000\n",
+ "\n",
+ "[8 rows x 12 columns]"
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 13
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "wzaUXARnu824"
+ },
+ "source": [
+ "Testowy Wykres (quality, volatile acidity)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 405
+ },
+ "id": "3GksWzExaHV7",
+ "outputId": "e7076b4b-79b9-4c9b-a1e8-44b5897175ce"
+ },
+ "source": [
+ "fig = plt.figure(figsize = (10,6))\n",
+ "sns.barplot(x = 'quality', y = 'volatile acidity', data = wine)"
+ ],
+ "execution_count": 14,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 14
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAmEAAAFzCAYAAAB2A95GAAAABHNCSVQICA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8yfcked/YVPOtuxeS3FJVD5ntemyS9w+MtJFcGFORa+UjSR5ZVfebfdHtsUluHJzpqJl0xXySJF+R5FWzb9Icl+S13W3JBObNlyd5w+J/I7M5yau7+81jI20IP5nk92bTYzcleergPHNv9kfGdyf58dFZNoLuvrqqrkjyriR3JLkuc7RyviUqAAAGMB0JADCAEgYAMIASBgAwgBIGADCAEgYAMIASBjBTVadV1ftmz7dX1S/Pnj+mquZmgUhgfbBOGMBBdPfuJLtnm49J8ukkfzksEDB3jIQBc6GqnldVf1NVf1FVr6mqn6mqt1bV9tnxLbNbWR0Y8frzqnrX7Oceo1yz0a8/qqrTkvxEkmdV1fVV9R1V9aGqus/svPsv3QZYLSNhwDGvqr4pi7eoelgW/7v2riQr3cD91iTf3d2fr6ozsngLmu0HO7G7P1xVv5Hk0939ktn7vTXJ9yX5g9n7vn52XzuAVTMSBsyD70jyhu7+bHd/MsmVhzn/Pkn+d1W9N8nrkpx5hO/38vzLLYKemuSVR/j7AEbCgLl2R/7lj80Tlux/VpK/T/KNs+OfP5IX7e53zKY0H5NkU3e7WTlwxIyEAfPg7Un+fVXdt6pOSvL9s/0fTvJNs+dPXHL+A5J8tLvvSvKUJJsO8/qfSnLSsn2/neTVMQoG3EtKGHDM6+53Jfn9JO9O8qYk18wOvSTJf66q65JsWfIrv5bkR6rq3Um+NslnDvMWb0zyHw5cmD/b93tJHpTF68kAjlh19+gMAEdVVf1cllxIP9F7PDHJ+d39lKneA5hvrgkDOEJV9StJzk3yuNFZgGOXkTAAgAFcEwYAMIASBgAwgBIGADCAEgYAMIASBgAwgBIGADDA/weCFHipYzCNcAAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "tags": [],
+ "needs_background": "light"
+ }
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "w5xmkUgGzdxs"
+ },
+ "source": [
+ "## 3.3. Cały zbiór"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 419
+ },
+ "id": "thGHHVJXzeGe",
+ "outputId": "84c93f9c-516a-43fd-d4d8-656907ba66ac"
+ },
+ "source": [
+ "wine"
+ ],
+ "execution_count": 15,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " fixed acidity | \n",
+ " volatile acidity | \n",
+ " citric acid | \n",
+ " residual sugar | \n",
+ " chlorides | \n",
+ " free sulfur dioxide | \n",
+ " total sulfur dioxide | \n",
+ " density | \n",
+ " pH | \n",
+ " sulphates | \n",
+ " alcohol | \n",
+ " quality | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 7.4 | \n",
+ " 0.700 | \n",
+ " 0.00 | \n",
+ " 1.9 | \n",
+ " 0.076 | \n",
+ " 11.0 | \n",
+ " 34.0 | \n",
+ " 0.99780 | \n",
+ " 3.51 | \n",
+ " 0.56 | \n",
+ " 9.4 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " 7.8 | \n",
+ " 0.880 | \n",
+ " 0.00 | \n",
+ " 2.6 | \n",
+ " 0.098 | \n",
+ " 25.0 | \n",
+ " 67.0 | \n",
+ " 0.99680 | \n",
+ " 3.20 | \n",
+ " 0.68 | \n",
+ " 9.8 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 7.8 | \n",
+ " 0.760 | \n",
+ " 0.04 | \n",
+ " 2.3 | \n",
+ " 0.092 | \n",
+ " 15.0 | \n",
+ " 54.0 | \n",
+ " 0.99700 | \n",
+ " 3.26 | \n",
+ " 0.65 | \n",
+ " 9.8 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " 11.2 | \n",
+ " 0.280 | \n",
+ " 0.56 | \n",
+ " 1.9 | \n",
+ " 0.075 | \n",
+ " 17.0 | \n",
+ " 60.0 | \n",
+ " 0.99800 | \n",
+ " 3.16 | \n",
+ " 0.58 | \n",
+ " 9.8 | \n",
+ " 6 | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " 7.4 | \n",
+ " 0.700 | \n",
+ " 0.00 | \n",
+ " 1.9 | \n",
+ " 0.076 | \n",
+ " 11.0 | \n",
+ " 34.0 | \n",
+ " 0.99780 | \n",
+ " 3.51 | \n",
+ " 0.56 | \n",
+ " 9.4 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ "
\n",
+ " \n",
+ " 1594 | \n",
+ " 6.2 | \n",
+ " 0.600 | \n",
+ " 0.08 | \n",
+ " 2.0 | \n",
+ " 0.090 | \n",
+ " 32.0 | \n",
+ " 44.0 | \n",
+ " 0.99490 | \n",
+ " 3.45 | \n",
+ " 0.58 | \n",
+ " 10.5 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " 1595 | \n",
+ " 5.9 | \n",
+ " 0.550 | \n",
+ " 0.10 | \n",
+ " 2.2 | \n",
+ " 0.062 | \n",
+ " 39.0 | \n",
+ " 51.0 | \n",
+ " 0.99512 | \n",
+ " 3.52 | \n",
+ " 0.76 | \n",
+ " 11.2 | \n",
+ " 6 | \n",
+ "
\n",
+ " \n",
+ " 1596 | \n",
+ " 6.3 | \n",
+ " 0.510 | \n",
+ " 0.13 | \n",
+ " 2.3 | \n",
+ " 0.076 | \n",
+ " 29.0 | \n",
+ " 40.0 | \n",
+ " 0.99574 | \n",
+ " 3.42 | \n",
+ " 0.75 | \n",
+ " 11.0 | \n",
+ " 6 | \n",
+ "
\n",
+ " \n",
+ " 1597 | \n",
+ " 5.9 | \n",
+ " 0.645 | \n",
+ " 0.12 | \n",
+ " 2.0 | \n",
+ " 0.075 | \n",
+ " 32.0 | \n",
+ " 44.0 | \n",
+ " 0.99547 | \n",
+ " 3.57 | \n",
+ " 0.71 | \n",
+ " 10.2 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " 1598 | \n",
+ " 6.0 | \n",
+ " 0.310 | \n",
+ " 0.47 | \n",
+ " 3.6 | \n",
+ " 0.067 | \n",
+ " 18.0 | \n",
+ " 42.0 | \n",
+ " 0.99549 | \n",
+ " 3.39 | \n",
+ " 0.66 | \n",
+ " 11.0 | \n",
+ " 6 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
1599 rows × 12 columns
\n",
+ "
"
+ ],
+ "text/plain": [
+ " fixed acidity volatile acidity citric acid ... sulphates alcohol quality\n",
+ "0 7.4 0.700 0.00 ... 0.56 9.4 5\n",
+ "1 7.8 0.880 0.00 ... 0.68 9.8 5\n",
+ "2 7.8 0.760 0.04 ... 0.65 9.8 5\n",
+ "3 11.2 0.280 0.56 ... 0.58 9.8 6\n",
+ "4 7.4 0.700 0.00 ... 0.56 9.4 5\n",
+ "... ... ... ... ... ... ... ...\n",
+ "1594 6.2 0.600 0.08 ... 0.58 10.5 5\n",
+ "1595 5.9 0.550 0.10 ... 0.76 11.2 6\n",
+ "1596 6.3 0.510 0.13 ... 0.75 11.0 6\n",
+ "1597 5.9 0.645 0.12 ... 0.71 10.2 5\n",
+ "1598 6.0 0.310 0.47 ... 0.66 11.0 6\n",
+ "\n",
+ "[1599 rows x 12 columns]"
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 15
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "Ua_ctPpVzeKJ",
+ "outputId": "358ff4d0-bc4b-489e-dd00-b3cf31b4ccfd"
+ },
+ "source": [
+ "wine[\"quality\"].value_counts()"
+ ],
+ "execution_count": 16,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "5 681\n",
+ "6 638\n",
+ "7 199\n",
+ "4 53\n",
+ "8 18\n",
+ "3 10\n",
+ "Name: quality, dtype: int64"
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 16
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 297
+ },
+ "id": "-06v1i7XzeOz",
+ "outputId": "54a6e104-8137-41a5-a65c-41bf2ff5203f"
+ },
+ "source": [
+ "wine.describe(include='all')"
+ ],
+ "execution_count": 17,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " fixed acidity | \n",
+ " volatile acidity | \n",
+ " citric acid | \n",
+ " residual sugar | \n",
+ " chlorides | \n",
+ " free sulfur dioxide | \n",
+ " total sulfur dioxide | \n",
+ " density | \n",
+ " pH | \n",
+ " sulphates | \n",
+ " alcohol | \n",
+ " quality | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " count | \n",
+ " 1599.000000 | \n",
+ " 1599.000000 | \n",
+ " 1599.000000 | \n",
+ " 1599.000000 | \n",
+ " 1599.000000 | \n",
+ " 1599.000000 | \n",
+ " 1599.000000 | \n",
+ " 1599.000000 | \n",
+ " 1599.000000 | \n",
+ " 1599.000000 | \n",
+ " 1599.000000 | \n",
+ " 1599.000000 | \n",
+ "
\n",
+ " \n",
+ " mean | \n",
+ " 8.319637 | \n",
+ " 0.527821 | \n",
+ " 0.270976 | \n",
+ " 2.538806 | \n",
+ " 0.087467 | \n",
+ " 15.874922 | \n",
+ " 46.467792 | \n",
+ " 0.996747 | \n",
+ " 3.311113 | \n",
+ " 0.658149 | \n",
+ " 10.422983 | \n",
+ " 5.636023 | \n",
+ "
\n",
+ " \n",
+ " std | \n",
+ " 1.741096 | \n",
+ " 0.179060 | \n",
+ " 0.194801 | \n",
+ " 1.409928 | \n",
+ " 0.047065 | \n",
+ " 10.460157 | \n",
+ " 32.895324 | \n",
+ " 0.001887 | \n",
+ " 0.154386 | \n",
+ " 0.169507 | \n",
+ " 1.065668 | \n",
+ " 0.807569 | \n",
+ "
\n",
+ " \n",
+ " min | \n",
+ " 4.600000 | \n",
+ " 0.120000 | \n",
+ " 0.000000 | \n",
+ " 0.900000 | \n",
+ " 0.012000 | \n",
+ " 1.000000 | \n",
+ " 6.000000 | \n",
+ " 0.990070 | \n",
+ " 2.740000 | \n",
+ " 0.330000 | \n",
+ " 8.400000 | \n",
+ " 3.000000 | \n",
+ "
\n",
+ " \n",
+ " 25% | \n",
+ " 7.100000 | \n",
+ " 0.390000 | \n",
+ " 0.090000 | \n",
+ " 1.900000 | \n",
+ " 0.070000 | \n",
+ " 7.000000 | \n",
+ " 22.000000 | \n",
+ " 0.995600 | \n",
+ " 3.210000 | \n",
+ " 0.550000 | \n",
+ " 9.500000 | \n",
+ " 5.000000 | \n",
+ "
\n",
+ " \n",
+ " 50% | \n",
+ " 7.900000 | \n",
+ " 0.520000 | \n",
+ " 0.260000 | \n",
+ " 2.200000 | \n",
+ " 0.079000 | \n",
+ " 14.000000 | \n",
+ " 38.000000 | \n",
+ " 0.996750 | \n",
+ " 3.310000 | \n",
+ " 0.620000 | \n",
+ " 10.200000 | \n",
+ " 6.000000 | \n",
+ "
\n",
+ " \n",
+ " 75% | \n",
+ " 9.200000 | \n",
+ " 0.640000 | \n",
+ " 0.420000 | \n",
+ " 2.600000 | \n",
+ " 0.090000 | \n",
+ " 21.000000 | \n",
+ " 62.000000 | \n",
+ " 0.997835 | \n",
+ " 3.400000 | \n",
+ " 0.730000 | \n",
+ " 11.100000 | \n",
+ " 6.000000 | \n",
+ "
\n",
+ " \n",
+ " max | \n",
+ " 15.900000 | \n",
+ " 1.580000 | \n",
+ " 1.000000 | \n",
+ " 15.500000 | \n",
+ " 0.611000 | \n",
+ " 72.000000 | \n",
+ " 289.000000 | \n",
+ " 1.003690 | \n",
+ " 4.010000 | \n",
+ " 2.000000 | \n",
+ " 14.900000 | \n",
+ " 8.000000 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " fixed acidity volatile acidity ... alcohol quality\n",
+ "count 1599.000000 1599.000000 ... 1599.000000 1599.000000\n",
+ "mean 8.319637 0.527821 ... 10.422983 5.636023\n",
+ "std 1.741096 0.179060 ... 1.065668 0.807569\n",
+ "min 4.600000 0.120000 ... 8.400000 3.000000\n",
+ "25% 7.100000 0.390000 ... 9.500000 5.000000\n",
+ "50% 7.900000 0.520000 ... 10.200000 6.000000\n",
+ "75% 9.200000 0.640000 ... 11.100000 6.000000\n",
+ "max 15.900000 1.580000 ... 14.900000 8.000000\n",
+ "\n",
+ "[8 rows x 12 columns]"
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 17
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "t8Y53QPyu_fO"
+ },
+ "source": [
+ "Testowy Wykres (quality, volatile acidity)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 405
+ },
+ "id": "hEe3BYcJaKnF",
+ "outputId": "ccaf5bc0-889b-453b-f50b-eae3f8c50ee6"
+ },
+ "source": [
+ "fig = plt.figure(figsize = (10,6))\n",
+ "sns.barplot(x = 'quality', y = 'volatile acidity', data = wine)"
+ ],
+ "execution_count": 18,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 18
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAmEAAAFzCAYAAAB2A95GAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF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FVddxdz5N8b5L3jk212Lp7KclNVfXA2a5HJbluYKSN5PyYilwrH0rysKq67+yLbo9Kcv3gTIfNpFfMJ0nyVUlePvsmzVFJLu1ul0xg0Xxlktcs/zcym5O8ortfPzbShvDTSf5gNj12Q5KnDM6z8GZ/ZDw6yU+OzrIRdPeVVXVZknckuT3JO7NAV853iQoAgAFMRwIADKCEAQAMoIQBAAyghAEADKCEAQAMoIQBzFTVqVX13tnzbVX167Pnj6yqhblAJLA+uE4YwH50964ku2abj0zyqSR/NSwQsHCMhAELoaqeU1V/W1V/WVWvrKqfr6o3V9W22fETZreyumvE6y+q6h2zn7uNcs1Gv/60qk5N8lNJnlFV11TVd1XVB6rqXrPzjl+5DTAvI2HAEa+qviXLt6h6cJb/u/aOJAe7gfvNSR7d3Z+tqtOzfAuabfs7sbs/WFW/neRT3f2C2fu9Ocn3Jfnj2fu+enZfO4C5GQkDFsF3JXlNd3+6uz+RZOcq598ryf+uqvck+aMkZxzi+704/3KLoKckeekh/j6AkTBgod2ef/lj85gV+5+R5B+TfPPs+GcP5UW7+22zKc1HJtnU3W5WDhwyI2HAInhrkn9fVfepquOSfP9s/weTfMvs+eNXnH+/JB/u7juTPDnJplVe/5NJjttn3+8meUWMggH3kBIGHPG6+x1J/jDJu5K8LslVs0MvSPKfquqdSU5Y8Su/meRHq+pdSb4uyW2rvMVrk/yHuxbmz/b9QZIHZHk9GcAhq+4enQHgsKqqX8yKhfQTvcfjk5zX3U+e6j2AxWZNGMAhqqoXJTknyWNGZwGOXEbCAAAGsCYMAGAAJQwAYAAlDABgACUMAGAAJQwAYAAlDABggP8P8QmHpYhfPrcAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "tags": [],
+ "needs_background": "light"
+ }
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "ftWOC-do2Pq-"
+ },
+ "source": [
+ "# 4. Normalizacja"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "Wm0EM2hj4s6V"
+ },
+ "source": [
+ "Normalizacja kolumny 'quality' na wartości od 0 do 20. Nie jest ona konieczna ale została stworzona w celach demonstracyjnych"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "id": "EkZQ6Hpy2Tj_"
+ },
+ "source": [
+ "wine[\"quality\"]=((wine[\"quality\"]-wine[\"quality\"].min())/(wine[\"quality\"].max()-wine[\"quality\"].min()))*20"
+ ],
+ "execution_count": 19,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 419
+ },
+ "id": "_bQgYfct3Tir",
+ "outputId": "b15a9922-3a36-47af-eb8d-762adf593ae7"
+ },
+ "source": [
+ "wine"
+ ],
+ "execution_count": 20,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " fixed acidity | \n",
+ " volatile acidity | \n",
+ " citric acid | \n",
+ " residual sugar | \n",
+ " chlorides | \n",
+ " free sulfur dioxide | \n",
+ " total sulfur dioxide | \n",
+ " density | \n",
+ " pH | \n",
+ " sulphates | \n",
+ " alcohol | \n",
+ " quality | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 7.4 | \n",
+ " 0.700 | \n",
+ " 0.00 | \n",
+ " 1.9 | \n",
+ " 0.076 | \n",
+ " 11.0 | \n",
+ " 34.0 | \n",
+ " 0.99780 | \n",
+ " 3.51 | \n",
+ " 0.56 | \n",
+ " 9.4 | \n",
+ " 8.0 | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " 7.8 | \n",
+ " 0.880 | \n",
+ " 0.00 | \n",
+ " 2.6 | \n",
+ " 0.098 | \n",
+ " 25.0 | \n",
+ " 67.0 | \n",
+ " 0.99680 | \n",
+ " 3.20 | \n",
+ " 0.68 | \n",
+ " 9.8 | \n",
+ " 8.0 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 7.8 | \n",
+ " 0.760 | \n",
+ " 0.04 | \n",
+ " 2.3 | \n",
+ " 0.092 | \n",
+ " 15.0 | \n",
+ " 54.0 | \n",
+ " 0.99700 | \n",
+ " 3.26 | \n",
+ " 0.65 | \n",
+ " 9.8 | \n",
+ " 8.0 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " 11.2 | \n",
+ " 0.280 | \n",
+ " 0.56 | \n",
+ " 1.9 | \n",
+ " 0.075 | \n",
+ " 17.0 | \n",
+ " 60.0 | \n",
+ " 0.99800 | \n",
+ " 3.16 | \n",
+ " 0.58 | \n",
+ " 9.8 | \n",
+ " 12.0 | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " 7.4 | \n",
+ " 0.700 | \n",
+ " 0.00 | \n",
+ " 1.9 | \n",
+ " 0.076 | \n",
+ " 11.0 | \n",
+ " 34.0 | \n",
+ " 0.99780 | \n",
+ " 3.51 | \n",
+ " 0.56 | \n",
+ " 9.4 | \n",
+ " 8.0 | \n",
+ "
\n",
+ " \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ "
\n",
+ " \n",
+ " 1594 | \n",
+ " 6.2 | \n",
+ " 0.600 | \n",
+ " 0.08 | \n",
+ " 2.0 | \n",
+ " 0.090 | \n",
+ " 32.0 | \n",
+ " 44.0 | \n",
+ " 0.99490 | \n",
+ " 3.45 | \n",
+ " 0.58 | \n",
+ " 10.5 | \n",
+ " 8.0 | \n",
+ "
\n",
+ " \n",
+ " 1595 | \n",
+ " 5.9 | \n",
+ " 0.550 | \n",
+ " 0.10 | \n",
+ " 2.2 | \n",
+ " 0.062 | \n",
+ " 39.0 | \n",
+ " 51.0 | \n",
+ " 0.99512 | \n",
+ " 3.52 | \n",
+ " 0.76 | \n",
+ " 11.2 | \n",
+ " 12.0 | \n",
+ "
\n",
+ " \n",
+ " 1596 | \n",
+ " 6.3 | \n",
+ " 0.510 | \n",
+ " 0.13 | \n",
+ " 2.3 | \n",
+ " 0.076 | \n",
+ " 29.0 | \n",
+ " 40.0 | \n",
+ " 0.99574 | \n",
+ " 3.42 | \n",
+ " 0.75 | \n",
+ " 11.0 | \n",
+ " 12.0 | \n",
+ "
\n",
+ " \n",
+ " 1597 | \n",
+ " 5.9 | \n",
+ " 0.645 | \n",
+ " 0.12 | \n",
+ " 2.0 | \n",
+ " 0.075 | \n",
+ " 32.0 | \n",
+ " 44.0 | \n",
+ " 0.99547 | \n",
+ " 3.57 | \n",
+ " 0.71 | \n",
+ " 10.2 | \n",
+ " 8.0 | \n",
+ "
\n",
+ " \n",
+ " 1598 | \n",
+ " 6.0 | \n",
+ " 0.310 | \n",
+ " 0.47 | \n",
+ " 3.6 | \n",
+ " 0.067 | \n",
+ " 18.0 | \n",
+ " 42.0 | \n",
+ " 0.99549 | \n",
+ " 3.39 | \n",
+ " 0.66 | \n",
+ " 11.0 | \n",
+ " 12.0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
1599 rows × 12 columns
\n",
+ "
"
+ ],
+ "text/plain": [
+ " fixed acidity volatile acidity citric acid ... sulphates alcohol quality\n",
+ "0 7.4 0.700 0.00 ... 0.56 9.4 8.0\n",
+ "1 7.8 0.880 0.00 ... 0.68 9.8 8.0\n",
+ "2 7.8 0.760 0.04 ... 0.65 9.8 8.0\n",
+ "3 11.2 0.280 0.56 ... 0.58 9.8 12.0\n",
+ "4 7.4 0.700 0.00 ... 0.56 9.4 8.0\n",
+ "... ... ... ... ... ... ... ...\n",
+ "1594 6.2 0.600 0.08 ... 0.58 10.5 8.0\n",
+ "1595 5.9 0.550 0.10 ... 0.76 11.2 12.0\n",
+ "1596 6.3 0.510 0.13 ... 0.75 11.0 12.0\n",
+ "1597 5.9 0.645 0.12 ... 0.71 10.2 8.0\n",
+ "1598 6.0 0.310 0.47 ... 0.66 11.0 12.0\n",
+ "\n",
+ "[1599 rows x 12 columns]"
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 20
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "I1AwZoyN4RHs",
+ "outputId": "81a417a4-236b-41e1-8d26-4462b2e13711"
+ },
+ "source": [
+ "wine[\"quality\"].value_counts()"
+ ],
+ "execution_count": 21,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "8.0 681\n",
+ "12.0 638\n",
+ "16.0 199\n",
+ "4.0 53\n",
+ "20.0 18\n",
+ "0.0 10\n",
+ "Name: quality, dtype: int64"
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 21
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "XBU3z_of414w"
+ },
+ "source": [
+ "# 5. Usuwanie artefaktów"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "KCstRwQp5-X1"
+ },
+ "source": [
+ "### Całe szczęscie nie ma w moim zbiorze ani pustych linijek, ani przykładów z niepoprawnymi wartościami"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "id": "EJqksTP545UV"
+ },
+ "source": [
+ "# Znajdźmy pustą linijkę:\n",
+ "! grep -P \"^$\" -n winequality-red.csv"
+ ],
+ "execution_count": 22,
+ "outputs": []
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "8DuoPn3Fa0kP"
+ },
+ "source": [
+ "Szukanie wartości \"NA\": https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.dropna.html"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "REYF2AWjz_lr",
+ "outputId": "148c1b42-d301-4208-e09a-2333ce73c5e1"
+ },
+ "source": [
+ "wine.isnull().sum()"
+ ],
+ "execution_count": 23,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "fixed acidity 0\n",
+ "volatile acidity 0\n",
+ "citric acid 0\n",
+ "residual sugar 0\n",
+ "chlorides 0\n",
+ "free sulfur dioxide 0\n",
+ "total sulfur dioxide 0\n",
+ "density 0\n",
+ "pH 0\n",
+ "sulphates 0\n",
+ "alcohol 0\n",
+ "quality 0\n",
+ "dtype: int64"
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 23
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "id": "RbkqNj9_akcU"
+ },
+ "source": [
+ "wine.dropna(inplace=True) "
+ ],
+ "execution_count": 24,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 419
+ },
+ "id": "4WylJo9malyG",
+ "outputId": "8858109b-c7e8-4ddc-de07-790bcb39c5a4"
+ },
+ "source": [
+ "wine"
+ ],
+ "execution_count": 25,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " fixed acidity | \n",
+ " volatile acidity | \n",
+ " citric acid | \n",
+ " residual sugar | \n",
+ " chlorides | \n",
+ " free sulfur dioxide | \n",
+ " total sulfur dioxide | \n",
+ " density | \n",
+ " pH | \n",
+ " sulphates | \n",
+ " alcohol | \n",
+ " quality | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 7.4 | \n",
+ " 0.700 | \n",
+ " 0.00 | \n",
+ " 1.9 | \n",
+ " 0.076 | \n",
+ " 11.0 | \n",
+ " 34.0 | \n",
+ " 0.99780 | \n",
+ " 3.51 | \n",
+ " 0.56 | \n",
+ " 9.4 | \n",
+ " 8.0 | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " 7.8 | \n",
+ " 0.880 | \n",
+ " 0.00 | \n",
+ " 2.6 | \n",
+ " 0.098 | \n",
+ " 25.0 | \n",
+ " 67.0 | \n",
+ " 0.99680 | \n",
+ " 3.20 | \n",
+ " 0.68 | \n",
+ " 9.8 | \n",
+ " 8.0 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 7.8 | \n",
+ " 0.760 | \n",
+ " 0.04 | \n",
+ " 2.3 | \n",
+ " 0.092 | \n",
+ " 15.0 | \n",
+ " 54.0 | \n",
+ " 0.99700 | \n",
+ " 3.26 | \n",
+ " 0.65 | \n",
+ " 9.8 | \n",
+ " 8.0 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " 11.2 | \n",
+ " 0.280 | \n",
+ " 0.56 | \n",
+ " 1.9 | \n",
+ " 0.075 | \n",
+ " 17.0 | \n",
+ " 60.0 | \n",
+ " 0.99800 | \n",
+ " 3.16 | \n",
+ " 0.58 | \n",
+ " 9.8 | \n",
+ " 12.0 | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " 7.4 | \n",
+ " 0.700 | \n",
+ " 0.00 | \n",
+ " 1.9 | \n",
+ " 0.076 | \n",
+ " 11.0 | \n",
+ " 34.0 | \n",
+ " 0.99780 | \n",
+ " 3.51 | \n",
+ " 0.56 | \n",
+ " 9.4 | \n",
+ " 8.0 | \n",
+ "
\n",
+ " \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ "
\n",
+ " \n",
+ " 1594 | \n",
+ " 6.2 | \n",
+ " 0.600 | \n",
+ " 0.08 | \n",
+ " 2.0 | \n",
+ " 0.090 | \n",
+ " 32.0 | \n",
+ " 44.0 | \n",
+ " 0.99490 | \n",
+ " 3.45 | \n",
+ " 0.58 | \n",
+ " 10.5 | \n",
+ " 8.0 | \n",
+ "
\n",
+ " \n",
+ " 1595 | \n",
+ " 5.9 | \n",
+ " 0.550 | \n",
+ " 0.10 | \n",
+ " 2.2 | \n",
+ " 0.062 | \n",
+ " 39.0 | \n",
+ " 51.0 | \n",
+ " 0.99512 | \n",
+ " 3.52 | \n",
+ " 0.76 | \n",
+ " 11.2 | \n",
+ " 12.0 | \n",
+ "
\n",
+ " \n",
+ " 1596 | \n",
+ " 6.3 | \n",
+ " 0.510 | \n",
+ " 0.13 | \n",
+ " 2.3 | \n",
+ " 0.076 | \n",
+ " 29.0 | \n",
+ " 40.0 | \n",
+ " 0.99574 | \n",
+ " 3.42 | \n",
+ " 0.75 | \n",
+ " 11.0 | \n",
+ " 12.0 | \n",
+ "
\n",
+ " \n",
+ " 1597 | \n",
+ " 5.9 | \n",
+ " 0.645 | \n",
+ " 0.12 | \n",
+ " 2.0 | \n",
+ " 0.075 | \n",
+ " 32.0 | \n",
+ " 44.0 | \n",
+ " 0.99547 | \n",
+ " 3.57 | \n",
+ " 0.71 | \n",
+ " 10.2 | \n",
+ " 8.0 | \n",
+ "
\n",
+ " \n",
+ " 1598 | \n",
+ " 6.0 | \n",
+ " 0.310 | \n",
+ " 0.47 | \n",
+ " 3.6 | \n",
+ " 0.067 | \n",
+ " 18.0 | \n",
+ " 42.0 | \n",
+ " 0.99549 | \n",
+ " 3.39 | \n",
+ " 0.66 | \n",
+ " 11.0 | \n",
+ " 12.0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
1599 rows × 12 columns
\n",
+ "
"
+ ],
+ "text/plain": [
+ " fixed acidity volatile acidity citric acid ... sulphates alcohol quality\n",
+ "0 7.4 0.700 0.00 ... 0.56 9.4 8.0\n",
+ "1 7.8 0.880 0.00 ... 0.68 9.8 8.0\n",
+ "2 7.8 0.760 0.04 ... 0.65 9.8 8.0\n",
+ "3 11.2 0.280 0.56 ... 0.58 9.8 12.0\n",
+ "4 7.4 0.700 0.00 ... 0.56 9.4 8.0\n",
+ "... ... ... ... ... ... ... ...\n",
+ "1594 6.2 0.600 0.08 ... 0.58 10.5 8.0\n",
+ "1595 5.9 0.550 0.10 ... 0.76 11.2 12.0\n",
+ "1596 6.3 0.510 0.13 ... 0.75 11.0 12.0\n",
+ "1597 5.9 0.645 0.12 ... 0.71 10.2 8.0\n",
+ "1598 6.0 0.310 0.47 ... 0.66 11.0 12.0\n",
+ "\n",
+ "[1599 rows x 12 columns]"
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 25
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file