From 5ceed1d6b5b5054a19502c356f071b20b98469db Mon Sep 17 00:00:00 2001 From: kubapok Date: Sat, 7 Dec 2024 11:54:47 +0100 Subject: [PATCH] zajecia3 i zajecia4 --- README.md | 13 +- zajecia1/2_podstawy.ipynb | 1730 ++++++++++- zajecia2/data_analysis.ipynb | 3763 +++++++---------------- zajecia2/tmp.xlsx | Bin 5012 -> 5013 bytes zajecia3/1.ipynb | 2280 ++++++++++++++ zajecia3/1_odpowiedzi.ipynb | 311 ++ zajecia4/KnnClassification.svg.png | Bin 0 -> 5967 bytes zajecia4/gapminder.csv | 176 ++ zajecia4/logistic.png | Bin 0 -> 28234 bytes zajecia4/sklearn cz. 1-ODPOWIEDZI.ipynb | 812 +++++ zajecia4/sklearn cz. 1.ipynb | 430 +++ 11 files changed, 6791 insertions(+), 2724 deletions(-) create mode 100644 zajecia3/1.ipynb create mode 100644 zajecia3/1_odpowiedzi.ipynb create mode 100644 zajecia4/KnnClassification.svg.png create mode 100644 zajecia4/gapminder.csv create mode 100644 zajecia4/logistic.png create mode 100644 zajecia4/sklearn cz. 1-ODPOWIEDZI.ipynb create mode 100644 zajecia4/sklearn cz. 1.ipynb diff --git a/README.md b/README.md index 4858705..54783e2 100644 --- a/README.md +++ b/README.md @@ -30,13 +30,14 @@ Do nauki można wykorzystać wiele tutoriali internetowych python (w wersji pyth - Zajęcia 2 - Wprowadzenie do python 2/2 - Zajęcia 3 - pandas - Zajęcia 4 - numpy -- Zajęcia 5 - scikit-learn -- Zajęcia 6 - przetwarzanie tekstu w python -- Zajęcia 7 - przetwarzanie obrazów w python -- Zajęcia 8 - zajęcia z analizy wizualizacji danych -- Zajęcia 9 - zajęcia z analizy wizualizacji danych +- Zajęcia 5 - scikit-learn 1 +- Zajęcia 6 - scikit-learn 2 +- Zajęcia 7 - przetwarzanie tekstu w python +- Zajęcia 8 - przetwarzanie obrazów w python +- Zajęcia 9 - zajęcia z analizy wizualizacji danych - Zajęcia 10 - zajęcia z analizy wizualizacji danych -- Zajęcia 11 - Zaliczenie +- Zajęcia 11 - zajęcia z analizy wizualizacji danych +- Zaliczenie - Zaliczenie przedmiotu 8 luty 14:30-16.45 ## Zaliczenie przedmiotu diff --git a/zajecia1/2_podstawy.ipynb b/zajecia1/2_podstawy.ipynb index 9aa02b8..23f663a 100644 --- a/zajecia1/2_podstawy.ipynb +++ b/zajecia1/2_podstawy.ipynb @@ -15,7 +15,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 18, "metadata": { "slideshow": { "slide_type": "slide" @@ -73,7 +73,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 19, "metadata": { "slideshow": { "slide_type": "slide" @@ -87,6 +87,52 @@ "email = user + '@' + mail_domain" ] }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "jakub.pokrywka@amu.edu.pl\n" + ] + } + ], + "source": [ + "print(email)" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [], + "source": [ + "x = 'a'" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'a'" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x" + ] + }, { "cell_type": "markdown", "metadata": { @@ -199,7 +245,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 25, "metadata": { "slideshow": { "slide_type": "slide" @@ -213,7 +259,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 26, "metadata": { "slideshow": { "slide_type": "slide" @@ -257,7 +303,67 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3" + ] + }, + "execution_count": 27, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "15 // 4" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3" + ] + }, + "execution_count": 29, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "a15 % 4" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1000000" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "100**3" + ] + }, + { + "cell_type": "code", + "execution_count": 33, "metadata": { "slideshow": { "slide_type": "slide" @@ -268,12 +374,12 @@ "name": "stdout", "output_type": "stream", "text": [ - "Dziś upłynęło 36840 sekund.\n" + "Dziś upłynęło 15240 sekund.\n" ] } ], "source": [ - "hour = 10\n", + "hour = 4\n", "minutes = 14\n", "seconds = ((60 * 60 * hour) + 60 * minutes)\n", "print(\"Dziś upłynęło\", seconds, \"sekund.\")" @@ -281,7 +387,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 34, "metadata": { "slideshow": { "slide_type": "slide" @@ -311,6 +417,73 @@ "### Operacje na zmiennej\n" ] }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": {}, + "outputs": [], + "source": [ + "x = 5" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": {}, + "outputs": [], + "source": [ + "x = x + 5" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "10" + ] + }, + "execution_count": 38, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": {}, + "outputs": [], + "source": [ + "x += 5" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "15" + ] + }, + "execution_count": 40, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x" + ] + }, { "cell_type": "code", "execution_count": 11, @@ -358,7 +531,130 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 41, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3" + ] + }, + "execution_count": 41, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "3 " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "'3'" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'a'" + ] + }, + "execution_count": 42, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "'a'" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "4" + ] + }, + "execution_count": 46, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "3 + int('1')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "-3" + ] + }, + "execution_count": 51, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "int(-3.9)" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "float" + ] + }, + "execution_count": 54, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "type(float(-3))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 47, "metadata": { "slideshow": { "slide_type": "fragment" @@ -386,7 +682,88 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1.3333333333333333" + ] + }, + "execution_count": 60, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "4/3" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "6.8999999999999995" + ] + }, + "execution_count": 58, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "3 * 2.3" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "6" + ] + }, + "execution_count": 59, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "3 * int(2.3)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 55, "metadata": { "slideshow": { "slide_type": "slide" @@ -409,6 +786,53 @@ "print(int('42') / 6)" ] }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "str" + ] + }, + "execution_count": 63, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "type('a')" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "str" + ] + }, + "execution_count": 64, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "type('aaaa')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "markdown", "metadata": { @@ -462,7 +886,94 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 65, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 65, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "True" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 66, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "False" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 67, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "True and False" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 69, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "True or False" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 77, "metadata": { "slideshow": { "slide_type": "slide" @@ -489,6 +1000,89 @@ "print(not False)" ] }, + { + "cell_type": "code", + "execution_count": 75, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 75, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "bool(0.0)" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 76, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "bool(5.2)" + ] + }, + { + "cell_type": "code", + "execution_count": 78, + "metadata": {}, + "outputs": [], + "source": [ + "a =3 " + ] + }, + { + "cell_type": "code", + "execution_count": 82, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 82, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "4 >= 4" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "markdown", "metadata": { @@ -508,7 +1102,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 83, "metadata": { "slideshow": { "slide_type": "slide" @@ -535,6 +1129,23 @@ "print(0 != 0.0)" ] }, + { + "cell_type": "code", + "execution_count": 86, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "False\n" + ] + } + ], + "source": [ + "print(1 != 1.0)" + ] + }, { "cell_type": "markdown", "metadata": { @@ -588,7 +1199,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 88, "metadata": { "slideshow": { "slide_type": "slide" @@ -625,6 +1236,238 @@ "### Czas na pierwsze zadanie (1a i 1b)." ] }, + { + "cell_type": "code", + "execution_count": 89, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'\\n * stwórz zmienną o nazwie `pi` i o wartości 3.14.\\n * stwórz zmienną o nazwie `promien` i o wartości 12.\\n * oblicz pole koła i przypisz wynik do zmniennej `pole`. P = pi * r ** 2\\n * wyświetl wynik na ekran.\\n'" + ] + }, + "execution_count": 89, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "\n", + "\"\"\"\n", + " * stwórz zmienną o nazwie `pi` i o wartości 3.14.\n", + " * stwórz zmienną o nazwie `promien` i o wartości 12.\n", + " * oblicz pole koła i przypisz wynik do zmniennej `pole`. P = pi * r ** 2\n", + " * wyświetl wynik na ekran.\n", + "\"\"\" \n" + ] + }, + { + "cell_type": "code", + "execution_count": 93, + "metadata": {}, + "outputs": [], + "source": [ + "pi = 3.14" + ] + }, + { + "cell_type": "code", + "execution_count": 94, + "metadata": {}, + "outputs": [], + "source": [ + "promien=12" + ] + }, + { + "cell_type": "code", + "execution_count": 109, + "metadata": {}, + "outputs": [], + "source": [ + "P = pi * promien **2" + ] + }, + { + "cell_type": "code", + "execution_count": 110, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "452.16\n" + ] + } + ], + "source": [ + "print(P)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 139, + "metadata": {}, + "outputs": [], + "source": [ + "\"\"\"\n", + "Zamień typ zmiennych `a`, `b` i `c` na typy liczbowe (int lub float) i oblicz ich sumę.\n", + "Wynik zapisz do zmiennej `wynik` i wyświetl go na ekranie\n", + "\"\"\" \n", + "\n", + "# zmienne do zadania\n", + "a = \"12\"\n", + "b = \"35.5\"\n", + "c = True" + ] + }, + { + "cell_type": "code", + "execution_count": 147, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "float" + ] + }, + "execution_count": 147, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "type(4.2)" + ] + }, + { + "cell_type": "code", + "execution_count": 150, + "metadata": {}, + "outputs": [ + { + "ename": "ValueError", + "evalue": "could not convert string to float: '4.2a'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[150], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28mfloat\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m4.2a\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n", + "\u001b[0;31mValueError\u001b[0m: could not convert string to float: '4.2a'" + ] + } + ], + "source": [ + "type(\"4.2\")" + ] + }, + { + "cell_type": "code", + "execution_count": 151, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 151, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "4.2 == \"4.2\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 140, + "metadata": {}, + "outputs": [], + "source": [ + "a = float(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 141, + "metadata": {}, + "outputs": [], + "source": [ + "b = float(b)" + ] + }, + { + "cell_type": "code", + "execution_count": 142, + "metadata": {}, + "outputs": [], + "source": [ + "c = float(c)" + ] + }, + { + "cell_type": "code", + "execution_count": 143, + "metadata": {}, + "outputs": [], + "source": [ + "wynik = a + b + c" + ] + }, + { + "cell_type": "code", + "execution_count": 144, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "48.5" + ] + }, + "execution_count": 144, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "wynik" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "markdown", "metadata": { @@ -641,7 +1484,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 153, "metadata": { "slideshow": { "slide_type": "fragment" @@ -698,7 +1541,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 154, "metadata": { "slideshow": { "slide_type": "slide" @@ -714,7 +1557,47 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 156, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'2'" + ] + }, + "execution_count": 156, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "str(2)" + ] + }, + { + "cell_type": "code", + "execution_count": 160, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'sfdsf\"sd\"fdsfs\"dfsd'" + ] + }, + "execution_count": 160, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "'sfdsf\"sd\"fdsfs\"dfsd'" + ] + }, + { + "cell_type": "code", + "execution_count": 161, "metadata": { "slideshow": { "slide_type": "slide" @@ -730,7 +1613,7 @@ } ], "source": [ - "sent = \"It's fine.\"\n", + "sent = \"It's f' ' ' 'ine.\"\n", "\n", "sent = 'It\\'s fine.'\n", "\n", @@ -739,7 +1622,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 163, "metadata": { "slideshow": { "slide_type": "slide" @@ -766,7 +1649,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 164, "metadata": { "slideshow": { "slide_type": "slide" @@ -778,6 +1661,26 @@ "x = ''" ] }, + { + "cell_type": "code", + "execution_count": 165, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "''" + ] + }, + "execution_count": 165, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x" + ] + }, { "cell_type": "markdown", "metadata": { @@ -793,7 +1696,27 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 168, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'23'" + ] + }, + "execution_count": 168, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "'2' + '3'" + ] + }, + { + "cell_type": "code", + "execution_count": 169, "metadata": { "slideshow": { "slide_type": "slide" @@ -817,7 +1740,27 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 171, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'OOOOOOOO'" + ] + }, + "execution_count": 171, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "'O' * 8" + ] + }, + { + "cell_type": "code", + "execution_count": 170, "metadata": { "slideshow": { "slide_type": "slide" @@ -839,7 +1782,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 173, "metadata": { "slideshow": { "slide_type": "slide" @@ -877,7 +1820,106 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 175, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'pythofdsfdsn'" + ] + }, + "execution_count": 175, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "'PythoFDSFDSn'.lower()" + ] + }, + { + "cell_type": "code", + "execution_count": 178, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'mickiewicz'" + ] + }, + "execution_count": 178, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "user" + ] + }, + { + "cell_type": "code", + "execution_count": 180, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "'mXckXewXcz'" + ] + }, + "execution_count": 180, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "user.replace('i', 'X')" + ] + }, + { + "cell_type": "code", + "execution_count": 181, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "' 2021 '" + ] + }, + "execution_count": 181, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "' 2021 '\n" + ] + }, + { + "cell_type": "code", + "execution_count": 182, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2021\n" + ] + } + ], + "source": [ + "print(' 2021 '.strip())\n" + ] + }, + { + "cell_type": "code", + "execution_count": 177, "metadata": { "slideshow": { "slide_type": "slide" @@ -911,7 +1953,76 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 184, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'ab'" + ] + }, + "execution_count": 184, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "'a' + 'b'" + ] + }, + { + "cell_type": "code", + "execution_count": 187, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'Słowo {user} ma {len(user)} liter.'" + ] + }, + "execution_count": 187, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "\n", + "'Słowo {user} ma {len(user)} liter.'" + ] + }, + { + "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": 183, "metadata": { "slideshow": { "slide_type": "slide" @@ -949,6 +2060,86 @@ "### Czas na zadanie (1c)." ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "\"\"\"\n", + " * Stwórz 2 zmiennie: firstname i surname, które będą zawierać Twoje imię i nazwisko.\n", + " * Połącz te zmiennie w takim sposób, żeby było rozdzielone spacją i zapisz wynik do zmiennej fullname.\n", + " * Wykorzystaj f-string i wyświetl na ekran zawartość zmiennej fullname, w taki sposób, żeby zawartość zmiennej była poprzedzona słowami \"Nazywam się \".\n", + " * Wyświetl sumaryczną długość zmiennych firstname i surname. \n", + "\"\"\"\n", + "\n", + "firstname = \"Jakub\"\n", + "surname = \"Pokrywka\"\n", + "\n", + "print(f\"Nazywam się {firstname} {surname}.\")\n", + "\n", + "print(firstname.lower())\n", + "\n", + "print(\"Nazywam się %s %s\" % (firstname, surname))\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 188, + "metadata": {}, + "outputs": [], + "source": [ + "firstname = \"Jakub\"\n", + "surname = \"Pokrywka\"" + ] + }, + { + "cell_type": "code", + "execution_count": 192, + "metadata": {}, + "outputs": [], + "source": [ + "fullname = firstname + ' ' + surname" + ] + }, + { + "cell_type": "code", + "execution_count": 193, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'Jakub Pokrywka'" + ] + }, + "execution_count": 193, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "fullname" + ] + }, + { + "cell_type": "code", + "execution_count": 196, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Nazywam sie Jakub Pokrywka\n" + ] + } + ], + "source": [ + "print(f\"Nazywam sie {fullname}\")" + ] + }, { "cell_type": "markdown", "metadata": { @@ -966,7 +2157,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 200, "metadata": { "slideshow": { "slide_type": "slide" @@ -979,12 +2170,33 @@ "oceny = [5, 4, 3, 5, 5]\n", "misc = [3.14, \"pi\", [\"pi\"], 3]\n", "\n", - "list_0_9 = list(range(10))\n" + "list_0_9 = list(range(10))" ] }, { "cell_type": "code", - "execution_count": 30, + "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": 203, "metadata": { "slideshow": { "slide_type": "slide" @@ -1004,6 +2216,13 @@ "print('Liczba elementów:', len(numbers))" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "code", "execution_count": 31, @@ -1044,7 +2263,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 205, "metadata": { "slideshow": { "slide_type": "slide" @@ -1093,7 +2312,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 206, "metadata": { "slideshow": { "slide_type": "slide" @@ -1159,7 +2378,27 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 208, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "8" + ] + }, + "execution_count": 208, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "len(liczby)" + ] + }, + { + "cell_type": "code", + "execution_count": 207, "metadata": { "slideshow": { "slide_type": "slide" @@ -1197,7 +2436,27 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 214, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[1, 3, 2, 3, 1]" + ] + }, + "execution_count": 214, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "oceny[:5]" + ] + }, + { + "cell_type": "code", + "execution_count": 209, "metadata": { "slideshow": { "slide_type": "fragment" @@ -1298,7 +2557,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 219, "metadata": { "slideshow": { "slide_type": "slide" @@ -1311,20 +2570,43 @@ "7" ] }, - "execution_count": 39, + "execution_count": 219, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "numbers = (4, 5, 7)\n", + "numbers = [4, 5, 7]\n", "\n", "numbers[2]" ] }, { "cell_type": "code", - "execution_count": 40, + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 220, + "metadata": {}, + "outputs": [], + "source": [ + "numbers[2] = 10" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 216, "metadata": { "slideshow": { "slide_type": "slide" @@ -1394,7 +2676,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 221, "metadata": { "slideshow": { "slide_type": "fragment" @@ -1417,7 +2699,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 222, "metadata": { "slideshow": { "slide_type": "slide" @@ -1634,13 +2916,22 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 225, "metadata": { "slideshow": { "slide_type": "slide" } }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Zdobyłeś wystarczającą liczbę punktów.\n", + "------\n" + ] + } + ], "source": [ "score_theory = 40\n", "score_practical = 45\n", @@ -1676,7 +2967,7 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": 227, "metadata": { "slideshow": { "slide_type": "slide" @@ -1687,13 +2978,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "Nie zdobyłeś wystarczającej liczby punktów.\n" + "Zdobyłeś wystarczającą liczbę punktów.\n", + "------\n" ] } ], "source": [ "\n", - "score_theory = 40\n", + "score_theory = 140\n", "score_practical = 45\n", "\n", "if score_theory + score_practical > 100:\n", @@ -1757,7 +3049,7 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": 228, "metadata": { "slideshow": { "slide_type": "slide" @@ -1811,7 +3103,7 @@ }, { "cell_type": "code", - "execution_count": 54, + "execution_count": 229, "metadata": { "slideshow": { "slide_type": "slide" @@ -1846,7 +3138,7 @@ }, { "cell_type": "code", - "execution_count": 55, + "execution_count": 230, "metadata": { "slideshow": { "slide_type": "slide" @@ -1881,7 +3173,7 @@ }, { "cell_type": "code", - "execution_count": 56, + "execution_count": 233, "metadata": { "slideshow": { "slide_type": "slide" @@ -1899,7 +3191,7 @@ "source": [ "my_programming_lang = \"Python\"\n", "\n", - "if \"Pyt\" in my_programming_lang:\n", + "if \"on\" in my_programming_lang:\n", " print('Yes!')" ] }, @@ -2027,7 +3319,54 @@ }, { "cell_type": "code", - "execution_count": 59, + "execution_count": 236, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]" + ] + }, + "execution_count": 236, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "list(range(10))" + ] + }, + { + "cell_type": "code", + "execution_count": 238, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "16\n", + "36\n", + "49\n" + ] + } + ], + "source": [ + "for i in [4,6,7]:\n", + " print(i**2)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 266, "metadata": { "slideshow": { "slide_type": "slide" @@ -2133,7 +3472,7 @@ }, { "cell_type": "code", - "execution_count": 62, + "execution_count": 268, "metadata": { "slideshow": { "slide_type": "slide" @@ -2169,7 +3508,7 @@ }, { "cell_type": "code", - "execution_count": 63, + "execution_count": 269, "metadata": { "slideshow": { "slide_type": "slide" @@ -2205,7 +3544,27 @@ }, { "cell_type": "code", - "execution_count": 64, + "execution_count": 271, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'y'" + ] + }, + "execution_count": 271, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "'Python'[1]" + ] + }, + { + "cell_type": "code", + "execution_count": 272, "metadata": { "slideshow": { "slide_type": "slide" @@ -2243,7 +3602,7 @@ }, { "cell_type": "code", - "execution_count": 65, + "execution_count": 273, "metadata": { "slideshow": { "slide_type": "slide" @@ -2286,7 +3645,7 @@ }, { "cell_type": "code", - "execution_count": 66, + "execution_count": 283, "metadata": { "slideshow": { "slide_type": "slide" @@ -2297,19 +3656,27 @@ "name": "stdout", "output_type": "stream", "text": [ + "0\n", + "10\n", + "11\n", + "aaa\n", "1\n", + "11\n", + "12\n", + "aaa\n", "2\n", - "4\n", - "3\n", - "6\n", - "9\n" + "12\n", + "13\n", + "aaa\n" ] } ], "source": [ "for i in range(3):\n", - " for j in range(i+1):\n", - " print((i + 1) * (j + 1))\n" + " print(i)\n", + " for j in range(10,12):\n", + " print(i+j)\n", + " print('aaa')" ] }, { @@ -2350,6 +3717,26 @@ " * następnie wcięty blok to będzie kod funkcji." ] }, + { + "cell_type": "code", + "execution_count": 285, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3" + ] + }, + "execution_count": 285, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "len(numbers)" + ] + }, { "cell_type": "code", "execution_count": 67, @@ -2398,7 +3785,7 @@ }, { "cell_type": "code", - "execution_count": 68, + "execution_count": 286, "metadata": { "slideshow": { "slide_type": "slide" @@ -2512,7 +3899,7 @@ }, { "cell_type": "code", - "execution_count": 71, + "execution_count": 288, "metadata": { "slideshow": { "slide_type": "slide" @@ -2541,7 +3928,7 @@ }, { "cell_type": "code", - "execution_count": 72, + "execution_count": 289, "metadata": { "slideshow": { "slide_type": "slide" @@ -2554,7 +3941,7 @@ "3" ] }, - "execution_count": 72, + "execution_count": 289, "metadata": {}, "output_type": "execute_result" } @@ -2604,6 +3991,64 @@ "Przykłady:" ] }, + { + "cell_type": "code", + "execution_count": 291, + "metadata": {}, + "outputs": [], + "source": [ + "import os" + ] + }, + { + "cell_type": "code", + "execution_count": 298, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'kubapok'" + ] + }, + "execution_count": 298, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "os.getenv(\"USER\")" + ] + }, + { + "cell_type": "code", + "execution_count": 299, + "metadata": {}, + "outputs": [], + "source": [ + "from os import getenv" + ] + }, + { + "cell_type": "code", + "execution_count": 300, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'kubapok'" + ] + }, + "execution_count": 300, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "getenv(\"USER\")" + ] + }, { "cell_type": "code", "execution_count": 73, @@ -2691,7 +4136,7 @@ }, { "cell_type": "code", - "execution_count": 75, + "execution_count": 301, "metadata": { "slideshow": { "slide_type": "slide" @@ -2755,7 +4200,7 @@ }, { "cell_type": "code", - "execution_count": 76, + "execution_count": 302, "metadata": { "slideshow": { "slide_type": "slide" @@ -2782,7 +4227,25 @@ }, { "cell_type": "code", - "execution_count": 77, + "execution_count": 303, + "metadata": {}, + "outputs": [], + "source": [ + "zen_file = open('./zen_of_python.txt')\n" + ] + }, + { + "cell_type": "code", + "execution_count": 308, + "metadata": {}, + "outputs": [], + "source": [ + "zen_file.close()" + ] + }, + { + "cell_type": "code", + "execution_count": 309, "metadata": {}, "outputs": [ { @@ -2809,7 +4272,45 @@ }, { "cell_type": "code", - "execution_count": 78, + "execution_count": 313, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['Beautiful is better than ugly.\\n',\n", + " 'Explicit is better than implicit.\\n',\n", + " 'Simple is better than complex.\\n',\n", + " 'Complex is better than complicated.\\n',\n", + " 'Flat is better than nested.\\n',\n", + " 'Sparse is better than dense.\\n',\n", + " 'Readability counts.\\n',\n", + " \"Special cases aren't special enough to break the rules.\\n\",\n", + " 'Although practicality beats purity.\\n',\n", + " 'Errors should never pass silently.\\n',\n", + " 'Unless explicitly silenced.\\n',\n", + " 'In the face of ambiguity, refuse the temptation to guess.\\n',\n", + " 'There should be one-- and preferably only one --obvious way to do it.\\n',\n", + " \"Although that way may not be obvious at first unless you're Dutch.\\n\",\n", + " 'Now is better than never.\\n',\n", + " 'Although never is often better than *right* now.\\n',\n", + " \"If the implementation is hard to explain, it's a bad idea.\\n\",\n", + " 'If the implementation is easy to explain, it may be a good idea.\\n',\n", + " \"Namespaces are one honking great idea -- let's do more of those!\\n\"]" + ] + }, + "execution_count": 313, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "zen_lines\n" + ] + }, + { + "cell_type": "code", + "execution_count": 315, "metadata": { "slideshow": { "slide_type": "slide" @@ -2833,7 +4334,24 @@ }, { "cell_type": "code", - "execution_count": 79, + "execution_count": 318, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1_wprowadzenie_do_python.ipynb\t2_podstawy.ipynb zadania zen_of_python.txt\n" + ] + } + ], + "source": [ + "!ls" + ] + }, + { + "cell_type": "code", + "execution_count": 319, "metadata": { "slideshow": { "slide_type": "slide" @@ -2851,6 +4369,42 @@ " plik.write(country + ',' + str(num_trees) + '\\n')\n" ] }, + { + "cell_type": "code", + "execution_count": 320, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1_wprowadzenie_do_python.ipynb\tzadania\t\tzen_of_python.txt\n", + "2_podstawy.ipynb\t\tzalesienie.txt\n" + ] + } + ], + "source": [ + "!ls" + ] + }, + { + "cell_type": "code", + "execution_count": 321, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Brazil,39542\n", + "Bulgaria,24987\n" + ] + } + ], + "source": [ + "!cat zalesienie.txt" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -2884,6 +4438,46 @@ "print(today.month) # atrybut\n", "print(today.weekday()) # metoda" ] + }, + { + "cell_type": "code", + "execution_count": 324, + "metadata": {}, + "outputs": [], + "source": [ + "class Item():\n", + " def __init__(self, a):\n", + " self.aaa = a + 10" + ] + }, + { + "cell_type": "code", + "execution_count": 326, + "metadata": {}, + "outputs": [], + "source": [ + "item = Item(x)" + ] + }, + { + "cell_type": "code", + "execution_count": 327, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "15" + ] + }, + "execution_count": 327, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "item.aaa" + ] } ], "metadata": { diff --git a/zajecia2/data_analysis.ipynb b/zajecia2/data_analysis.ipynb index 4104ac0..802510e 100644 --- a/zajecia2/data_analysis.ipynb +++ b/zajecia2/data_analysis.ipynb @@ -56,6 +56,15 @@ "import pandas as pd" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "pd" + ] + }, { "cell_type": "markdown", "metadata": { @@ -206,7 +215,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "metadata": { "slideshow": { "slide_type": "slide" @@ -223,7 +232,7 @@ "Name: Rides, dtype: float64" ] }, - "execution_count": 4, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -251,7 +260,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "metadata": { "slideshow": { "slide_type": "slide" @@ -276,7 +285,7 @@ "dtype: int64" ] }, - "execution_count": 5, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -305,7 +314,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "metadata": { "slideshow": { "slide_type": "slide" @@ -323,7 +332,7 @@ "dtype: int64" ] }, - "execution_count": 6, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -365,7 +374,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": { "slideshow": { "slide_type": "slide" @@ -384,7 +393,7 @@ "dtype: float64" ] }, - "execution_count": 7, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -415,8 +424,9 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": { + "scrolled": true, "slideshow": { "slide_type": "slide" } @@ -434,7 +444,7 @@ "dtype: int64" ] }, - "execution_count": 8, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -448,6 +458,58 @@ "members" ] }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "May 683758\n", + "June 738011\n", + "July 780511\n", + "August 674790\n", + "September 674790\n", + "October 445177\n", + "dtype: int64" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "members" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "May 10000000000683758\n", + "June 10000000000738011\n", + "July 10000000000780511\n", + "August 10000000000674790\n", + "September 10000000000674790\n", + "October 10000000000445177\n", + "dtype: int64" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "members + 10000000000000000" + ] + }, { "cell_type": "markdown", "metadata": { @@ -478,14 +540,156 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 16, "metadata": { "slideshow": { "slide_type": "slide" } }, "outputs": [], - "source": [] + "source": [ + "n= list(range(10+1))" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "n" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [], + "source": [ + "n = pd.Series(n)" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0 0\n", + "1 1\n", + "2 2\n", + "3 3\n", + "4 4\n", + "5 5\n", + "6 6\n", + "7 7\n", + "8 8\n", + "9 9\n", + "10 10\n", + "dtype: int64" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "n" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [], + "source": [ + "n2 = n**2" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0 0\n", + "1 1\n", + "2 4\n", + "3 9\n", + "4 16\n", + "5 25\n", + "6 36\n", + "7 49\n", + "8 64\n", + "9 81\n", + "10 100\n", + "dtype: int64" + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "n2" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [], + "source": [ + "trojkatne = ( n + n2 ) / 2" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0 0.0\n", + "1 1.0\n", + "2 3.0\n", + "3 6.0\n", + "4 10.0\n", + "5 15.0\n", + "6 21.0\n", + "7 28.0\n", + "8 36.0\n", + "9 45.0\n", + "10 55.0\n", + "dtype: float64" + ] + }, + "execution_count": 29, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "trojkatne" + ] }, { "cell_type": "markdown", @@ -522,7 +726,53 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 32, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "May 682758\n", + "June 737011\n", + "July 779511\n", + "dtype: int64" + ] + }, + "execution_count": 32, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "members" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "May 147898\n", + "June 171494\n", + "July 194316\n", + "dtype: int64" + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "occasionals" + ] + }, + { + "cell_type": "code", + "execution_count": 35, "metadata": { "slideshow": { "slide_type": "slide" @@ -556,38 +806,44 @@ " \n", " \n", " \n", - " May\n", - " 682758\n", - " 147898\n", + " July\n", + " 779511.0\n", + " 194316.0\n", " \n", " \n", " June\n", - " 737011\n", - " 171494\n", + " 737011.0\n", + " 171494.0\n", " \n", " \n", - " July\n", - " 779511\n", - " 194316\n", + " May\n", + " NaN\n", + " 147898.0\n", + " \n", + " \n", + " Maydfdsgfdg\n", + " 682758.0\n", + " NaN\n", " \n", " \n", "\n", "" ], "text/plain": [ - " members occasionals\n", - "May 682758 147898\n", - "June 737011 171494\n", - "July 779511 194316" + " members occasionals\n", + "July 779511.0 194316.0\n", + "June 737011.0 171494.0\n", + "May NaN 147898.0\n", + "Maydfdsgfdg 682758.0 NaN" ] }, - "execution_count": 9, + "execution_count": 35, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "members = pd.Series({'May': 682758, 'June': 737011, 'July': 779511})\n", + "members = pd.Series({'Maydfdsgfdg': 682758, 'June': 737011, 'July': 779511})\n", "occasionals = pd.Series({'May': 147898, 'June': 171494, 'July': 194316})\n", "\n", "df = pd.DataFrame({'members': members, 'occasionals': occasionals})\n", @@ -607,7 +863,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 37, "metadata": { "slideshow": { "slide_type": "slide" @@ -666,7 +922,7 @@ "2 779511 194316" ] }, - "execution_count": 10, + "execution_count": 37, "metadata": {}, "output_type": "execute_result" } @@ -696,7 +952,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 38, "metadata": { "slideshow": { "slide_type": "slide" @@ -780,7 +1036,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 39, "metadata": { "slideshow": { "slide_type": "slide" @@ -975,7 +1231,7 @@ "[175 rows x 8 columns]" ] }, - "execution_count": 12, + "execution_count": 39, "metadata": {}, "output_type": "execute_result" } @@ -988,7 +1244,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 40, "metadata": { "slideshow": { "slide_type": "slide" @@ -1144,7 +1400,7 @@ "5 0 0 373450 8.0500 NaN S " ] }, - "execution_count": 13, + "execution_count": 40, "metadata": {}, "output_type": "execute_result" } @@ -1167,113 +1423,13 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "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", - "
start_datestart_station_codeend_dateend_station_codeduration_secis_member
02019-04-14 07:55:2260012019-04-14 08:07:1661327131
12019-04-14 07:59:3164112019-04-14 08:09:1864115871
22019-04-14 07:59:5560972019-04-14 08:12:1160367361
32019-04-14 07:59:5763102019-04-14 08:27:58634516801
42019-04-14 08:00:3770292019-04-14 08:14:1262508140
\n", - "
" - ], - "text/plain": [ - " start_date start_station_code end_date \\\n", - "0 2019-04-14 07:55:22 6001 2019-04-14 08:07:16 \n", - "1 2019-04-14 07:59:31 6411 2019-04-14 08:09:18 \n", - "2 2019-04-14 07:59:55 6097 2019-04-14 08:12:11 \n", - "3 2019-04-14 07:59:57 6310 2019-04-14 08:27:58 \n", - "4 2019-04-14 08:00:37 7029 2019-04-14 08:14:12 \n", - "\n", - " end_station_code duration_sec is_member \n", - "0 6132 713 1 \n", - "1 6411 587 1 \n", - "2 6036 736 1 \n", - "3 6345 1680 1 \n", - "4 6250 814 0 " - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df = pd.read_excel('./bikes.xlsx', engine='openpyxl', nrows=5)\n", "df" @@ -1293,7 +1449,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 42, "metadata": { "slideshow": { "slide_type": "slide" @@ -1409,7 +1565,7 @@ "[347 rows x 2 columns]" ] }, - "execution_count": 15, + "execution_count": 42, "metadata": {}, "output_type": "execute_result" } @@ -1422,7 +1578,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 43, "metadata": { "slideshow": { "slide_type": "slide" @@ -1538,7 +1694,7 @@ "[347 rows x 2 columns]" ] }, - "execution_count": 16, + "execution_count": 43, "metadata": {}, "output_type": "execute_result" } @@ -1592,7 +1748,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 44, "metadata": { "slideshow": { "slide_type": "slide" @@ -1608,7 +1764,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 45, "metadata": { "slideshow": { "slide_type": "slide" @@ -1635,7 +1791,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 46, "metadata": { "slideshow": { "slide_type": "slide" @@ -1656,7 +1812,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 47, "metadata": { "slideshow": { "slide_type": "slide" @@ -1688,7 +1844,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 51, "metadata": { "slideshow": { "slide_type": "slide" @@ -1727,17 +1883,6 @@ " * Tabela `Invoice` zawiera informacje o fakturach. Przekonwertuj kolumnę `BillingCountry` do pythonowego słownika, a następnie podaj najcześciej występującą wartość. Ile razy pojawiła się?\n" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "slideshow": { - "slide_type": "slide" - } - }, - "outputs": [], - "source": [] - }, { "cell_type": "markdown", "metadata": { @@ -1765,7 +1910,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 58, "metadata": { "slideshow": { "slide_type": "slide" @@ -1870,7 +2015,7 @@ "Australia 41312.0 21370348.0 81.6" ] }, - "execution_count": 22, + "execution_count": 58, "metadata": {}, "output_type": "execute_result" } @@ -1894,7 +2039,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 59, "metadata": { "slideshow": { "slide_type": "slide" @@ -1916,7 +2061,7 @@ "Name: population, dtype: float64" ] }, - "execution_count": 23, + "execution_count": 59, "metadata": {}, "output_type": "execute_result" } @@ -1928,7 +2073,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 60, "metadata": { "slideshow": { "slide_type": "slide" @@ -1950,7 +2095,7 @@ "Name: population, dtype: float64" ] }, - "execution_count": 24, + "execution_count": 60, "metadata": {}, "output_type": "execute_result" } @@ -1973,7 +2118,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 65, "metadata": { "slideshow": { "slide_type": "slide" @@ -2068,7 +2213,7 @@ "Australia 41312.0 21370348.0" ] }, - "execution_count": 25, + "execution_count": 65, "metadata": {}, "output_type": "execute_result" } @@ -2090,8 +2235,9 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 66, "metadata": { + "scrolled": true, "slideshow": { "slide_type": "fragment" } @@ -2103,7 +2249,7 @@ "Index(['gdp', 'population', 'life_expectancy'], dtype='object')" ] }, - "execution_count": 26, + "execution_count": 66, "metadata": {}, "output_type": "execute_result" } @@ -2114,7 +2260,119 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 67, + "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", + "
gdppopulationlife_expectancy
Country
Afghanistan1311.026528741.052.8
Albania8644.02968026.076.8
Algeria12314.034811059.075.5
Angola7103.019842251.056.7
Antigua and Barbuda25736.085350.075.5
Argentina14646.040381860.075.4
Armenia7383.02975029.072.3
Australia41312.021370348.081.6
\n", + "
" + ], + "text/plain": [ + " gdp population life_expectancy\n", + "Country \n", + "Afghanistan 1311.0 26528741.0 52.8\n", + "Albania 8644.0 2968026.0 76.8\n", + "Algeria 12314.0 34811059.0 75.5\n", + "Angola 7103.0 19842251.0 56.7\n", + "Antigua and Barbuda 25736.0 85350.0 75.5\n", + "Argentina 14646.0 40381860.0 75.4\n", + "Armenia 7383.0 2975029.0 72.3\n", + "Australia 41312.0 21370348.0 81.6" + ] + }, + "execution_count": 67, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df" + ] + }, + { + "cell_type": "code", + "execution_count": 68, "metadata": { "slideshow": { "slide_type": "slide" @@ -2219,7 +2477,7 @@ "Australia 41312.0 21370348.0 81.6" ] }, - "execution_count": 27, + "execution_count": 68, "metadata": {}, "output_type": "execute_result" } @@ -2243,7 +2501,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 69, "metadata": { "slideshow": { "slide_type": "slide" @@ -2259,7 +2517,7 @@ "Name: Argentina, dtype: float64" ] }, - "execution_count": 28, + "execution_count": 69, "metadata": {}, "output_type": "execute_result" } @@ -2281,7 +2539,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 70, "metadata": { "slideshow": { "slide_type": "slide" @@ -2344,7 +2602,7 @@ "Angola 7103.0 19842251.0 56.7" ] }, - "execution_count": 29, + "execution_count": 70, "metadata": {}, "output_type": "execute_result" } @@ -2366,7 +2624,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 71, "metadata": { "slideshow": { "slide_type": "slide" @@ -2425,7 +2683,7 @@ "Angola 7103.0 19842251.0" ] }, - "execution_count": 30, + "execution_count": 71, "metadata": {}, "output_type": "execute_result" } @@ -2449,7 +2707,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 72, "metadata": { "slideshow": { "slide_type": "slide" @@ -2519,7 +2777,7 @@ "Angola 7103.0 19842251.0 56.7" ] }, - "execution_count": 31, + "execution_count": 72, "metadata": {}, "output_type": "execute_result" } @@ -2541,24 +2799,13 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "outputs": [ - { - "data": { - "text/plain": [ - "7103.0" - ] - }, - "execution_count": 32, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df.at['Angola', 'PKB']" ] @@ -2576,7 +2823,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 73, "metadata": { "slideshow": { "slide_type": "slide" @@ -2591,7 +2838,7 @@ " dtype='object', name='Country')" ] }, - "execution_count": 33, + "execution_count": 73, "metadata": {}, "output_type": "execute_result" } @@ -2613,7 +2860,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 74, "metadata": { "slideshow": { "slide_type": "slide" @@ -2690,7 +2937,7 @@ "October 444177 53596" ] }, - "execution_count": 34, + "execution_count": 74, "metadata": {}, "output_type": "execute_result" } @@ -2716,7 +2963,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 76, "metadata": { "slideshow": { "slide_type": "slide" @@ -2759,41 +3006,23 @@ " 737011\n", " 171494\n", " \n", - " \n", - " July\n", - " 779511\n", - " 194316\n", - " \n", - " \n", - " August\n", - " 673790\n", - " 206809\n", - " \n", - " \n", - " September\n", - " 673790\n", - " 140492\n", - " \n", " \n", "\n", "" ], "text/plain": [ - " members occasionals\n", - "May 682758 147898\n", - "June 737011 171494\n", - "July 779511 194316\n", - "August 673790 206809\n", - "September 673790 140492" + " members occasionals\n", + "May 682758 147898\n", + "June 737011 171494" ] }, - "execution_count": 35, + "execution_count": 76, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "df.head()" + "df.head(2)" ] }, { @@ -2805,7 +3034,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 77, "metadata": { "slideshow": { "slide_type": "slide" @@ -2876,7 +3105,7 @@ "October 444177 53596" ] }, - "execution_count": 36, + "execution_count": 77, "metadata": {}, "output_type": "execute_result" } @@ -2894,7 +3123,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 78, "metadata": { "slideshow": { "slide_type": "slide" @@ -2933,15 +3162,15 @@ " 140492\n", " \n", " \n", - " August\n", - " 673790\n", - " 206809\n", - " \n", - " \n", " May\n", " 682758\n", " 147898\n", " \n", + " \n", + " June\n", + " 737011\n", + " 171494\n", + " \n", " \n", "\n", "" @@ -2949,11 +3178,11 @@ "text/plain": [ " members occasionals\n", "September 673790 140492\n", - "August 673790 206809\n", - "May 682758 147898" + "May 682758 147898\n", + "June 737011 171494" ] }, - "execution_count": 37, + "execution_count": 78, "metadata": {}, "output_type": "execute_result" } @@ -2971,7 +3200,91 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 79, + "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", + "
membersoccasionals
May682758147898
June737011171494
July779511194316
August673790206809
September673790140492
October44417753596
\n", + "
" + ], + "text/plain": [ + " members occasionals\n", + "May 682758 147898\n", + "June 737011 171494\n", + "July 779511 194316\n", + "August 673790 206809\n", + "September 673790 140492\n", + "October 444177 53596" + ] + }, + "execution_count": 79, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df" + ] + }, + { + "cell_type": "code", + "execution_count": 80, "metadata": { "slideshow": { "slide_type": "slide" @@ -3060,7 +3373,7 @@ "max 779511.000000 206809.000000" ] }, - "execution_count": 38, + "execution_count": 80, "metadata": {}, "output_type": "execute_result" } @@ -3078,7 +3391,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 81, "metadata": { "slideshow": { "slide_type": "slide" @@ -3114,7 +3427,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 82, "metadata": { "slideshow": { "slide_type": "slide" @@ -3127,7 +3440,7 @@ "6" ] }, - "execution_count": 40, + "execution_count": 82, "metadata": {}, "output_type": "execute_result" } @@ -3145,7 +3458,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 84, "metadata": { "slideshow": { "slide_type": "slide" @@ -3158,7 +3471,7 @@ "(6, 2)" ] }, - "execution_count": 41, + "execution_count": 84, "metadata": {}, "output_type": "execute_result" } @@ -3185,28 +3498,86 @@ }, { "cell_type": "code", - "execution_count": 42, - "metadata": { - "slideshow": { - "slide_type": "slide" - } - }, + "execution_count": 86, + "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", + "
membersoccasionals
May682758147898
June737011171494
July779511194316
August673790206809
September673790140492
October44417753596
\n", + "
" + ], "text/plain": [ - "members 665172.833333\n", - "occasionals 152434.166667\n", - "dtype: float64" + " members occasionals\n", + "May 682758 147898\n", + "June 737011 171494\n", + "July 779511 194316\n", + "August 673790 206809\n", + "September 673790 140492\n", + "October 444177 53596" ] }, - "execution_count": 42, + "execution_count": 86, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "df.mean()" + "df" ] }, { @@ -3222,7 +3593,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 90, "metadata": { "slideshow": { "slide_type": "slide" @@ -3251,6 +3622,64 @@ "print(dane.value_counts())" ] }, + { + "cell_type": "code", + "execution_count": 91, + "metadata": { + "slideshow": { + "slide_type": "slide" + } + }, + "outputs": [ + { + "data": { + "text/plain": [ + "0 1\n", + "1 3\n", + "2 2\n", + "3 3\n", + "4 1\n", + "5 1\n", + "6 2\n", + "7 3\n", + "8 2\n", + "9 3\n", + "dtype: int64" + ] + }, + "execution_count": 91, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "dane" + ] + }, + { + "cell_type": "code", + "execution_count": 92, + "metadata": { + "slideshow": { + "slide_type": "slide" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "3 4\n", + "1 3\n", + "2 3\n", + "Name: count, dtype: int64\n" + ] + } + ], + "source": [ + "print(dane.value_counts())" + ] + }, { "cell_type": "markdown", "metadata": { @@ -3264,7 +3693,7 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": 93, "metadata": { "slideshow": { "slide_type": "slide" @@ -3289,7 +3718,7 @@ "Name: Age, Length: 891, dtype: bool" ] }, - "execution_count": 44, + "execution_count": 93, "metadata": {}, "output_type": "execute_result" } @@ -3312,131 +3741,13 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "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", - "
female_BMImale_BMIgdppopulationunder5mortalitylife_expectancyfertility
Country
Afghanistan21.0740220.620581311.026528741.0110.452.86.20
Albania25.6572626.446578644.02968026.017.976.81.76
Algeria26.3684124.5962012314.034811059.029.575.52.73
Angola23.4843122.250837103.019842251.0192.056.76.43
Antigua and Barbuda27.5054525.7660225736.085350.010.975.52.16
\n", - "
" - ], - "text/plain": [ - " female_BMI male_BMI gdp population \\\n", - "Country \n", - "Afghanistan 21.07402 20.62058 1311.0 26528741.0 \n", - "Albania 25.65726 26.44657 8644.0 2968026.0 \n", - "Algeria 26.36841 24.59620 12314.0 34811059.0 \n", - "Angola 23.48431 22.25083 7103.0 19842251.0 \n", - "Antigua and Barbuda 27.50545 25.76602 25736.0 85350.0 \n", - "\n", - " under5mortality life_expectancy fertility \n", - "Country \n", - "Afghanistan 110.4 52.8 6.20 \n", - "Albania 17.9 76.8 1.76 \n", - "Algeria 29.5 75.5 2.73 \n", - "Angola 192.0 56.7 6.43 \n", - "Antigua and Barbuda 10.9 75.5 2.16 " - ] - }, - "execution_count": 45, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df = pd.read_csv('./gapminder.csv', index_col='Country', nrows=5)\n", "\n", @@ -3445,153 +3756,13 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "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", - "
female_BMImale_BMIgdppopulationunder5mortalitylife_expectancyfertilitycontinenttmp
Country
Afghanistan21.0740220.620581311.026528741.0110.452.86.20Asia1
Albania25.6572626.446578644.02968026.017.976.81.76Europe1
Algeria26.3684124.5962012314.034811059.029.575.52.73Africa1
Angola23.4843122.250837103.019842251.0192.056.76.43Africa1
Antigua and Barbuda27.5054525.7660225736.085350.010.975.52.16Americas1
\n", - "
" - ], - "text/plain": [ - " female_BMI male_BMI gdp population \\\n", - "Country \n", - "Afghanistan 21.07402 20.62058 1311.0 26528741.0 \n", - "Albania 25.65726 26.44657 8644.0 2968026.0 \n", - "Algeria 26.36841 24.59620 12314.0 34811059.0 \n", - "Angola 23.48431 22.25083 7103.0 19842251.0 \n", - "Antigua and Barbuda 27.50545 25.76602 25736.0 85350.0 \n", - "\n", - " under5mortality life_expectancy fertility continent \\\n", - "Country \n", - "Afghanistan 110.4 52.8 6.20 Asia \n", - "Albania 17.9 76.8 1.76 Europe \n", - "Algeria 29.5 75.5 2.73 Africa \n", - "Angola 192.0 56.7 6.43 Africa \n", - "Antigua and Barbuda 10.9 75.5 2.16 Americas \n", - "\n", - " tmp \n", - "Country \n", - "Afghanistan 1 \n", - "Albania 1 \n", - "Algeria 1 \n", - "Angola 1 \n", - "Antigua and Barbuda 1 " - ] - }, - "execution_count": 46, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "conts = pd.Series({\n", " 'Afghanistan': 'Asia', 'Albania': 'Europe', 'Algeria':' Africa', 'Angola': 'Africa', 'Antigua and Barbuda': 'Americas'})\n", @@ -3605,168 +3776,13 @@ }, { "cell_type": "code", - "execution_count": 47, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "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", - "
female_BMImale_BMIgdppopulationunder5mortalitylife_expectancyfertilitycontinenttmp
Country
Afghanistan21.0740220.620581311.026528741.0110.452.86.20Asia1.0
Albania25.6572626.446578644.02968026.017.976.81.76Europe1.0
Algeria26.3684124.5962012314.034811059.029.575.52.73Africa1.0
Angola23.4843122.250837103.019842251.0192.056.76.43Africa1.0
Antigua and Barbuda27.5054525.7660225736.085350.010.975.52.16Americas1.0
Argentina27.4652327.5017014646.040381860.015.475.42.24NaNNaN
\n", - "
" - ], - "text/plain": [ - " female_BMI male_BMI gdp population \\\n", - "Country \n", - "Afghanistan 21.07402 20.62058 1311.0 26528741.0 \n", - "Albania 25.65726 26.44657 8644.0 2968026.0 \n", - "Algeria 26.36841 24.59620 12314.0 34811059.0 \n", - "Angola 23.48431 22.25083 7103.0 19842251.0 \n", - "Antigua and Barbuda 27.50545 25.76602 25736.0 85350.0 \n", - "Argentina 27.46523 27.50170 14646.0 40381860.0 \n", - "\n", - " under5mortality life_expectancy fertility continent \\\n", - "Country \n", - "Afghanistan 110.4 52.8 6.20 Asia \n", - "Albania 17.9 76.8 1.76 Europe \n", - "Algeria 29.5 75.5 2.73 Africa \n", - "Angola 192.0 56.7 6.43 Africa \n", - "Antigua and Barbuda 10.9 75.5 2.16 Americas \n", - "Argentina 15.4 75.4 2.24 NaN \n", - "\n", - " tmp \n", - "Country \n", - "Afghanistan 1.0 \n", - "Albania 1.0 \n", - "Algeria 1.0 \n", - "Angola 1.0 \n", - "Antigua and Barbuda 1.0 \n", - "Argentina NaN " - ] - }, - "execution_count": 47, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df.loc['Argentina'] = {\n", " 'female_BMI': 27.46523,\n", @@ -3782,151 +3798,13 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "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", - "
female_BMImale_BMIpopulationunder5mortalitylife_expectancyfertilitycontinenttmp
Country
Afghanistan21.0740220.6205826528741.0110.452.86.20Asia1.0
Albania25.6572626.446572968026.017.976.81.76Europe1.0
Algeria26.3684124.5962034811059.029.575.52.73Africa1.0
Angola23.4843122.2508319842251.0192.056.76.43Africa1.0
Antigua and Barbuda27.5054525.7660285350.010.975.52.16Americas1.0
Argentina27.4652327.5017040381860.015.475.42.24NaNNaN
\n", - "
" - ], - "text/plain": [ - " female_BMI male_BMI population under5mortality \\\n", - "Country \n", - "Afghanistan 21.07402 20.62058 26528741.0 110.4 \n", - "Albania 25.65726 26.44657 2968026.0 17.9 \n", - "Algeria 26.36841 24.59620 34811059.0 29.5 \n", - "Angola 23.48431 22.25083 19842251.0 192.0 \n", - "Antigua and Barbuda 27.50545 25.76602 85350.0 10.9 \n", - "Argentina 27.46523 27.50170 40381860.0 15.4 \n", - "\n", - " life_expectancy fertility continent tmp \n", - "Country \n", - "Afghanistan 52.8 6.20 Asia 1.0 \n", - "Albania 76.8 1.76 Europe 1.0 \n", - "Algeria 75.5 2.73 Africa 1.0 \n", - "Angola 56.7 6.43 Africa 1.0 \n", - "Antigua and Barbuda 75.5 2.16 Americas 1.0 \n", - "Argentina 75.4 2.24 NaN NaN " - ] - }, - "execution_count": 48, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df.drop('gdp', axis='columns')\n" ] @@ -3959,8 +3837,9 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 94, "metadata": { + "scrolled": true, "slideshow": { "slide_type": "slide" } @@ -4115,7 +3994,7 @@ "5 0 0 373450 8.0500 NaN S " ] }, - "execution_count": 49, + "execution_count": 94, "metadata": {}, "output_type": "execute_result" } @@ -4128,12 +4007,8 @@ }, { "cell_type": "code", - "execution_count": 50, - "metadata": { - "slideshow": { - "slide_type": "slide" - } - }, + "execution_count": 95, + "metadata": {}, "outputs": [ { "data": { @@ -4153,7 +4028,7 @@ "Name: Survived, Length: 891, dtype: int64" ] }, - "execution_count": 50, + "execution_count": 95, "metadata": {}, "output_type": "execute_result" } @@ -4164,7 +4039,20 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": null, + "metadata": { + "slideshow": { + "slide_type": "slide" + } + }, + "outputs": [], + "source": [ + "df['Survived']" + ] + }, + { + "cell_type": "code", + "execution_count": 97, "metadata": { "slideshow": { "slide_type": "slide" @@ -4189,7 +4077,7 @@ "Name: Survived, Length: 891, dtype: bool" ] }, - "execution_count": 51, + "execution_count": 97, "metadata": {}, "output_type": "execute_result" } @@ -4200,12 +4088,65 @@ }, { "cell_type": "code", - "execution_count": 52, + "execution_count": 100, "metadata": { "slideshow": { "slide_type": "slide" } }, + "outputs": [], + "source": [ + "df_survived = df[df['Pclass'] == 1]" + ] + }, + { + "cell_type": "code", + "execution_count": 101, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "891" + ] + }, + "execution_count": 101, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "len(df)" + ] + }, + { + "cell_type": "code", + "execution_count": 102, + "metadata": { + "slideshow": { + "slide_type": "slide" + } + }, + "outputs": [ + { + "data": { + "text/plain": [ + "216" + ] + }, + "execution_count": 102, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "len(df_survived)" + ] + }, + { + "cell_type": "code", + "execution_count": 103, + "metadata": {}, "outputs": [ { "data": { @@ -4461,13 +4402,13 @@ "[216 rows x 11 columns]" ] }, - "execution_count": 52, + "execution_count": 103, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "df[df['Pclass'] == 1]" + "df_survived" ] }, { @@ -4488,7 +4429,7 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": 104, "metadata": { "slideshow": { "slide_type": "slide" @@ -4749,7 +4690,7 @@ "[94 rows x 11 columns]" ] }, - "execution_count": 53, + "execution_count": 104, "metadata": {}, "output_type": "execute_result" } @@ -4763,7 +4704,7 @@ }, { "cell_type": "code", - "execution_count": 54, + "execution_count": 105, "metadata": { "slideshow": { "slide_type": "slide" @@ -5024,13 +4965,12 @@ "[192 rows x 11 columns]" ] }, - "execution_count": 54, + "execution_count": 105, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "\n", "df[df['SibSp'] > df['Parch']]" ] }, @@ -5049,7 +4989,7 @@ }, { "cell_type": "code", - "execution_count": 55, + "execution_count": 106, "metadata": { "slideshow": { "slide_type": "slide" @@ -5205,7 +5145,7 @@ "24 0 0 113788 35.5000 A6 S " ] }, - "execution_count": 55, + "execution_count": 106, "metadata": {}, "output_type": "execute_result" } @@ -5216,7 +5156,7 @@ }, { "cell_type": "code", - "execution_count": 56, + "execution_count": 107, "metadata": { "slideshow": { "slide_type": "slide" @@ -5372,7 +5312,7 @@ "53 1 0 PC 17572 76.7292 D33 C " ] }, - "execution_count": 56, + "execution_count": 107, "metadata": {}, "output_type": "execute_result" } @@ -5383,7 +5323,7 @@ }, { "cell_type": "code", - "execution_count": 57, + "execution_count": 108, "metadata": { "slideshow": { "slide_type": "slide" @@ -5644,7 +5584,7 @@ "[192 rows x 11 columns]" ] }, - "execution_count": 57, + "execution_count": 108, "metadata": {}, "output_type": "execute_result" } @@ -5655,7 +5595,7 @@ }, { "cell_type": "code", - "execution_count": 58, + "execution_count": 109, "metadata": { "slideshow": { "slide_type": "slide" @@ -5668,7 +5608,7 @@ "(113, 11)" ] }, - "execution_count": 58, + "execution_count": 109, "metadata": {}, "output_type": "execute_result" } @@ -5702,131 +5642,13 @@ }, { "cell_type": "code", - "execution_count": 59, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "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", - "
female_BMImale_BMIgdppopulationunder5mortalitylife_expectancyfertility
Country
Afghanistan21.0740220.620581311.026528741.0110.452.86.20
Albania25.6572626.446578644.02968026.017.976.81.76
Algeria26.3684124.5962012314.034811059.029.575.52.73
Angola23.4843122.250837103.019842251.0192.056.76.43
Antigua and Barbuda27.5054525.7660225736.085350.010.975.52.16
\n", - "
" - ], - "text/plain": [ - " female_BMI male_BMI gdp population \\\n", - "Country \n", - "Afghanistan 21.07402 20.62058 1311.0 26528741.0 \n", - "Albania 25.65726 26.44657 8644.0 2968026.0 \n", - "Algeria 26.36841 24.59620 12314.0 34811059.0 \n", - "Angola 23.48431 22.25083 7103.0 19842251.0 \n", - "Antigua and Barbuda 27.50545 25.76602 25736.0 85350.0 \n", - "\n", - " under5mortality life_expectancy fertility \n", - "Country \n", - "Afghanistan 110.4 52.8 6.20 \n", - "Albania 17.9 76.8 1.76 \n", - "Algeria 29.5 75.5 2.73 \n", - "Angola 192.0 56.7 6.43 \n", - "Antigua and Barbuda 10.9 75.5 2.16 " - ] - }, - "execution_count": 59, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df = pd.read_csv('./gapminder.csv', index_col='Country', nrows=5)\n", "\n", @@ -5846,27 +5668,13 @@ }, { "cell_type": "code", - "execution_count": 60, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "female_BMI\n", - "male_BMI\n", - "gdp\n", - "population\n", - "under5mortality\n", - "life_expectancy\n", - "fertility\n" - ] - } - ], + "outputs": [], "source": [ "for column_name in df:\n", " print(column_name)" @@ -5874,23 +5682,9 @@ }, { "cell_type": "code", - "execution_count": 61, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "female_BMI Country\n", - "Afghanistan 21.07402\n", - "Albania 25.65726\n", - "Algeria 26.36841\n", - "Angola 23.48431\n", - "Antigua and Barbuda 27.50545\n", - "Name: female_BMI, dtype: float64\n" - ] - } - ], + "outputs": [], "source": [ "for col_name, series in df.items():\n", " print(col_name, series)\n", @@ -5899,29 +5693,13 @@ }, { "cell_type": "code", - "execution_count": 62, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Afghanistan \n", - " female_BMI 2.107402e+01\n", - "male_BMI 2.062058e+01\n", - "gdp 1.311000e+03\n", - "population 2.652874e+07\n", - "under5mortality 1.104000e+02\n", - "life_expectancy 5.280000e+01\n", - "fertility 6.200000e+00\n", - "Name: Afghanistan, dtype: float64\n" - ] - } - ], + "outputs": [], "source": [ "for idx, row in df.iterrows():\n", " print(idx, '\\n', row)\n", @@ -5930,30 +5708,13 @@ }, { "cell_type": "code", - "execution_count": 63, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "outputs": [ - { - "data": { - "text/plain": [ - "Country\n", - "Afghanistan normal\n", - "Albania overweight\n", - "Algeria normal\n", - "Angola normal\n", - "Antigua and Barbuda overweight\n", - "Name: male_BMI, dtype: object" - ] - }, - "execution_count": 63, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "def bmi_level(bmi):\n", " if bmi <= 18.5:\n", @@ -5973,30 +5734,13 @@ }, { "cell_type": "code", - "execution_count": 64, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "outputs": [ - { - "data": { - "text/plain": [ - "Country\n", - "Afghanistan normal\n", - "Albania overweight\n", - "Algeria normal\n", - "Angola normal\n", - "Antigua and Barbuda overweight\n", - "dtype: object" - ] - }, - "execution_count": 64, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "def bmi_level(row_data):\n", " bmi = row_data['male_BMI']\n", @@ -6013,127 +5757,13 @@ }, { "cell_type": "code", - "execution_count": 65, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "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", - "
CountryAfghanistanAlbaniaAlgeriaAngolaAntigua and Barbuda
female_BMI2.107402e+012.565726e+012.636841e+012.348431e+0127.50545
male_BMI2.062058e+012.644657e+012.459620e+012.225083e+0125.76602
gdp1.311000e+038.644000e+031.231400e+047.103000e+0325736.00000
population2.652874e+072.968026e+063.481106e+071.984225e+0785350.00000
under5mortality1.104000e+021.790000e+012.950000e+011.920000e+0210.90000
life_expectancy5.280000e+017.680000e+017.550000e+015.670000e+0175.50000
fertility6.200000e+001.760000e+002.730000e+006.430000e+002.16000
\n", - "
" - ], - "text/plain": [ - "Country Afghanistan Albania Algeria Angola \\\n", - "female_BMI 2.107402e+01 2.565726e+01 2.636841e+01 2.348431e+01 \n", - "male_BMI 2.062058e+01 2.644657e+01 2.459620e+01 2.225083e+01 \n", - "gdp 1.311000e+03 8.644000e+03 1.231400e+04 7.103000e+03 \n", - "population 2.652874e+07 2.968026e+06 3.481106e+07 1.984225e+07 \n", - "under5mortality 1.104000e+02 1.790000e+01 2.950000e+01 1.920000e+02 \n", - "life_expectancy 5.280000e+01 7.680000e+01 7.550000e+01 5.670000e+01 \n", - "fertility 6.200000e+00 1.760000e+00 2.730000e+00 6.430000e+00 \n", - "\n", - "Country Antigua and Barbuda \n", - "female_BMI 27.50545 \n", - "male_BMI 25.76602 \n", - "gdp 25736.00000 \n", - "population 85350.00000 \n", - "under5mortality 10.90000 \n", - "life_expectancy 75.50000 \n", - "fertility 2.16000 " - ] - }, - "execution_count": 65, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df.transpose()" ] @@ -6160,12 +5790,25 @@ }, { "cell_type": "code", - "execution_count": 66, + "execution_count": 117, "metadata": { "slideshow": { "slide_type": "slide" } }, + "outputs": [], + "source": [ + "import pandas as pd\n", + "\n", + "df = pd.read_csv('./nba.csv')\n", + "\n", + "#df.sample(5)" + ] + }, + { + "cell_type": "code", + "execution_count": 118, + "metadata": {}, "outputs": [ { "data": { @@ -6201,96 +5844,179 @@ " \n", " \n", " \n", - " 202\n", - " Solomon Hill\n", - " Indiana Pacers\n", - " 44.0\n", - " SF\n", - " 25.0\n", - " 6-7\n", - " 225.0\n", - " Arizona\n", - " 1358880.0\n", - " \n", - " \n", - " 286\n", - " Tim Frazier\n", - " New Orleans Pelicans\n", - " 2.0\n", + " 0\n", + " Avery Bradley\n", + " Boston Celtics\n", + " 0.0\n", " PG\n", " 25.0\n", - " 6-1\n", - " 170.0\n", - " Penn State\n", - " 845059.0\n", - " \n", - " \n", - " 210\n", - " Joe Young\n", - " Indiana Pacers\n", - " 1.0\n", - " PG\n", - " 23.0\n", " 6-2\n", " 180.0\n", - " Oregon\n", - " 1007026.0\n", + " Texas\n", + " 7730337.0\n", " \n", " \n", - " 420\n", - " Nazr Mohammed\n", - " Oklahoma City Thunder\n", - " 13.0\n", - " C\n", - " 38.0\n", - " 6-10\n", - " 250.0\n", - " Kentucky\n", - " 222888.0\n", + " 1\n", + " Jae Crowder\n", + " Boston Celtics\n", + " 99.0\n", + " SF\n", + " 25.0\n", + " 6-6\n", + " 235.0\n", + " Marquette\n", + " 6796117.0\n", " \n", " \n", - " 258\n", - " Tony Allen\n", - " Memphis Grizzlies\n", - " 9.0\n", + " 2\n", + " John Holland\n", + " Boston Celtics\n", + " 30.0\n", " SG\n", - " 34.0\n", - " 6-4\n", - " 213.0\n", - " Oklahoma State\n", - " 5158539.0\n", + " 27.0\n", + " 6-5\n", + " 205.0\n", + " Boston University\n", + " NaN\n", + " \n", + " \n", + " 3\n", + " R.J. Hunter\n", + " Boston Celtics\n", + " 28.0\n", + " SG\n", + " 22.0\n", + " 6-5\n", + " 185.0\n", + " Georgia State\n", + " 1148640.0\n", + " \n", + " \n", + " 4\n", + " Jonas Jerebko\n", + " Boston Celtics\n", + " 8.0\n", + " PF\n", + " 29.0\n", + " 6-10\n", + " 231.0\n", + " NaN\n", + " 5000000.0\n", + " \n", + " \n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " \n", + " \n", + " 453\n", + " Shelvin Mack\n", + " Utah Jazz\n", + " 8.0\n", + " PG\n", + " 26.0\n", + " 6-3\n", + " 203.0\n", + " Butler\n", + " 2433333.0\n", + " \n", + " \n", + " 454\n", + " Raul Neto\n", + " Utah Jazz\n", + " 25.0\n", + " PG\n", + " 24.0\n", + " 6-1\n", + " 179.0\n", + " NaN\n", + " 900000.0\n", + " \n", + " \n", + " 455\n", + " Tibor Pleiss\n", + " Utah Jazz\n", + " 21.0\n", + " C\n", + " 26.0\n", + " 7-3\n", + " 256.0\n", + " NaN\n", + " 2900000.0\n", + " \n", + " \n", + " 456\n", + " Jeff Withey\n", + " Utah Jazz\n", + " 24.0\n", + " C\n", + " 26.0\n", + " 7-0\n", + " 231.0\n", + " Kansas\n", + " 947276.0\n", + " \n", + " \n", + " 457\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", " \n", " \n", "\n", + "

458 rows × 9 columns

\n", "" ], "text/plain": [ - " Name Team Number Position Age Height \\\n", - "202 Solomon Hill Indiana Pacers 44.0 SF 25.0 6-7 \n", - "286 Tim Frazier New Orleans Pelicans 2.0 PG 25.0 6-1 \n", - "210 Joe Young Indiana Pacers 1.0 PG 23.0 6-2 \n", - "420 Nazr Mohammed Oklahoma City Thunder 13.0 C 38.0 6-10 \n", - "258 Tony Allen Memphis Grizzlies 9.0 SG 34.0 6-4 \n", + " Name Team Number Position Age Height Weight \\\n", + "0 Avery Bradley Boston Celtics 0.0 PG 25.0 6-2 180.0 \n", + "1 Jae Crowder Boston Celtics 99.0 SF 25.0 6-6 235.0 \n", + "2 John Holland Boston Celtics 30.0 SG 27.0 6-5 205.0 \n", + "3 R.J. Hunter Boston Celtics 28.0 SG 22.0 6-5 185.0 \n", + "4 Jonas Jerebko Boston Celtics 8.0 PF 29.0 6-10 231.0 \n", + ".. ... ... ... ... ... ... ... \n", + "453 Shelvin Mack Utah Jazz 8.0 PG 26.0 6-3 203.0 \n", + "454 Raul Neto Utah Jazz 25.0 PG 24.0 6-1 179.0 \n", + "455 Tibor Pleiss Utah Jazz 21.0 C 26.0 7-3 256.0 \n", + "456 Jeff Withey Utah Jazz 24.0 C 26.0 7-0 231.0 \n", + "457 NaN NaN NaN NaN NaN NaN NaN \n", "\n", - " Weight College Salary \n", - "202 225.0 Arizona 1358880.0 \n", - "286 170.0 Penn State 845059.0 \n", - "210 180.0 Oregon 1007026.0 \n", - "420 250.0 Kentucky 222888.0 \n", - "258 213.0 Oklahoma State 5158539.0 " + " College Salary \n", + "0 Texas 7730337.0 \n", + "1 Marquette 6796117.0 \n", + "2 Boston University NaN \n", + "3 Georgia State 1148640.0 \n", + "4 NaN 5000000.0 \n", + ".. ... ... \n", + "453 Butler 2433333.0 \n", + "454 NaN 900000.0 \n", + "455 NaN 2900000.0 \n", + "456 Kansas 947276.0 \n", + "457 NaN NaN \n", + "\n", + "[458 rows x 9 columns]" ] }, - "execution_count": 66, + "execution_count": 118, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "import pandas as pd\n", - "\n", - "df = pd.read_csv('./nba.csv')\n", - "\n", - "df.sample(5)" + "df" ] }, { @@ -6306,7 +6032,124 @@ }, { "cell_type": "code", - "execution_count": 67, + "execution_count": 119, + "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", + "
TeamSalary
0Boston Celtics7730337.0
1Boston Celtics6796117.0
2Boston CelticsNaN
3Boston Celtics1148640.0
4Boston Celtics5000000.0
.........
453Utah Jazz2433333.0
454Utah Jazz900000.0
455Utah Jazz2900000.0
456Utah Jazz947276.0
457NaNNaN
\n", + "

458 rows × 2 columns

\n", + "
" + ], + "text/plain": [ + " Team Salary\n", + "0 Boston Celtics 7730337.0\n", + "1 Boston Celtics 6796117.0\n", + "2 Boston Celtics NaN\n", + "3 Boston Celtics 1148640.0\n", + "4 Boston Celtics 5000000.0\n", + ".. ... ...\n", + "453 Utah Jazz 2433333.0\n", + "454 Utah Jazz 900000.0\n", + "455 Utah Jazz 2900000.0\n", + "456 Utah Jazz 947276.0\n", + "457 NaN NaN\n", + "\n", + "[458 rows x 2 columns]" + ] + }, + "execution_count": 119, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df[['Team', 'Salary']]" + ] + }, + { + "cell_type": "code", + "execution_count": 120, "metadata": { "slideshow": { "slide_type": "slide" @@ -6344,45 +6187,45 @@ " \n", " \n", " Atlanta Hawks\n", - " 4.860197e+06\n", + " 2854940.0\n", " \n", " \n", " Boston Celtics\n", - " 4.181505e+06\n", + " 3021242.5\n", " \n", " \n", " Brooklyn Nets\n", - " 3.501898e+06\n", + " 1335480.0\n", " \n", " \n", " Charlotte Hornets\n", - " 5.222728e+06\n", + " 4204200.0\n", " \n", " \n", " Chicago Bulls\n", - " 5.785559e+06\n", + " 2380440.0\n", " \n", " \n", "\n", "" ], "text/plain": [ - " Salary\n", - "Team \n", - "Atlanta Hawks 4.860197e+06\n", - "Boston Celtics 4.181505e+06\n", - "Brooklyn Nets 3.501898e+06\n", - "Charlotte Hornets 5.222728e+06\n", - "Chicago Bulls 5.785559e+06" + " Salary\n", + "Team \n", + "Atlanta Hawks 2854940.0\n", + "Boston Celtics 3021242.5\n", + "Brooklyn Nets 1335480.0\n", + "Charlotte Hornets 4204200.0\n", + "Chicago Bulls 2380440.0" ] }, - "execution_count": 67, + "execution_count": 120, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "df[['Team', 'Salary']].groupby('Team').mean().head()" + "df[['Team', 'Salary']].groupby('Team').median().h" ] }, { @@ -6394,36 +6237,13 @@ }, { "cell_type": "code", - "execution_count": 68, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "outputs": [ - { - "data": { - "text/plain": [ - "Team Position\n", - "Atlanta Hawks C 7.585417e+06\n", - " PF 5.988067e+06\n", - " PG 4.881700e+06\n", - " SF 3.000000e+06\n", - " SG 2.607758e+06\n", - " ... \n", - "Washington Wizards C 8.163476e+06\n", - " PF 5.650000e+06\n", - " PG 9.011208e+06\n", - " SF 2.789700e+06\n", - " SG 2.839248e+06\n", - "Name: Salary, Length: 149, dtype: float64" - ] - }, - "execution_count": 68, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df.groupby(['Team', 'Position'])['Salary'].mean()" ] @@ -6452,185 +6272,26 @@ }, { "cell_type": "code", - "execution_count": 69, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "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", - "
Salary
meanstdcount
Position
C5.967052e+065.787989e+0678
PF4.562483e+064.800054e+0697
PG5.077829e+065.051809e+0688
SF4.857393e+066.011889e+0684
SG4.009861e+064.491609e+0699
\n", - "
" - ], - "text/plain": [ - " Salary \n", - " mean std count\n", - "Position \n", - "C 5.967052e+06 5.787989e+06 78\n", - "PF 4.562483e+06 4.800054e+06 97\n", - "PG 5.077829e+06 5.051809e+06 88\n", - "SF 4.857393e+06 6.011889e+06 84\n", - "SG 4.009861e+06 4.491609e+06 99" - ] - }, - "execution_count": 69, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df[['Position', 'Salary']].groupby('Position').agg(['mean', 'std', 'count'])" ] }, { "cell_type": "code", - "execution_count": 70, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "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", - "
Salary
Position
C22275967.0
PF22081286.0
PG21412973.0
SF24969112.0
SG19944278.0
\n", - "
" - ], - "text/plain": [ - " Salary\n", - "Position \n", - "C 22275967.0\n", - "PF 22081286.0\n", - "PG 21412973.0\n", - "SF 24969112.0\n", - "SG 19944278.0" - ] - }, - "execution_count": 70, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "def group_range(x):\n", " return x.max() - x.min()\n", @@ -6640,35 +6301,13 @@ }, { "cell_type": "code", - "execution_count": 71, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Liczba grup: 5\n", - "dict_keys(['C', 'PF', 'PG', 'SF', 'SG'])\n", - " Name Team Number Position Age Height Weight \\\n", - "7 Kelly Olynyk Boston Celtics 41.0 C 25.0 7-0 238.0 \n", - "10 Jared Sullinger Boston Celtics 7.0 C 24.0 6-9 260.0 \n", - "14 Tyler Zeller Boston Celtics 44.0 C 26.0 7-0 253.0 \n", - "23 Brook Lopez Brooklyn Nets 11.0 C 28.0 7-0 275.0 \n", - "27 Henry Sims Brooklyn Nets 14.0 C 26.0 6-10 248.0 \n", - "\n", - " College Salary \n", - "7 Gonzaga 2165160.0 \n", - "10 Ohio State 2569260.0 \n", - "14 North Carolina 2616975.0 \n", - "23 Stanford 19689000.0 \n", - "27 Georgetown 947276.0 \n" - ] - } - ], + "outputs": [], "source": [ "gb = df.groupby(['Position'])\n", "\n", @@ -6680,31 +6319,9 @@ }, { "cell_type": "code", - "execution_count": 72, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0 15.36\n", - "1 15.36\n", - "2 15.36\n", - "3 15.36\n", - "4 15.36\n", - " ... \n", - "453 15.36\n", - "454 15.36\n", - "455 17.92\n", - "456 17.92\n", - "457 \n", - "Name: Height, Length: 458, dtype: Float64" - ] - }, - "execution_count": 72, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "\n", "df.Height.str.split('-').str[0].astype('Int64') * 2.56" @@ -6729,616 +6346,13 @@ }, { "cell_type": "code", - "execution_count": 73, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "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", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
pairsystemidis_constrainedmetricscore
1214ha-enNiuTrans382Truebleu-all16.512243
1215ha-enNiuTrans382Truechrf-all44.724766
1216ha-enNiuTrans382Truebleu-A16.512243
1217ha-enNiuTrans382Truechrf-A44.724766
1218ha-enFacebook-AI181Falsebleu-all20.982704
1219ha-enFacebook-AI181Falsechrf-all48.653770
1220ha-enFacebook-AI181Falsebleu-A20.982704
1221ha-enFacebook-AI181Falsechrf-A48.653770
1222ha-enTRANSSION336Falsebleu-all18.834851
1223ha-enTRANSSION336Falsechrf-all47.238279
1224ha-enTRANSSION336Falsebleu-A18.834851
1225ha-enTRANSSION336Falsechrf-A47.238279
1226ha-enAMU628Truebleu-all14.132845
1227ha-enAMU628Truechrf-all41.256570
1228ha-enAMU628Truebleu-A14.132845
1229ha-enAMU628Truechrf-A41.256570
1230ha-enP3AI715Truebleu-all17.793617
1231ha-enP3AI715Truechrf-all46.307402
1232ha-enP3AI715Truebleu-A17.793617
1233ha-enP3AI715Truechrf-A46.307402
1234ha-enOnline-B1356Falsebleu-all18.655658
1235ha-enOnline-B1356Falsechrf-all46.658216
1236ha-enOnline-B1356Falsebleu-A18.655658
1237ha-enOnline-B1356Falsechrf-A46.658216
1238ha-enTWB1335Falsebleu-all12.326443
1239ha-enTWB1335Falsechrf-all40.282629
1240ha-enTWB1335Falsebleu-A12.326443
1241ha-enTWB1335Falsechrf-A40.282629
1242ha-enZMT553Falsebleu-all18.837023
1243ha-enZMT553Falsechrf-all47.231474
1244ha-enZMT553Falsebleu-A18.837023
1245ha-enZMT553Falsechrf-A47.231474
1246ha-enManifold437Truebleu-all16.943915
1247ha-enManifold437Truechrf-all45.638356
1248ha-enManifold437Truebleu-A16.943915
1249ha-enManifold437Truechrf-A45.638356
1250ha-enOnline-Y1374Falsebleu-all13.898531
1251ha-enOnline-Y1374Falsechrf-all44.842874
1252ha-enOnline-Y1374Falsebleu-A13.898531
1253ha-enOnline-Y1374Falsechrf-A44.842874
1254ha-enHuaweiTSC758Truebleu-all17.492440
1255ha-enHuaweiTSC758Truechrf-all46.795737
1256ha-enHuaweiTSC758Truebleu-A17.492440
1257ha-enHuaweiTSC758Truechrf-A46.795737
1258ha-enMS-EgDC896Truebleu-all17.133350
1259ha-enMS-EgDC896Truechrf-all45.266274
1260ha-enMS-EgDC896Truebleu-A17.133350
1261ha-enMS-EgDC896Truechrf-A45.266274
1262ha-enGTCOM1298Falsebleu-all17.794272
1263ha-enGTCOM1298Falsechrf-all46.714831
1264ha-enGTCOM1298Falsebleu-A17.794272
1265ha-enGTCOM1298Falsechrf-A46.714831
1266ha-enUEdin1149Truebleu-all14.887836
1267ha-enUEdin1149Truechrf-all42.247415
1268ha-enUEdin1149Truebleu-A14.887836
1269ha-enUEdin1149Truechrf-A42.247415
\n", - "
" - ], - "text/plain": [ - " pair system id is_constrained metric score\n", - "1214 ha-en NiuTrans 382 True bleu-all 16.512243\n", - "1215 ha-en NiuTrans 382 True chrf-all 44.724766\n", - "1216 ha-en NiuTrans 382 True bleu-A 16.512243\n", - "1217 ha-en NiuTrans 382 True chrf-A 44.724766\n", - "1218 ha-en Facebook-AI 181 False bleu-all 20.982704\n", - "1219 ha-en Facebook-AI 181 False chrf-all 48.653770\n", - "1220 ha-en Facebook-AI 181 False bleu-A 20.982704\n", - "1221 ha-en Facebook-AI 181 False chrf-A 48.653770\n", - "1222 ha-en TRANSSION 336 False bleu-all 18.834851\n", - "1223 ha-en TRANSSION 336 False chrf-all 47.238279\n", - "1224 ha-en TRANSSION 336 False bleu-A 18.834851\n", - "1225 ha-en TRANSSION 336 False chrf-A 47.238279\n", - "1226 ha-en AMU 628 True bleu-all 14.132845\n", - "1227 ha-en AMU 628 True chrf-all 41.256570\n", - "1228 ha-en AMU 628 True bleu-A 14.132845\n", - "1229 ha-en AMU 628 True chrf-A 41.256570\n", - "1230 ha-en P3AI 715 True bleu-all 17.793617\n", - "1231 ha-en P3AI 715 True chrf-all 46.307402\n", - "1232 ha-en P3AI 715 True bleu-A 17.793617\n", - "1233 ha-en P3AI 715 True chrf-A 46.307402\n", - "1234 ha-en Online-B 1356 False bleu-all 18.655658\n", - "1235 ha-en Online-B 1356 False chrf-all 46.658216\n", - "1236 ha-en Online-B 1356 False bleu-A 18.655658\n", - "1237 ha-en Online-B 1356 False chrf-A 46.658216\n", - "1238 ha-en TWB 1335 False bleu-all 12.326443\n", - "1239 ha-en TWB 1335 False chrf-all 40.282629\n", - "1240 ha-en TWB 1335 False bleu-A 12.326443\n", - "1241 ha-en TWB 1335 False chrf-A 40.282629\n", - "1242 ha-en ZMT 553 False bleu-all 18.837023\n", - "1243 ha-en ZMT 553 False chrf-all 47.231474\n", - "1244 ha-en ZMT 553 False bleu-A 18.837023\n", - "1245 ha-en ZMT 553 False chrf-A 47.231474\n", - "1246 ha-en Manifold 437 True bleu-all 16.943915\n", - "1247 ha-en Manifold 437 True chrf-all 45.638356\n", - "1248 ha-en Manifold 437 True bleu-A 16.943915\n", - "1249 ha-en Manifold 437 True chrf-A 45.638356\n", - "1250 ha-en Online-Y 1374 False bleu-all 13.898531\n", - "1251 ha-en Online-Y 1374 False chrf-all 44.842874\n", - "1252 ha-en Online-Y 1374 False bleu-A 13.898531\n", - "1253 ha-en Online-Y 1374 False chrf-A 44.842874\n", - "1254 ha-en HuaweiTSC 758 True bleu-all 17.492440\n", - "1255 ha-en HuaweiTSC 758 True chrf-all 46.795737\n", - "1256 ha-en HuaweiTSC 758 True bleu-A 17.492440\n", - "1257 ha-en HuaweiTSC 758 True chrf-A 46.795737\n", - "1258 ha-en MS-EgDC 896 True bleu-all 17.133350\n", - "1259 ha-en MS-EgDC 896 True chrf-all 45.266274\n", - "1260 ha-en MS-EgDC 896 True bleu-A 17.133350\n", - "1261 ha-en MS-EgDC 896 True chrf-A 45.266274\n", - "1262 ha-en GTCOM 1298 False bleu-all 17.794272\n", - "1263 ha-en GTCOM 1298 False chrf-all 46.714831\n", - "1264 ha-en GTCOM 1298 False bleu-A 17.794272\n", - "1265 ha-en GTCOM 1298 False chrf-A 46.714831\n", - "1266 ha-en UEdin 1149 True bleu-all 14.887836\n", - "1267 ha-en UEdin 1149 True chrf-all 42.247415\n", - "1268 ha-en UEdin 1149 True bleu-A 14.887836\n", - "1269 ha-en UEdin 1149 True chrf-A 42.247415" - ] - }, - "execution_count": 73, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df = pd.read_csv('https://raw.githubusercontent.com/wmt-conference/wmt21-news-systems/main/scores/automatic-scores.tsv', sep='\\t')\n", "df = df[df.pair == 'ha-en']\n", @@ -7347,174 +6361,13 @@ }, { "cell_type": "code", - "execution_count": 74, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "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", - "
metricbleu-Ableu-allchrf-Achrf-all
system
AMU14.13284514.13284541.25657041.256570
Facebook-AI20.98270420.98270448.65377048.653770
GTCOM17.79427217.79427246.71483146.714831
HuaweiTSC17.49244017.49244046.79573746.795737
MS-EgDC17.13335017.13335045.26627445.266274
Manifold16.94391516.94391545.63835645.638356
NiuTrans16.51224316.51224344.72476644.724766
Online-B18.65565818.65565846.65821646.658216
Online-Y13.89853113.89853144.84287444.842874
P3AI17.79361717.79361746.30740246.307402
TRANSSION18.83485118.83485147.23827947.238279
TWB12.32644312.32644340.28262940.282629
UEdin14.88783614.88783642.24741542.247415
ZMT18.83702318.83702347.23147447.231474
\n", - "
" - ], - "text/plain": [ - "metric bleu-A bleu-all chrf-A chrf-all\n", - "system \n", - "AMU 14.132845 14.132845 41.256570 41.256570\n", - "Facebook-AI 20.982704 20.982704 48.653770 48.653770\n", - "GTCOM 17.794272 17.794272 46.714831 46.714831\n", - "HuaweiTSC 17.492440 17.492440 46.795737 46.795737\n", - "MS-EgDC 17.133350 17.133350 45.266274 45.266274\n", - "Manifold 16.943915 16.943915 45.638356 45.638356\n", - "NiuTrans 16.512243 16.512243 44.724766 44.724766\n", - "Online-B 18.655658 18.655658 46.658216 46.658216\n", - "Online-Y 13.898531 13.898531 44.842874 44.842874\n", - "P3AI 17.793617 17.793617 46.307402 46.307402\n", - "TRANSSION 18.834851 18.834851 47.238279 47.238279\n", - "TWB 12.326443 12.326443 40.282629 40.282629\n", - "UEdin 14.887836 14.887836 42.247415 42.247415\n", - "ZMT 18.837023 18.837023 47.231474 47.231474" - ] - }, - "execution_count": 74, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df.pivot(index='system', columns='metric', values='score')" ] @@ -7559,167 +6412,13 @@ }, { "cell_type": "code", - "execution_count": 75, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "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", - "
SurvivedPclassNameSexAgeSibSpParchTicketFareCabinEmbarked
PassengerId
103Braund\\t Mr. Owen Harrismale22.010A/5 211717.2500NaNS
211Cumings\\t Mrs. John Bradley (Florence Briggs T...female38.010PC 1759971.2833C85C
313Heikkinen\\t Miss. Lainafemale26.000STON/O2. 31012827.9250NaNS
411Futrelle\\t Mrs. Jacques Heath (Lily May Peel)female35.01011380353.1000C123S
503Allen\\t Mr. William Henrymale35.0003734508.0500NaNS
\n", - "
" - ], - "text/plain": [ - " Survived Pclass \\\n", - "PassengerId \n", - "1 0 3 \n", - "2 1 1 \n", - "3 1 3 \n", - "4 1 1 \n", - "5 0 3 \n", - "\n", - " Name Sex Age \\\n", - "PassengerId \n", - "1 Braund\\t Mr. Owen Harris male 22.0 \n", - "2 Cumings\\t Mrs. John Bradley (Florence Briggs T... female 38.0 \n", - "3 Heikkinen\\t Miss. Laina female 26.0 \n", - "4 Futrelle\\t Mrs. Jacques Heath (Lily May Peel) female 35.0 \n", - "5 Allen\\t Mr. William Henry male 35.0 \n", - "\n", - " SibSp Parch Ticket Fare Cabin Embarked \n", - "PassengerId \n", - "1 1 0 A/5 21171 7.2500 NaN S \n", - "2 1 0 PC 17599 71.2833 C85 C \n", - "3 0 0 STON/O2. 3101282 7.9250 NaN S \n", - "4 1 0 113803 53.1000 C123 S \n", - "5 0 0 373450 8.0500 NaN S " - ] - }, - "execution_count": 75, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df = pd.read_csv('./titanic_train.tsv', sep='\\t', index_col='PassengerId')\n", "\n", @@ -7728,79 +6427,26 @@ }, { "cell_type": "code", - "execution_count": 76, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "outputs": [ - { - "data": { - "text/plain": [ - "PassengerId\n", - "1 BRAUND\\t MR. OWEN HARRIS\n", - "2 CUMINGS\\t MRS. JOHN BRADLEY (FLORENCE BRIGGS T...\n", - "3 HEIKKINEN\\t MISS. LAINA\n", - "4 FUTRELLE\\t MRS. JACQUES HEATH (LILY MAY PEEL)\n", - "5 ALLEN\\t MR. WILLIAM HENRY\n", - " ... \n", - "887 MONTVILA\\t REV. JUOZAS\n", - "888 GRAHAM\\t MISS. MARGARET EDITH\n", - "889 JOHNSTON\\t MISS. CATHERINE HELEN \"CARRIE\"\n", - "890 BEHR\\t MR. KARL HOWELL\n", - "891 DOOLEY\\t MR. PATRICK\n", - "Name: Name, Length: 891, dtype: object" - ] - }, - "execution_count": 76, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df.Name.str.upper()" ] }, { "cell_type": "code", - "execution_count": 77, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "PassengerId\n", - "1 Braund\\t Mr. Owen Harris\n", - "2 Cumings\\t Mrs. John Bradley (Florence Briggs T...\n", - "3 Heikkinen\\t Miss. Laina\n", - "4 Futrelle\\t Mrs. Jacques Heath (Lily May Peel)\n", - "5 Allen\\t Mr. William Henry\n", - "Name: Name, dtype: object\n" - ] - }, - { - "data": { - "text/plain": [ - "PassengerId\n", - "1 False\n", - "2 True\n", - "3 True\n", - "4 True\n", - "5 False\n", - "Name: Name, dtype: bool" - ] - }, - "execution_count": 77, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "print(df.Name.head())\n", "df.Name.str.contains('Miss|Mrs').head()" @@ -7808,235 +6454,52 @@ }, { "cell_type": "code", - "execution_count": 78, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "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", - "
01
PassengerId
1BraundMr. Owen Harris
2CumingsMrs. John Bradley (Florence Briggs Thayer)
3HeikkinenMiss. Laina
4FutrelleMrs. Jacques Heath (Lily May Peel)
5AllenMr. William Henry
.........
887MontvilaRev. Juozas
888GrahamMiss. Margaret Edith
889JohnstonMiss. Catherine Helen \"Carrie\"
890BehrMr. Karl Howell
891DooleyMr. Patrick
\n", - "

891 rows × 2 columns

\n", - "
" - ], - "text/plain": [ - " 0 1\n", - "PassengerId \n", - "1 Braund Mr. Owen Harris\n", - "2 Cumings Mrs. John Bradley (Florence Briggs Thayer)\n", - "3 Heikkinen Miss. Laina\n", - "4 Futrelle Mrs. Jacques Heath (Lily May Peel)\n", - "5 Allen Mr. William Henry\n", - "... ... ...\n", - "887 Montvila Rev. Juozas\n", - "888 Graham Miss. Margaret Edith\n", - "889 Johnston Miss. Catherine Helen \"Carrie\"\n", - "890 Behr Mr. Karl Howell\n", - "891 Dooley Mr. Patrick\n", - "\n", - "[891 rows x 2 columns]" - ] - }, - "execution_count": 78, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df.Name.str.split('\\t', expand=True)" ] }, { "cell_type": "code", - "execution_count": 79, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "outputs": [ - { - "data": { - "text/plain": [ - "PassengerId\n", - "1 [Braund, Mr. Owen Harris]\n", - "2 [Cumings, Mrs. John Bradley (Florence Briggs ...\n", - "3 [Heikkinen, Miss. Laina]\n", - "4 [Futrelle, Mrs. Jacques Heath (Lily May Peel)]\n", - "5 [Allen, Mr. William Henry]\n", - " ... \n", - "887 [Montvila, Rev. Juozas]\n", - "888 [Graham, Miss. Margaret Edith]\n", - "889 [Johnston, Miss. Catherine Helen \"Carrie\"]\n", - "890 [Behr, Mr. Karl Howell]\n", - "891 [Dooley, Mr. Patrick]\n", - "Name: Name, Length: 891, dtype: object" - ] - }, - "execution_count": 79, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df.Name.str.split('\\t')" ] }, { "cell_type": "code", - "execution_count": 80, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "outputs": [ - { - "data": { - "text/plain": [ - "PassengerId\n", - "1 Mr. Owen Harris\n", - "2 Mrs. John Bradley (Florence Briggs Thayer)\n", - "3 Miss. Laina\n", - "4 Mrs. Jacques Heath (Lily May Peel)\n", - "5 Mr. William Henry\n", - " ... \n", - "887 Rev. Juozas\n", - "888 Miss. Margaret Edith\n", - "889 Miss. Catherine Helen \"Carrie\"\n", - "890 Mr. Karl Howell\n", - "891 Mr. Patrick\n", - "Name: Name, Length: 891, dtype: object" - ] - }, - "execution_count": 80, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df.Name.str.split('\\t').str[1]" ] }, { "cell_type": "code", - "execution_count": 81, + "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, - "outputs": [ - { - "data": { - "text/plain": [ - "PassengerId\n", - "1 Mr.\n", - "2 Mrs.\n", - "3 Miss.\n", - "4 Mrs.\n", - "5 Mr.\n", - " ... \n", - "887 Rev.\n", - "888 Miss.\n", - "889 Miss.\n", - "890 Mr.\n", - "891 Mr.\n", - "Name: Name, Length: 891, dtype: object" - ] - }, - "execution_count": 81, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df.Name.str.split('\\t').str[1].str.strip().str.split(' ').str[0]" ] diff --git a/zajecia2/tmp.xlsx b/zajecia2/tmp.xlsx index 8376404b2f531107cddb10ae0daf26c998df7966..59151ee746a452fa85cad3fc952636410bb1d9b5 100644 GIT binary patch delta 588 zcmbQDK2@DJz?+#xgn@y9gTbP?d?N3fdLR{<8l>#@9w?~I#K0g3q*L;f1B&tsiuIH8 zi&FI}a&yj33iLi~AaHzt*OR?_)$X!5Ul%{B&U&!%QM5;1bj0PBCrj>b-`*SD{(}93 zVfp_*@5&2$`GS6T=wD>-Nin?Jv+nieD~X5sTpXEHY8{pbS*re8x%2Zy%~|sb`Rg5D zF21GQv1%7<`;s0dR^tsE+!MFsv7 zx<>7UHbJ-P`?xd2lGgp}JS&^<{KtLeh+UlQo6Zm=U!Gr-os^%S4T{VF wZ$>5&W_TiqRFRv#Xf06j51;{3D4K;PD+p_Xt@9CBP^_Pv zUzDm>k(+aN(s{2V1_JHzu0{FFGp{TYHQvyrJ@MqdjD^BlTrXS9tBxK&Z=z$cn328Yg(mZQO9M;)p5vJ> z9x}~HY&rS#J=3hIJ3{^+(UVPB{$$GASyIP0%I#JSFMIIe+m|1k)w?eyR(kX6@Oz~Hrf zC6qSbVzgsp28PpSX^!WNU={4G$Ze1Eg^Mzkje+|0^C;uV?vCZfq@qo8!*to_zOE;xfRS vkx7IZo(3XS~e1)YMzfH~*R%3Gjr4I%GR8rrm diff --git a/zajecia3/1.ipynb b/zajecia3/1.ipynb new file mode 100644 index 0000000..f2d77db --- /dev/null +++ b/zajecia3/1.ipynb @@ -0,0 +1,2280 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "56b06287-d1ba-409a-a207-2125edc31719", + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np" + ] + }, + { + "cell_type": "markdown", + "id": "fa9d3b45-d381-4cfa-91b3-701a7c2578f7", + "metadata": {}, + "source": [ + "# NumPy" + ] + }, + { + "cell_type": "markdown", + "id": "7d008b7b-b668-42bd-993e-64cc2de4ae17", + "metadata": {}, + "source": [ + "## wymiary" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "cb38fb13-3671-4a7b-89e7-247d8db91a13", + "metadata": {}, + "outputs": [], + "source": [ + "arr = np.array([1, 2, 3, 4, 5, 6, 7])" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "445ebe15-088f-4811-96c6-cc0043fb5ab4", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[1 2 3 4 5 6 7]\n" + ] + } + ], + "source": [ + "print(arr)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "9428e371-82e5-4f94-b6f6-e54808a7b72c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "numpy.ndarray" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "type(arr)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "bea5efad-20cc-4284-8575-bd32becaddd7", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "numpy.ndarray" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "type(arr)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "cb12cac9-cf3b-4924-90e3-a82f5ca7274c", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "()" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "np.array(123).shape" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "7e589615-ab19-4786-b2bc-49f46c706adc", + "metadata": {}, + "outputs": [], + "source": [ + "arr = np.array([[1, 2, 3], [4, 5, 6]])" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "a0925cb2-1586-48a7-9256-2d07228547e1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(2, 3)" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "arr.shape" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "10b857a9-0bf0-4ee4-9f86-dabef5452d59", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[1 2 3]\n", + " [4 5 6]]\n" + ] + } + ], + "source": [ + "print(arr)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "0029c4f5-135b-4a37-bf95-7f8e9afed454", + "metadata": {}, + "outputs": [], + "source": [ + "arr = np.array([[[1, 2, 3], [4, 5, 6]], [[1, 2, 3], [4, 5, 6]]])\n" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "6fe7be82-a5d9-493f-8410-c1201d49606d", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(2, 2, 3)" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "arr.shape" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "61686743-b034-4fb7-a891-e4aed1d7bd66", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[[1 2 3]\n", + " [4 5 6]]\n", + "\n", + " [[1 2 3]\n", + " [4 5 6]]]\n" + ] + } + ], + "source": [ + "print(arr)" + ] + }, + { + "cell_type": "markdown", + "id": "ae9cd324-0297-42bc-8010-4ea0fa7074cc", + "metadata": {}, + "source": [ + "### zadanie 1\n", + "\n", + "1. Utwórz jednowymiarową tablicę zawierającą liczby od 10 do 20 włącznie. Wyświetl:\n", + " - Tablicę,\n", + " - Jej kształt (`shape`),\n", + " - Jej typ (`type`).\n", + "\n", + "2. Utwórz macierz 3x2 o elementach (10,20,30,40,50,60) i wyświetl:\n", + " - Tablicę,\n", + " - Jej kształt (`shape`),\n", + " - Jej typ (`type`).\n" + ] + }, + { + "cell_type": "markdown", + "id": "d38ccaec-ac11-4bef-8d48-7087931f4157", + "metadata": {}, + "source": [ + "## dostęp do elementów" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "a1cf151f-9128-414f-b065-2060b8a8a411", + "metadata": {}, + "outputs": [], + "source": [ + "arr = np.array([[1,2,3,4,5], [6,7,8,9,10]])" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "89975e71-f996-48af-a50d-3dd5f86c6775", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[ 1 2 3 4 5]\n", + " [ 6 7 8 9 10]]\n" + ] + } + ], + "source": [ + "print(arr)" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "3f3b6ab3-7c1f-491c-9b9d-648073e65378", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "8" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "arr[1,2]" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "66527b7d-b6a6-435a-b330-2890792ca56e", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "9" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "arr[1,-2]" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "2bb01400-e860-4c75-9fd1-ce44268463b6", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([8, 9])" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "arr[1,2:4]" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "ed9309c6-9666-41fe-9310-0597408740f7", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([ 8, 9, 10])" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "arr[1,2:]" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "8b1a9f33-5e91-4ffc-ac7a-d79286dcf1da", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([ 6, 7, 8, 9, 10])" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "arr[1,:]" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "d9ec87f1-7c83-44f4-a71b-c9f291a51644", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([1, 2, 3, 4, 5])" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "arr[0,:]" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "825d6cf5-4302-4b94-b00a-dd8b5c61f058", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([3, 4])" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "arr[0,2:4]" + ] + }, + { + "cell_type": "markdown", + "id": "0cb14fd3-88aa-43a8-a11d-a71fd9f8aeb6", + "metadata": {}, + "source": [ + "### zadanie 2\n", + "1. Utwórz dwuwymiarową tablicę NumPy o wymiarach (3,3) zawierającą liczby od 1 do 9.\n", + "2. Wykonaj następujące operacje na tablicy:\n", + " - Wyświetl element znajdujący się w drugim wierszu\n", + " - Wyświetl wszystkie elementy znajdujące się w drugim wierszu\n", + " - Wyświetl wszystkie elementy znajdujące się w drugiej kolumnie\n", + " - Wyświetl macierz, ale bez pierwszego wiersza i bez pierwszej kolumny\n" + ] + }, + { + "cell_type": "markdown", + "id": "4ad7bed0-d812-4683-a03b-033db0911197", + "metadata": {}, + "source": [ + "## Typy danych" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "c529565a-fc38-47ae-8649-352cd0525178", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "int64\n" + ] + } + ], + "source": [ + "arr = np.array([1, 2, 3, 4])\n", + "\n", + "print(arr.dtype)" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "64996026-ef86-4a43-bdb0-1dcb64e3228b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " 1\u001b[0m arr[\u001b[38;5;241m3\u001b[39m]\n", + "\u001b[0;31mIndexError\u001b[0m: index 3 is out of bounds for axis 0 with size 1" + ] + } + ], + "source": [ + "arr[3]" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "id": "2563e811-a4e4-4f6d-bef7-379ff24b1624", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([1, 2, 3, 4])" + ] + }, + "execution_count": 56, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "arr.squeeze()" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "id": "9ca46070-ed05-4f09-8a51-bdd2ed121af9", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "4" + ] + }, + "execution_count": 57, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "arr.squeeze()[3]" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "id": "ff357a34-afb3-4cb1-b898-33708b1ad9e0", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[1, 2, 3, 4]])" + ] + }, + "execution_count": 58, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "arr" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "id": "63318611-23d1-413a-bda7-d09cdf240ae2", + "metadata": {}, + "outputs": [], + "source": [ + "arr = np.array([1, 2, 3, 4])" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "id": "245ae6b2-ee99-4537-bea6-3fbca70636ca", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([1, 2, 3, 4])" + ] + }, + "execution_count": 60, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "arr" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "id": "6a2c2e36-2b01-473e-b912-c1d042eaf4fe", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[1, 2, 3, 4]])" + ] + }, + "execution_count": 61, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "np.expand_dims(arr, axis=0)" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "id": "dab2689b-fefb-4495-a958-61472d562ff1", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[1],\n", + " [2],\n", + " [3],\n", + " [4]])" + ] + }, + "execution_count": 62, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "np.expand_dims(arr, axis=1)" + ] + }, + { + "cell_type": "markdown", + "id": "ed9bae4d-900f-4f09-b2eb-09155bc3ef9e", + "metadata": {}, + "source": [ + "### Zadanie 4" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "id": "0c15a6c3-55a0-482f-b102-a2c3ab20e8bd", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (1725909133.py, line 4)", + "output_type": "error", + "traceback": [ + "\u001b[0;36m Cell \u001b[0;32mIn[63], line 4\u001b[0;36m\u001b[0m\n\u001b[0;31m 1. Utwórz tablicę NumPy zawierającą liczby [1, 2, 3, 4, 5]. Przypisz ją do zmiennej `x` i zmień pierwszy element tablicy na 50. Wyświetl:\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "source": [ + "### Zadanie 4\n", + "\n", + "\n", + "1. Utwórz tablicę NumPy zawierającą liczby [1, 2, 3, 4, 5]. Przypisz ją do zmiennej `x` i zmień pierwszy element tablicy na 50. Wyświetl:\n", + " - Tablicę `arr`,\n", + " - Tablicę `x`.\n", + "\n", + "2. Zrób kopię tablicy `arr` za pomocą metody `.copy()` i zmień pierwszy element tablicy `arr` na 50. Wyświetl:\n", + " - Tablicę `arr`,\n", + " - Tablicę `x` (po kopii).\n", + "\n", + "3. Zrób kopię tablicy `arr` przy użyciu modułu `copy.deepcopy` i zmień pierwszy element tablicy `arr` na 50. Wyświetl:\n", + " - Tablicę `arr`,\n", + " - Tablicę `x` (po głębokiej kopii).\n", + "\n", + "4. Utwórz tablicę NumPy o wymiarach (1,4) zawierającą elementy \\( [1, 2, 3, 4, 5] \\) i wykonaj następujące operacje:\n", + " - Wyświetl tablicę.\n", + " - Zmień tablicę, aby była jednowymiarowa za pomocą metody `.squeeze()`\n", + "\n", + "\n", + "# Punkt 1 - Przypisanie do zmiennej\n", + "arr = np.array([1, 2, 3, 4, 5])\n", + "x = arr\n", + "arr[0] = 42\n", + "print(arr) # Tablica arr po zmianie\n", + "print(x) # Tablica x po zmianie\n", + "\n", + "# Punkt 2 - Kopia tablicy\n", + "arr = np.array([1, 2, 3, 4, 5])\n", + "x = arr.copy()\n", + "arr[0] = 42\n", + "print(arr) # Tablica arr po zmianie\n", + "print(x) # Tablica x po kopii\n", + "\n", + "# Punkt 3 - Głęboka kopia\n", + "arr = np.array([1, 2, 3, 4, 5])\n", + "x = copy.deepcopy(arr)\n", + "arr[0] = 42\n", + "print(arr) # Tablica arr po zmianie\n", + "\n", + "print(x) # Tablica x po głębokiej kopii\n" + ] + }, + { + "cell_type": "markdown", + "id": "4562728a-8fea-4643-ac20-4880ee264e5c", + "metadata": {}, + "source": [ + "### Reshape jeszcze raze" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "id": "6b10a6a1-2f81-41a4-8466-222990ac904c", + "metadata": { + "jupyter": { + "source_hidden": true + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[ 1 2 3 4 5 6 7 8 9 10 11 12]\n", + "[[ 1 2 3]\n", + " [ 4 5 6]\n", + " [ 7 8 9]\n", + " [10 11 12]]\n" + ] + } + ], + "source": [ + "arr = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])\n", + "print(arr)\n", + "newarr = arr.reshape(4, 3)\n", + "print(newarr)" + ] + }, + { + "cell_type": "code", + "execution_count": 65, + "id": "8c982360-8838-4036-ac05-92069f789a30", + "metadata": {}, + "outputs": [ + { + "ename": "ValueError", + "evalue": "cannot reshape array of size 12 into shape (4,2)", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[65], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m newarr \u001b[38;5;241m=\u001b[39m arr\u001b[38;5;241m.\u001b[39mreshape(\u001b[38;5;241m4\u001b[39m, \u001b[38;5;241m2\u001b[39m)\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28mprint\u001b[39m(newarr)\n", + "\u001b[0;31mValueError\u001b[0m: cannot reshape array of size 12 into shape (4,2)" + ] + } + ], + "source": [ + "newarr = arr.reshape(4, 2)\n", + "print(newarr)" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "id": "5ff60614-82d0-4421-9ebf-7b0598cda361", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[ 1 2 3]\n", + " [ 4 5 6]\n", + " [ 7 8 9]\n", + " [10 11 12]]\n" + ] + } + ], + "source": [ + "newarr = arr.reshape(4, -1)\n", + "print(newarr)" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "id": "e951ca90-8d1e-4ca8-8196-f00db99cf866", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[ 1 2]\n", + " [ 3 4]\n", + " [ 5 6]\n", + " [ 7 8]\n", + " [ 9 10]\n", + " [11 12]]\n" + ] + } + ], + "source": [ + "newarr = arr.reshape(-1, 2)\n", + "print(newarr)" + ] + }, + { + "cell_type": "markdown", + "id": "d9ed66d4-9440-4076-8ee0-9855238762bf", + "metadata": {}, + "source": [ + "### Zadanie 5\n", + "\n", + "1. Utwórz tablicę NumPy zawierającą liczby [1, 2, 3, ..., 10] o wymiarach (2,5). Wyświetl:\n", + " - Tablicę (2,5)\n", + "\n", + "2. Zmień kształt tablicy na (5,2) za pomocą metody `reshape`. Wyświetl ją.\n", + "\n", + "3. Zmień kształt tablicy na (10,1) za pomocą metody `reshape`. Wyświetl ją\n", + " \n", + "4. Użyj wartości `-1` w jednym z wymiarów w metodzie `reshape`, aby automatycznie dostosować pozostałe wymiary na (5,-1)\n", + "\n", + "5. Utwórz tablicę o wymiarach (5,1,2,1) na podstawie powyższego przykładu" + ] + }, + { + "cell_type": "markdown", + "id": "7927210e-feb0-4e61-87a4-7bb9b8b76b17", + "metadata": {}, + "source": [ + "## Obliczenia wektorowe i macierzowe" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "id": "5b8fd161-d367-47b7-a558-2ac275a7a308", + "metadata": {}, + "outputs": [], + "source": [ + "x = np.array([1,2,4])\n", + "y = np.array([100,101,102])" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "id": "ef246bbf-66dc-42cd-b851-c56d477a4879", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([101, 103, 106])" + ] + }, + "execution_count": 69, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x+y" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "id": "3085a99f-9461-4f7d-a141-d051fd670866", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([101, 102, 104])" + ] + }, + "execution_count": 70, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x+100" + ] + }, + { + "cell_type": "code", + "execution_count": 71, + "id": "25d19f04-240b-4054-a8d0-e2cbf3056db1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([100, 200, 400])" + ] + }, + "execution_count": 71, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x*100" + ] + }, + { + "cell_type": "code", + "execution_count": 72, + "id": "6e71e5a0-427a-4d3d-93cf-f6e45cd69226", + "metadata": {}, + "outputs": [], + "source": [ + "x = np.array([[1,2,4], [10,11,12]])" + ] + }, + { + "cell_type": "code", + "execution_count": 73, + "id": "67e64578-3574-44c4-8f9d-d116412bc83e", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[ 1, 2, 4],\n", + " [10, 11, 12]])" + ] + }, + "execution_count": 73, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x" + ] + }, + { + "cell_type": "markdown", + "id": "cdf9ffb5-6ce3-400a-bf8f-0f364f17fefc", + "metadata": {}, + "source": [ + "#### element-wise multiplication" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "id": "d182d4a9-d654-4f07-8577-b367a9892860", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[ 100, 200, 400],\n", + " [1000, 1100, 1200]])" + ] + }, + "execution_count": 74, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x*100" + ] + }, + { + "cell_type": "code", + "execution_count": 75, + "id": "db4ec9ff-7ca9-4d63-90cd-a513b3bb59ea", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[ 1, 2, 4],\n", + " [10, 11, 12]])" + ] + }, + "execution_count": 75, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "id": "505e245c-d4e6-45ea-b932-0e4de1327fc4", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([100, 101, 102])" + ] + }, + "execution_count": 76, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "y" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "id": "7c80b3f2-4dc9-4662-9036-1d736ecb6af1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[ 1, 4, 16],\n", + " [100, 121, 144]])" + ] + }, + "execution_count": 77, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x*x" + ] + }, + { + "cell_type": "code", + "execution_count": 78, + "id": "a49e39b2-f64e-4cbe-9fe2-cac29f217637", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[ 100, 202, 408],\n", + " [1000, 1111, 1224]])" + ] + }, + "execution_count": 78, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x*y" + ] + }, + { + "cell_type": "markdown", + "id": "75af9e4a-2d8f-4c77-8dac-f25c09c549f5", + "metadata": {}, + "source": [ + "#### mnożenie macierzy, iloczny skalarny\n", + "dot product- iloczyn skaralny dla wektorów \n", + "mnożenie macierzowe - dla macierzy" + ] + }, + { + "cell_type": "code", + "execution_count": 79, + "id": "79413af7-c8b2-4cae-9979-992782c5ad74", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([100, 101, 102])" + ] + }, + "execution_count": 79, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "y" + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "id": "6bc6192b-fbce-4eb0-95de-e6e6bd6729a2", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "30605" + ] + }, + "execution_count": 80, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "y.dot(y)" + ] + }, + { + "cell_type": "code", + "execution_count": 81, + "id": "8d2f6687-f4cc-450a-bd5c-ec9ddf220cb6", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "30605" + ] + }, + "execution_count": 81, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "y@y" + ] + }, + { + "cell_type": "code", + "execution_count": 82, + "id": "fc5fd3fe-6b34-409f-ad34-25828988f0b2", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "30605" + ] + }, + "execution_count": 82, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "np.matmul(y,y)" + ] + }, + { + "cell_type": "code", + "execution_count": 83, + "id": "640e1c27-4ab9-4cb7-bd00-a895fdcc5476", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[ 1, 2, 4],\n", + " [10, 11, 12]])" + ] + }, + "execution_count": 83, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x" + ] + }, + { + "cell_type": "code", + "execution_count": 84, + "id": "49d9ff43-3e93-4836-b87f-7095b2667854", + "metadata": {}, + "outputs": [ + { + "ename": "ValueError", + "evalue": "shapes (2,3) and (2,3) not aligned: 3 (dim 1) != 2 (dim 0)", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[84], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m x\u001b[38;5;241m.\u001b[39mdot(x)\n", + "\u001b[0;31mValueError\u001b[0m: shapes (2,3) and (2,3) not aligned: 3 (dim 1) != 2 (dim 0)" + ] + } + ], + "source": [ + "x.dot(x)" + ] + }, + { + "cell_type": "code", + "execution_count": 85, + "id": "9e5a2c8f-d398-4246-b215-8c5fb5e1da00", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(2, 3)" + ] + }, + "execution_count": 85, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x.shape" + ] + }, + { + "cell_type": "code", + "execution_count": 86, + "id": "c31c73f0-4848-43fa-97a7-fb5522a87862", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(3,)" + ] + }, + "execution_count": 86, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "y.shape" + ] + }, + { + "cell_type": "code", + "execution_count": 87, + "id": "47e8851e-47a2-4453-aee5-c1e3bdd01541", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([ 710, 3335])" + ] + }, + "execution_count": 87, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x.dot(y)" + ] + }, + { + "cell_type": "code", + "execution_count": 88, + "id": "3b5ed3a6-591a-4181-b4eb-efe0c85a852c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([ 710, 3335])" + ] + }, + "execution_count": 88, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x @ y" + ] + }, + { + "cell_type": "code", + "execution_count": 89, + "id": "a1f68122-808c-40df-948f-08fa3993f336", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([ 710, 3335])" + ] + }, + "execution_count": 89, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "np.matmul(x,y)" + ] + }, + { + "cell_type": "code", + "execution_count": 90, + "id": "6d4ed5fa-6537-418e-b648-a64c14ae40cf", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[ 1, 2, 4],\n", + " [10, 11, 12]])" + ] + }, + "execution_count": 90, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x" + ] + }, + { + "cell_type": "code", + "execution_count": 91, + "id": "13ed3203-b5b8-47dc-a471-0eda865a8eed", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[ 2, 4],\n", + " [11, 12]])" + ] + }, + "execution_count": 91, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x[:,1:]" + ] + }, + { + "cell_type": "code", + "execution_count": 92, + "id": "d7991eb9-2774-4424-aa19-373456fe18bb", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[ 48, 56],\n", + " [154, 188]])" + ] + }, + "execution_count": 92, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "np.matmul(x[:,1:] , x[:,1:])" + ] + }, + { + "cell_type": "code", + "execution_count": 93, + "id": "74d2da83-8cf3-46f4-859d-6694fce7f194", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[ 1, 2, 4],\n", + " [10, 11, 12]])" + ] + }, + "execution_count": 93, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x" + ] + }, + { + "cell_type": "code", + "execution_count": 94, + "id": "06981ab2-4b03-4dcd-87d2-f4f689e75f2d", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[ 1, 10],\n", + " [ 2, 11],\n", + " [ 4, 12]])" + ] + }, + "execution_count": 94, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x.T" + ] + }, + { + "cell_type": "markdown", + "id": "aaf38f60-7ef3-47c9-922c-64016e35196e", + "metadata": {}, + "source": [ + "### Zadanie 6\n", + "\n", + "\n", + "1. Utwórz dwie tablice jednowymiarowe `x` i `y`:\n", + " - `x` zawiera liczby \\( [3, 5, 7] \\),\n", + " - `y` zawiera liczby \\( [50, 60, 70] \\).\n", + "\n", + "2. Wykonaj następujące operacje i wyświetl wyniki:\n", + " - Dodaj tablicę `x` i `y`.\n", + " - Dodaj do każdego elementu tablicy `x` liczbę 10.\n", + " - Pomnóż każdy element tablicy `x` przez 5.\n", + "\n", + "3. Utwórz dwuwymiarową tablicę `z` zawierającą:\n", + "\n", + " \\begin{bmatrix}\n", + " 3 & 5 & 7 \\\\\n", + " 8 & 10 & 12 \\\\\n", + "\n", + " 10 & 10 & 10 \\\\\n", + " \\end{bmatrix}\n", + "\n", + " Następnie wykonaj następujące operacje:\n", + " - Pomnóż macierzowo x i z\n", + " - Oblicz iloczyn skalrny x i y\n" + ] + }, + { + "cell_type": "code", + "execution_count": 95, + "id": "eb34ddb2-6f92-4444-87dd-00fb392d416e", + "metadata": {}, + "outputs": [], + "source": [ + "## Tworzenie macierzy zerowych, jednostkowych, itp" + ] + }, + { + "cell_type": "code", + "execution_count": 96, + "id": "de2ca8df-31fe-4fef-ba7f-bd2fa2bfa766", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]])" + ] + }, + "execution_count": 96, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "np.zeros((10,10))" + ] + }, + { + "cell_type": "code", + "execution_count": 97, + "id": "e5850227-6736-4867-ba93-6d56685d6d64", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],\n", + " [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],\n", + " [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],\n", + " [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],\n", + " [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],\n", + " [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],\n", + " [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],\n", + " [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],\n", + " [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],\n", + " [1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]])" + ] + }, + "execution_count": 97, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "np.ones((10,10))" + ] + }, + { + "cell_type": "code", + "execution_count": 98, + "id": "69f3a9e8-5ffa-4eb6-916f-d89bab25438a", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[123., 123., 123., 123., 123., 123., 123., 123., 123., 123.],\n", + " [123., 123., 123., 123., 123., 123., 123., 123., 123., 123.],\n", + " [123., 123., 123., 123., 123., 123., 123., 123., 123., 123.],\n", + " [123., 123., 123., 123., 123., 123., 123., 123., 123., 123.],\n", + " [123., 123., 123., 123., 123., 123., 123., 123., 123., 123.],\n", + " [123., 123., 123., 123., 123., 123., 123., 123., 123., 123.],\n", + " [123., 123., 123., 123., 123., 123., 123., 123., 123., 123.],\n", + " [123., 123., 123., 123., 123., 123., 123., 123., 123., 123.],\n", + " [123., 123., 123., 123., 123., 123., 123., 123., 123., 123.],\n", + " [123., 123., 123., 123., 123., 123., 123., 123., 123., 123.]])" + ] + }, + "execution_count": 98, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "np.ones((10,10)) * 123" + ] + }, + { + "cell_type": "code", + "execution_count": 99, + "id": "7f9568c6-cb77-452c-9298-cfa4229157fc", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "array([[1., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 1., 0., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 1., 0., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 1., 0., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 1., 0., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 1., 0., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 1., 0., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 1., 0., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 1., 0.],\n", + " [0., 0., 0., 0., 0., 0., 0., 0., 0., 1.]])" + ] + }, + "execution_count": 99, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "np.eye(10)" + ] + }, + { + "cell_type": "code", + "execution_count": 100, + "id": "6fda600b-9422-45b2-a593-8afe96738a7c", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1\n", + "2\n", + "3\n", + "4\n", + "5\n", + "6\n" + ] + } + ], + "source": [ + "#\n", + "arr = np.array([[1, 2, 3], [4, 5, 6]])\n", + "\n", + "for x in arr:\n", + " for y in x:\n", + " print(y)" + ] + }, + { + "cell_type": "code", + "execution_count": 101, + "id": "af0eb0d3-4ec1-41c4-9860-63cdd54b818b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1\n", + "2\n", + "3\n", + "4\n", + "5\n", + "6\n" + ] + } + ], + "source": [ + "#\n", + "arr = np.array([[1, 2, 3], [4, 5, 6]])\n", + "\n", + "for i in range(len(arr)):\n", + " for j in range(len(arr[i])):\n", + " print(arr[i,j])" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "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.11.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/zajecia3/1_odpowiedzi.ipynb b/zajecia3/1_odpowiedzi.ipynb new file mode 100644 index 0000000..6859e1f --- /dev/null +++ b/zajecia3/1_odpowiedzi.ipynb @@ -0,0 +1,311 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "23ed41a0-7a05-493e-a640-4bfb10c42164", + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "fa3799c5-d3a0-4967-98d4-a340d19dbfc6", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[10 11 12 13 14 15 16 17 18 19 20]\n", + "(11,)\n", + "\n" + ] + } + ], + "source": [ + "#Zadanie 1.1\n", + "# Tworzenie tablicy jednowymiarowej\n", + "arr = np.array([10,11,12,13,14,15,16,17,18,19,20])\n", + "print(arr)\n", + "print(arr.shape)\n", + "print(type(arr))\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "b6b4fa7d-7ee5-416c-8060-39057b49d77b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[10 20]\n", + " [30 40]\n", + " [50 60]]\n", + "(3, 2)\n", + "\n" + ] + } + ], + "source": [ + "# Zadanie 1.2\n", + "arr = np.array([[10, 20], [30, 40], [50, 60]])\n", + "\n", + "print(arr)\n", + "\n", + "print(arr.shape)\n", + "\n", + "print(type(arr))" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "f96f774c-d6cd-440f-b6bf-a2d373404de3", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[1 2 3]\n", + " [4 5 6]\n", + " [7 8 9]]\n", + "8\n", + "[[7 8 9]]\n", + "[3 6 9]\n", + "[[5 6]\n", + " [8 9]]\n" + ] + } + ], + "source": [ + "# Zadanie 2\n", + "# Tworzenie dwuwymiarowej tablicy\n", + "arr = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])\n", + "\n", + "print(arr)\n", + "\n", + "\n", + "print(arr[2, 1])\n", + "\n", + "print(arr[2:])\n", + "\n", + "\n", + "print(arr[:,2])\n", + "\n", + "print(arr[1:,1:])\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "43216855-9d5d-4d03-9512-557f4d228571", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[10 20 30 40]\n", + "int64\n", + "[10. 20. 30. 40.]\n", + "float32\n", + "['Python' 'NumPy' 'Coding']\n", + "004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv0RI600RN!9r;`8x7G_CAK~#9!?VWdcRaLgYe)k?d!Ms@-*-PkZf>&A+I#J_%POEKilVrW52yOjQYE1%;VWBHAAa^>no2`a!dJM9 zd|2$dfF?;68Rjga0m20D;LJ4c&_4Q$k53^%#-4dKl zpIe7@Q!A&0X5H3S8D!-?JRfoEwmJ!A^L;4uVMbiXN0zEc;7kXaRry{9Fw}>h9()?X zXC4GB0kV_)`5r#xcu=OpMQO}Tzh@2BEz!z7t5Q;w;1uqaDtot@_AfnDQi>9cb*t;p zV2ck=sk9WO@e2299oDV#RjO7lzIZBvK$LB7;NQSH`R{hg1)lZbSe0D-&{N7_*hKvl zXp4$WQ52=|tDQ_AS|@4YJ~$Y-2mFjASET=d;?q>jin5jQz+m9aBoxkXjsyzkC#lc6 z`B#(#>jvBiwDjQ`55BMZGc{SV3KgBAG>G2<1;&tFQPU4(sEn+p4R9cE8gM;Ol<;1A z;2U7Ic~#AhH3#?>SPVQ_<-KCyP@oskM8zDKb-Mv51ag20zVy-dmXu1G_ziNk(93jM z<<&wzqikQ9*SdtytTc+Vrj}L70Z596yc)I$9f1izXP}GuJKvc1nj1y`Lc6729B-^! zCAr4RoxRPe$F`qYI3BpS$_KZ{YtUz?%DPe92pomn<1Iuy>C@@dyEkyZQPzI}CBR48 zO?6tgWx!5V-YNyUdonqyg-ap%z)0X=pf@li;l0a%DHgT$ZPUh9NEE>8g!fti2LUfu z`F`B_9n~X5FiXqJfOB;Zms)Nxo$@x-FUW1Z1YZrj0IW#(ULkM@un5W3(nqZunPz`o zSi{@7z)3!|QwtXkp0Qqs0~aKG|Gy*he9M4|NZi{V}MW0Z1+LLWxLr}xaA4o8v-l^u0alE;%?m%t=uV4hci>t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Vk879 zN_fb@)^gxj9jejcG2kqR+usf;b@VZIM?=(yKENBmY)6-nm9$dzs(HzBMFgH>7*f>l zLEP}9sfp%DEZb7tKSIw&4!Cwx6^ky}z(v3c#QC{{Lzdub#3A8Eq7lnB33ynCWIQND z!c>+ckq6x@ZD)IFxb$Tu_XQY3Wc1jKnZo#dM3 z;RPWFS${_XFPp51B!qs)1er9E#*&{0?{mIGpI6tSa?n zC&Xtl%1eQ!$o=EPX36;;a4X_=)QMocA$CL}9IgZ2L<(a*iKMw`slzOM^Xd|3m_c!U zO!{Y6WBv9+Qg8nTx!YR;EC$vfm0EvBN(z@D_m%~Sr%N;Q^)5&*maf1m~5UPVd4B)kMTOhut6;qxePj*20Cnxm1&isdKQQE~=e1FS^c zl(a-}d|9U=NF5&Hg!_<+B37J-MsTOqYO7a4e7FvH1-%APl+c+9yiWS#2$ckDcQz7O zsYH+A#H`wl3kr7^@FMDWsVFJIGwb|!b?M5R7V?l(etRR1=t{&HhNP6c2@Ug6l$1~a+zC9V zq6nRR5XWOZxKh;nJVYuBRep-pHBgjo=!oR_Z>ypRgtkbwH4PM2YF%btiSvnr2;!uKM1X5f>sm@=K@TjgT3MD8eAXRB* z17l*oTG~g4gOUm|k;J2y#PHcW0GFFdXD)iWtE7#*yl!8)yMW^U>*`((FZ-HZ7?dh^fAOJ+aO>g zQWm$8Zb$~FfC%gMxFG%Y5N+uYkTxJw`sft)pl*sb`Zm6nebU_b90000bbVXQnWMOn= zI%9HWVRU5xGB7eSEigANF*sB)F*-9bIx;vbFfckWFxxZ?;{X5vC3HntbYx+4Wjbwd xWNBu305UK#GA%GSEipJ$F)=zbF*-6hD=;uRFfgiVv|j)K002ovPDHLkV1fX+CV&6{ literal 0 HcmV?d00001 diff --git a/zajecia4/gapminder.csv b/zajecia4/gapminder.csv new file mode 100644 index 0000000..5fa5074 --- /dev/null +++ b/zajecia4/gapminder.csv @@ -0,0 +1,176 @@ +Country,female_BMI,male_BMI,gdp,population,under5mortality,life_expectancy,fertility +Afghanistan,21.07402,20.62058,1311.0,26528741.0,110.4,52.8,6.2 +Albania,25.65726,26.44657,8644.0,2968026.0,17.9,76.8,1.76 +Algeria,26.368409999999997,24.5962,12314.0,34811059.0,29.5,75.5,2.73 +Angola,23.48431,22.25083,7103.0,19842251.0,192.0,56.7,6.43 +Antigua and Barbuda,27.50545,25.76602,25736.0,85350.0,10.9,75.5,2.16 +Argentina,27.46523,27.5017,14646.0,40381860.0,15.4,75.4,2.24 +Armenia,27.1342,25.355420000000002,7383.0,2975029.0,20.0,72.3,1.4 +Australia,26.87777,27.56373,41312.0,21370348.0,5.2,81.6,1.96 +Austria,25.09414,26.467409999999997,43952.0,8331465.0,4.6,80.4,1.41 +Azerbaijan,27.50879,25.65117,14365.0,8868713.0,43.3,69.2,1.99 +Bahamas,29.13948,27.24594,24373.0,348587.0,14.5,72.2,1.89 +Bahrain,28.790940000000003,27.83721,42507.0,1115777.0,9.4,77.6,2.23 +Bangladesh,20.54531,20.39742,2265.0,148252473.0,55.9,68.3,2.38 +Barbados,29.221690000000002,26.384390000000003,16075.0,277315.0,15.4,75.3,1.83 +Belarus,26.641859999999998,26.16443,14488.0,9526453.0,7.2,70.0,1.42 +Belgium,25.1446,26.75915,41641.0,10779155.0,4.7,79.6,1.82 +Belize,29.81663,27.02255,8293.0,306165.0,20.1,70.7,2.91 +Benin,23.74026,22.41835,1646.0,8973525.0,116.3,59.7,5.27 +Bhutan,22.88243,22.8218,5663.0,694990.0,48.1,70.7,2.51 +Bolivia,26.8633,24.43335,5066.0,9599916.0,52.0,71.2,3.48 +Bosnia and Herzegovina,26.35874,26.611629999999998,9316.0,3839749.0,8.1,77.5,1.22 +Botswana,26.09156,22.129839999999998,13858.0,1967866.0,63.8,53.2,2.86 +Brazil,25.99113,25.78623,13906.0,194769696.0,18.6,73.2,1.9 +Brunei,22.892310000000002,24.18179,72351.0,380786.0,9.0,76.9,2.1 +Bulgaria,25.51574,26.542859999999997,15368.0,7513646.0,13.7,73.2,1.43 +Burkina Faso,21.63031,21.27157,1358.0,14709011.0,130.4,58.0,6.04 +Burundi,21.27927,21.50291,723.0,8821795.0,108.6,59.1,6.48 +Cambodia,21.69608,20.80496,2442.0,13933660.0,51.5,66.1,3.05 +Cameroon,24.9527,23.681729999999998,2571.0,19570418.0,113.8,56.6,5.17 +Canada,26.698290000000004,27.4521,41468.0,33363256.0,5.8,80.8,1.68 +Cape Verde,24.96136,23.515220000000003,6031.0,483824.0,28.4,70.4,2.57 +Chad,21.95424,21.485689999999998,1753.0,11139740.0,168.0,54.3,6.81 +Chile,27.92807,27.015420000000002,18698.0,16645940.0,8.9,78.5,1.89 +China,22.91041,22.92176,7880.0,1326690636.0,18.5,73.4,1.53 +Colombia,26.22529,24.94041,10489.0,44901660.0,19.7,76.2,2.43 +Comoros,22.444329999999997,22.06131,1440.0,665414.0,91.2,67.1,5.05 +"Congo, The Democratic Republic of the",21.6677,19.86692,607.0,61809278.0,124.5,57.5,6.45 +"Congo",23.10824,21.87134,5022.0,3832771.0,72.6,58.8,5.1 +Costa Rica,27.03497,26.47897,12219.0,4429506.0,10.3,79.8,1.91 +Ivory Coast,23.82088,22.56469,2854.0,19261647.0,116.9,55.4,4.91 +Croatia,25.17882,26.596290000000003,21873.0,4344151.0,5.9,76.2,1.43 +Cuba,26.576140000000002,25.06867,17765.0,11290239.0,6.3,77.6,1.5 +Cyprus,25.92587,27.41899,35828.0,1077010.0,4.2,80.0,1.49 +Denmark,25.106270000000002,26.13287,45017.0,5495302.0,4.3,78.9,1.89 +Djibouti,24.38177,23.38403,2502.0,809639.0,81.0,61.8,3.76 +Ecuador,27.062690000000003,25.58841,9244.0,14447600.0,26.8,74.7,2.73 +Egypt,30.099970000000003,26.732429999999997,9974.0,78976122.0,31.4,70.2,2.95 +El Salvador,27.84092,26.36751,7450.0,6004199.0,21.6,73.7,2.32 +Equatorial Guinea,24.528370000000002,23.7664,40143.0,686223.0,118.4,57.5,5.31 +Eritrea,21.082320000000003,20.885089999999998,1088.0,4500638.0,60.4,60.1,5.16 +Estonia,25.185979999999997,26.264459999999996,24743.0,1339941.0,5.5,74.2,1.62 +Ethiopia,20.71463,20.247,931.0,83079608.0,86.9,60.0,5.19 +Fiji,29.339409999999997,26.53078,7129.0,843206.0,24.0,64.9,2.74 +Finland,25.58418,26.733390000000004,42122.0,5314170.0,3.3,79.6,1.85 +France,24.82949,25.853289999999998,37505.0,62309529.0,4.3,81.1,1.97 +Gabon,25.95121,24.0762,15800.0,1473741.0,68.0,61.7,4.28 +Gambia,24.82101,21.65029,1566.0,1586749.0,87.4,65.7,5.8 +Georgia,26.45014,25.54942,5900.0,4343290.0,19.3,71.8,1.79 +Germany,25.73903,27.165090000000003,41199.0,80665906.0,4.4,80.0,1.37 +Ghana,24.33014,22.842470000000002,2907.0,23115919.0,79.9,62.0,4.19 +Greece,24.92026,26.33786,32197.0,11161755.0,4.9,80.2,1.46 +Grenada,27.31948,25.179879999999997,12116.0,103934.0,13.5,70.8,2.28 +Guatemala,26.84324,25.29947,6960.0,14106687.0,36.9,71.2,4.12 +Guinea,22.45206,22.52449,1230.0,10427356.0,121.0,57.1,5.34 +Guinea-Bissau,22.92809,21.64338,1326.0,1561293.0,127.6,53.6,5.25 +Guyana,26.470190000000002,23.68465,5208.0,748096.0,41.9,65.0,2.74 +Haiti,23.27785,23.66302,1600.0,9705130.0,83.3,61.0,3.5 +Honduras,26.73191,25.10872,4391.0,7259470.0,26.5,71.8,3.27 +"Hong Kong",23.71046,25.057470000000002,46635.0,6910384.0,3.06,82.49,1.04 +Hungary,25.97839,27.115679999999998,23334.0,10050699.0,7.2,73.9,1.33 +Iceland,26.02599,27.206870000000002,42294.0,310033.0,2.7,82.4,2.12 +India,21.31478,20.95956,3901.0,1197070109.0,65.6,64.7,2.64 +Indonesia,22.986929999999997,21.85576,7856.0,235360765.0,36.2,69.4,2.48 +Iran,27.236079999999998,25.310029999999998,15955.0,72530693.0,21.4,73.1,1.88 +Iraq,28.411170000000002,26.71017,11616.0,29163327.0,38.3,66.6,4.34 +Ireland,26.62176,27.65325,47713.0,4480145.0,4.5,80.1,2.0 +Israel,27.301920000000003,27.13151,28562.0,7093808.0,4.9,80.6,2.92 +Italy,24.79289,26.4802,37475.0,59319234.0,4.1,81.5,1.39 +Jamaica,27.22601,24.00421,8951.0,2717344.0,18.9,75.1,2.39 +Japan,21.87088,23.50004,34800.0,127317900.0,3.4,82.5,1.34 +Jordan,29.218009999999996,27.47362,10897.0,6010035.0,22.1,76.9,3.59 +Kazakhstan,26.65065,26.290779999999998,18797.0,15915966.0,25.9,67.1,2.51 +Kenya,23.06181,21.592579999999998,2358.0,38244442.0,71.0,60.8,4.76 +Kiribati,31.30769,29.2384,1803.0,98437.0,64.5,61.5,3.13 +Kuwait,31.161859999999997,29.172109999999996,91966.0,2705290.0,11.3,77.3,2.68 +Latvia,25.615129999999997,26.45693,20977.0,2144215.0,10.5,72.4,1.5 +Lebanon,27.70471,27.20117,14158.0,4109389.0,11.3,77.8,1.57 +Lesotho,26.780520000000003,21.90157,2041.0,1972194.0,114.2,44.5,3.34 +Liberia,23.21679,21.89537,588.0,3672782.0,100.9,59.9,5.19 +Libya,29.19874,26.54164,29853.0,6123022.0,18.8,75.6,2.64 +Lithuania,26.01424,26.86102,23223.0,3219802.0,8.2,72.1,1.42 +Luxembourg,26.09326,27.434040000000003,95001.0,485079.0,2.8,81.0,1.63 +Macao,24.895039999999998,25.713820000000002,80191.0,507274.0,6.72,79.32,0.94 +Macedonia,25.37646,26.34473,10872.0,2055266.0,11.8,74.5,1.47 +Madagascar,20.73501,21.403470000000002,1528.0,19926798.0,66.7,62.2,4.79 +Malawi,22.91455,22.034679999999998,674.0,13904671.0,101.1,52.4,5.78 +Malaysia,25.448320000000002,24.73069,19968.0,27197419.0,8.0,74.5,2.05 +Maldives,26.4132,23.219910000000002,12029.0,321026.0,16.0,78.5,2.38 +Mali,23.07655,21.78881,1602.0,14223403.0,148.3,58.5,6.82 +Malta,27.04993,27.683609999999998,27872.0,406392.0,6.6,80.7,1.38 +Mauritania,26.26476,22.62295,3356.0,3414552.0,103.0,67.9,4.94 +Mauritius,26.09824,25.15669,14615.0,1238013.0,15.8,72.9,1.58 +Mexico,28.737509999999997,27.42468,15826.0,114972821.0,17.9,75.4,2.35 +Micronesia,31.28402,28.10315,3197.0,104472.0,43.1,68.0,3.59 +Moldova,27.05617,24.2369,3890.0,4111168.0,17.6,70.4,1.49 +Mongolia,25.71375,24.88385,7563.0,2629666.0,34.8,64.8,2.37 +Montenegro,25.70186,26.55412,14183.0,619740.0,8.1,76.0,1.72 +Morocco,26.223090000000003,25.63182,6091.0,31350544.0,35.8,73.3,2.44 +Mozambique,23.317339999999998,21.93536,864.0,22994867.0,114.4,54.0,5.54 +Myanmar,22.47733,21.44932,2891.0,51030006.0,87.2,59.4,2.05 +Namibia,25.14988,22.65008,8169.0,2115703.0,62.2,59.1,3.36 +Nepal,20.72814,20.76344,1866.0,26325183.0,50.7,68.4,2.9 +Netherlands,25.47269,26.01541,47388.0,16519862.0,4.8,80.3,1.77 +New Zealand,27.36642,27.768929999999997,32122.0,4285380.0,6.4,80.3,2.12 +Nicaragua,27.57259,25.77291,4060.0,5594524.0,28.1,77.0,2.72 +Niger,21.95958,21.21958,843.0,15085130.0,141.3,58.0,7.59 +Nigeria,23.674020000000002,23.03322,4684.0,151115683.0,140.9,59.2,6.02 +Norway,25.73772,26.934240000000003,65216.0,4771633.0,3.6,80.8,1.96 +Oman,26.66535,26.241090000000003,47799.0,2652281.0,11.9,76.2,2.89 +Pakistan,23.44986,22.299139999999998,4187.0,163096985.0,95.5,64.1,3.58 +Panama,27.67758,26.26959,14033.0,3498679.0,21.0,77.3,2.61 +Papua New Guinea,25.77189,25.015060000000002,1982.0,6540267.0,69.7,58.6,4.07 +Paraguay,25.90523,25.54223,6684.0,6047131.0,25.7,74.0,3.06 +Peru,25.98511,24.770410000000002,9249.0,28642048.0,23.2,78.2,2.58 +Philippines,23.4671,22.872629999999997,5332.0,90297115.0,33.4,69.8,3.26 +Poland,25.918870000000002,26.6738,19996.0,38525752.0,6.7,75.4,1.33 +Portugal,26.183020000000003,26.68445,27747.0,10577458.0,4.1,79.4,1.36 +Puerto Rico,30.2212,28.378040000000002,35855.0,3728126.0,8.78,77.0,1.69 +Qatar,28.912509999999997,28.13138,126076.0,1388962.0,9.5,77.9,2.2 +Romania,25.22425,25.41069,18032.0,20741669.0,16.1,73.2,1.34 +Russia,27.21272,26.01131,22506.0,143123163.0,13.5,67.9,1.49 +Rwanda,22.07156,22.55453,1173.0,9750314.0,78.3,64.1,5.06 +Samoa,33.659079999999996,30.42475,5731.0,183440.0,18.8,72.3,4.43 +Sao Tome and Principe,24.88216,23.51233,2673.0,163595.0,61.0,66.0,4.41 +Saudi Arabia,29.598779999999998,27.884320000000002,44189.0,26742842.0,18.1,78.3,2.97 +Senegal,24.30968,21.927429999999998,2162.0,12229703.0,75.8,63.5,5.11 +Serbia,25.669970000000003,26.51495,12522.0,9109535.0,8.0,74.3,1.41 +Seychelles,27.973740000000003,25.56236,20065.0,91634.0,14.2,72.9,2.28 +Sierra Leone,23.93364,22.53139,1289.0,5521838.0,179.1,53.6,5.13 +Singapore,22.86642,23.83996,65991.0,4849641.0,2.8,80.6,1.28 +Slovak Republic,26.323729999999998,26.92717,24670.0,5396710.0,8.8,74.9,1.31 +Slovenia,26.582140000000003,27.43983,30816.0,2030599.0,3.7,78.7,1.43 +Solomon Islands,28.8762,27.159879999999998,1835.0,503410.0,33.1,62.3,4.36 +Somalia,22.66607,21.969170000000002,615.0,9132589.0,168.5,52.6,7.06 +South Africa,29.4803,26.85538,12263.0,50348811.0,66.1,53.4,2.54 +Spain,26.30554,27.49975,34676.0,45817016.0,5.0,81.1,1.42 +Sri Lanka,23.11717,21.96671,6907.0,19949553.0,11.7,74.0,2.32 +Sudan,23.16132,22.40484,3246.0,34470138.0,84.7,65.5,4.79 +Suriname,27.749859999999998,25.49887,13470.0,506657.0,26.4,70.2,2.41 +Swaziland,28.448859999999996,23.16969,5887.0,1153750.0,112.2,45.1,3.7 +Sweden,25.1466,26.37629,43421.0,9226333.0,3.2,81.1,1.92 +Switzerland,24.07242,26.20195,55020.0,7646542.0,4.7,82.0,1.47 +Syria,28.87418,26.919690000000003,6246.0,20097057.0,16.5,76.1,3.17 +Tajikistan,23.84799,23.77966,2001.0,7254072.0,56.2,69.6,3.7 +Tanzania,23.0843,22.47792,2030.0,42844744.0,72.4,60.4,5.54 +Thailand,24.38577,23.008029999999998,12216.0,66453255.0,15.6,73.9,1.48 +Togo,22.73858,21.87875,1219.0,6052937.0,96.4,57.5,4.88 +Tonga,34.25969,30.99563,4748.0,102816.0,17.0,70.3,4.01 +Trinidad and Tobago,28.27587,26.396690000000003,30875.0,1315372.0,24.9,71.7,1.8 +Tunisia,27.93706,25.15699,9938.0,10408091.0,19.4,76.8,2.04 +Turkey,28.247490000000003,26.703709999999997,16454.0,70344357.0,22.2,77.8,2.15 +Turkmenistan,24.66154,25.24796,8877.0,4917541.0,63.9,67.2,2.48 +Uganda,22.48126,22.35833,1437.0,31014427.0,89.3,56.0,6.34 +Ukraine,26.23317,25.42379,8762.0,46028476.0,12.9,67.8,1.38 +United Arab Emirates,29.614009999999997,28.053590000000003,73029.0,6900142.0,9.1,75.6,1.95 +United Kingdom,26.944490000000002,27.392490000000002,37739.0,61689620.0,5.6,79.7,1.87 +United States,28.343590000000003,28.456979999999998,50384.0,304473143.0,7.7,78.3,2.07 +Uruguay,26.593040000000002,26.39123,15317.0,3350832.0,13.0,76.0,2.11 +Uzbekistan,25.43432,25.32054,3733.0,26952719.0,49.2,69.6,2.46 +Vanuatu,28.458759999999998,26.78926,2944.0,225335.0,28.2,63.4,3.61 +Venezuela,28.134079999999997,27.445,17911.0,28116716.0,17.1,74.2,2.53 +Vietnam,21.065,20.9163,4085.0,86589342.0,26.2,74.1,1.86 +Palestine,29.026429999999998,26.5775,3564.0,3854667.0,24.7,74.1,4.38 +Zambia,23.05436,20.68321,3039.0,13114579.0,94.9,51.1,5.88 +Zimbabwe,24.645220000000002,22.0266,1286.0,13495462.0,98.3,47.3,3.85 diff --git a/zajecia4/logistic.png b/zajecia4/logistic.png new file mode 100644 index 0000000000000000000000000000000000000000..8a1e8607180e373aeb12744f4221e39824912350 GIT binary patch literal 28234 zcmb6B1yodT_%MnNpb}Cdf*=hFN-5nSAs_-G4jt0nFmwrmbcl3INJ|bdl%#Zbj3CX> z-RGU(|9orRweG#&`3_4Lti9j;KK;B;?H%%7NtOVQ5)T4_5Xj3(e}F(RtHJ-LIGEsy zbWQ>k{KB=D({zGB2;0&BF}|}BK7l~!Ao9|$Kf0x&=3V_rP10}o^9!Anl?O0_=;S40 z=;+?Qe}K>QsEv}pR@2q)$CEikBLZ0h_e}X#zf)Ly@BQoSOcr_RyLay}5#hHj&($GD zcB9@HYY$urGa1KYhfgq$p0&Mn)}7>0oOEe>8A!~L(2L53Fugj!h{ikF zMK(M9>x_6ZVK-M>UQi&9^B_{Xp94>V1aPF_Z>$QrHXE5{yh&IGN(+*MiGCyqpMuL` zWF`sfd~#EYr&L##>#Nc4wVU%-O@Z>A25KagWg&T}#0yU#C= zX~B8-(7&*-eE*-Ha~?|%Gqde%P5m9KUpK`IJGw}N$7N-@o-^^U8YzN^W25^x7|S2G5*Hw}CW`g0yF-vSCvZzE zEAhk1LDAFHamz=~>rDp~E$!IX`iO&=0-vXZ(u-Xb;Lsa3llok(gpilF)i^96qoS5n zWVrC&Dx4BRS132u^JPYW68X#!lTKLubYq^N-W7zX#H4{pXvBV zl8f%+AX2EbLAsEg$5}E3H`DVvc>Kp+?CotE_j7kmO-)nsSdA;6=E9$Xb%N->z4S7O z8Ms+TQIa0*nZEUJp*r-Ky zjj}6nhkx@8f5>Tg>*ee$ex92bA~%L3E5l+f&G3fFQu@(@2+GB;4^;4FUP&5AseH-) zYTy3#jm*bkMioY?2Pz$BabecXMC&8Z^}R&)$6UoPE`InbE0M;cdU{>qaQMo~ifgas zD}}=CTPPH&SLQlbtI*HERNip9z?XsK_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~y z!#ZNj3(&=^_mR-x1T`)hOMrTfgM(Gq&ta&*_E@^IveKx{dCPG-2^GP{Y~qWvrLREY zl!1u}Ht@NPMFLDFm6JJsl9ODnv>fZ{J)I3P`ODIuMv(Cmw_V_y8c3l%R{4Cojp8!d zjRt6g4%Ac?u0!i>F89(_9aj7tlwEc<{8!SzAgyl#77=Af_U(GPseFpw!SjT%Ra%I~oTtDuu<_LytdrVWTaV_;N7h}1GSx7Gm_Q0{S%?-V-E\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
female_BMImale_BMIgdppopulationunder5mortalitylife_expectancyfertility
Country
Japan21.8708823.5000434800.0127317900.03.482.51.34
\n", + "" + ], + "text/plain": [ + " female_BMI male_BMI gdp population under5mortality \\\n", + "Country \n", + "Japan 21.87088 23.50004 34800.0 127317900.0 3.4 \n", + "\n", + " life_expectancy fertility \n", + "Country \n", + "Japan 82.5 1.34 " + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df[df['life_expectancy'].max() == df['life_expectancy']]" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "175" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "len(df)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**zad. 2** Stwórz kolumnę `gdp_log`, która powstanie z kolumny `gdp` poprzez zastowanie funkcji `log` (logarytm). \n", + "\n", + "Hint 1: Wykorzystaj funkcję `apply` (https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.apply.html#pandas.Series.apply).\n", + "\n", + "Hint 2: Wykorzystaj fukcję `log` z pakietu `np`." + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "df['gdp_log'] = df['gdp'].apply(np.log)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Naszym zadaniem będzie oszacowanie długości życia (kolumna `life_expectancy`) na podstawie pozostałych zmiennych. Na samym początku, zastosujemy regresje jednowymiarową na `fertility`." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Y shape: (175,)\n", + "X shape: (175,)\n" + ] + } + ], + "source": [ + "y = df['life_expectancy'].values\n", + "X = df['fertility'].values\n", + "\n", + "print(\"Y shape:\", y.shape)\n", + "print(\"X shape:\", X.shape)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Będziemy korzystać z gotowej implementacji regreji liniowej z pakietu sklearn. Żeby móc wykorzystać, musimy napierw zmienić shape na dwuwymiarowy." + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Y shape: (175, 1)\n", + "X shape: (175, 1)\n" + ] + } + ], + "source": [ + "y = y.reshape(-1, 1)\n", + "X = X.reshape(-1, 1)\n", + "\n", + "print(\"Y shape:\", y.shape)\n", + "print(\"X shape:\", X.shape)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Jeszcze przed właściwą analizą, narysujmy wykres i zobaczny czy istnieje \"wizualny\" związek pomiędzy kolumnami." + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjMAAAGwCAYAAABcnuQpAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6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TSQVtmYTEZEsuG8TSYXJDBERyYr7NpHYFJ1meu2116DT6cw+OnXqZDp/8+ZNpKWlISwsDC1atMCECRNw5coVBSMmIiIitVG8ZqZr1664fPmy6WP//v2mc3PnzsWXX36JTz75BDk5Obh06RIefvhhBaMlIiIitVF8msnHxwdRUVFNjldUVGDjxo3YunUrhg0bBgDIzMxE586dcejQIfTr18/i9Wpra1FbW2v6vLKyUprAiYiISBUUH5nJy8tDdHQ0EhISMGnSJBQXFwMAjh49irq6OowYMcL02E6dOqF9+/Y4ePCg1eulp6cjJCTE9BETEyP510BERETKUTSZ6du3LzZt2oSdO3di/fr1OHv2LO677z7cuHEDJSUl8PPzQ8uWLc2e07p1a5SUlFi95sKFC1FRUWH6OH/+vMRfBRERESlJ0WmmMWPGmP7dvXt39O3bF7Gxsfj444/RvHlzQdf09/eHv7+/WCESERGRyik+zdRQy5YtcddddyE/Px9RUVG4desWysvLzR5z5coVizU2RERE5JlUlcxUVVWhoKAAbdq0wb333gtfX1/s2bPHdP706dMoLi5G//79FYySiIiI1ETRaab58+dj3LhxiI2NxaVLl7B48WJ4e3sjNTUVISEhmDFjBubNm4dWrVohODgYs2bNQv/+/a12MhEREZHnUTSZuXDhAlJTU3H9+nVERERg4MCBOHToECIiIgAAb731Fry8vDBhwgTU1tZi9OjReOedd5QMmYiIiFRGZzAYDEoHIaXKykqEhISgoqICwcHBSodDREREDnDm/q2qmhkiIiIiZzGZISIiIk1jMkNERESaxmSGiIiINI3JDBEREWkakxkiIiLSNCYzREREpGlMZoiIiEjTmMwQERGRpjGZISIiIk1jMkNERESaxmSGiIiINE3RXbOJyL0Ullbh3M81iAsLRHx4oNLhEJGHYDJDRC4rr7mF2VknsC+v1HRsUGIEMlKTERLgq2BkROQJOM1ERC6bnXUCB/KvmR07kH8Ns7KOKxQREXkSJjNE5JLC0irsyytFvcFgdrzeYMC+vFKcvVatUGRE5CmYzBCRS879XGPzfNF1JjNEJC0mM0TkkthWATbPx4WxEJiIpMVkhohckhD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bs3P+/v5mnwcGBsoW17hx4+Dv74/PP/8cfn5+qKurw29/+1vZXp+IXMNkhohk06VLF/j7+6O4uNhsSskRfn5+NruaXLmGj48PpkyZgszMTPj5+eGxxx5D8+bNXXotIpIPkxkikk1QUBDmz5+PuXPnQq/XY+DAgaioqMCBAwcQHByMKVOmWH1uXFwczp49ixMnTqBdu3YICgpqMppjT1xcHKqqqrBnzx706NEDAQEBCAgIAAA89dRT6Ny5MwDgwIEDwr9IIpIda2aISFbLli3DokWLkJ6ejs6dO+P+++/H119/jfj4eJvPmzBhAu6//34MHToUERERyMrKcvq1BwwYgGeeeQaPPvooIiIisHr1atO5xMREDBgwAJ06dULfvn2dvjYRKUdnMBgMSgdBRKQ0g8GAxMREPPfcc5g3b57S4RCREzjNREQer7S0FNu2bUNJSQmmTZumdDhE5CQmM0Tk8SIjIxEeHo4NGzYgNDRU6XCIyElMZojI43G2nUjbWABMREREmsZkhoiIiDSNyQwRERFpGpMZIiIi0jQmM0RERKRpTGaIiIhI05jMEBERkaYxmSEiIiJN+/9IexYQ86q5FQAAAABJRU5ErkJggg==", + "text/plain": [ + "

" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "df.plot.scatter('fertility', 'life_expectancy')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**zad. 3** Zaimportuj `LinearRegression` z pakietu `sklearn.linear_model`." + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [], + "source": [ + "from sklearn.linear_model import LinearRegression" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Tworzymy obiekt modelu regresji liniowej." + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [], + "source": [ + "model = LinearRegression()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Trening modelu ogranicza się do wywołania metodu `fit`, która przyjmuje dwa argumenty:" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
LinearRegression()
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" + ], + "text/plain": [ + "LinearRegression()" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "model.fit(X,y)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Współczynniki modelu:" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wyraz wolny (bias): [83.2025629]\n", + "Współczynniki cech: [[-4.41400624]]\n" + ] + } + ], + "source": [ + "print(\"Wyraz wolny (bias):\", model.intercept_)\n", + "print(\"Współczynniki cech:\", model.coef_)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**zad. 4** Wytrenuj nowy model `model2`, który będzie jako X przyjmie kolumnę `gdp_log`. Wyświetl parametry nowego modelu." + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Y shape: (175,)\n", + "X shape: (175,)\n", + "Y shape: (175, 1)\n", + "X shape: (175, 1)\n" + ] + } + ], + "source": [ + "y = df['gdp_log'].values\n", + "X = df['fertility'].values\n", + "\n", + "print(\"Y shape:\", y.shape)\n", + "print(\"X shape:\", X.shape)\n", + "\n", + "y = y.reshape(-1, 1)\n", + "X = X.reshape(-1, 1)\n", + "\n", + "print(\"Y shape:\", y.shape)\n", + "print(\"X shape:\", X.shape)" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjoAAAGxCAYAAABr1xxGAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGli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9v8lj79u1r8nnXrl3dHlPXrl2xd+9emM1m67E9e/YgNDQUN910k8sxE5E+cemKiGQXGhqKSZMmYc6cOWjTpg3atm2LBQsWwM/PD4IgoHPnzrjnnnvw9NNPY/369WjWrBlmzpyJoKCgJo/1ySefoHfv3hg0aBA2b96M7OxspKenuz2mZ555BqtXr8Zzzz2HZ599Frm5uViwYAFmzZoFPz8/l2MmIn3ijA4RKeLNN9/EgAED8Lvf/Q4jRoxASkoKunbtihYtWgAAMjIyEBcXh7vuugsPPvggnnrqKbRt27bJ4yxatAgfffQRevbsiY0bN2Lr1q3o1q2b2+Np164d/vd//xfZ2dm49dZbMXXqVKSlpeGVV14RPWYi0h/B3HAel4hIIVVVVWjXrh1WrVqFtLQ0UV8jCAI+++wz3H///coOzgEpYyYibeHSFREp4tChQ/jPf/6Dvn37oqKiAosXLwYAjBs3TuWROabHMRORc1y6IiLFrFy5ErfeeitGjBiBqqoq/PDDD4iMjJTlsV9//XW0bNnS7sfo0aM1OWYi8j4uXRGRLl2+fBmXL1+2ey4oKAjt2rXz8oiISIsY6BAREZFhcemKiIiIDIuBDhERERkWAx0iIiIyLAY6REREZFgMdIiIiMiwGOgQERGRYTHQISIiIsNioENERESG9f8BVa/IFf3lUvYAAAAASUVORK5CYII=", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "df.plot.scatter('gdp_log', 'life_expectancy')" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/html": [ + "
LinearRegression()
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" + ], + "text/plain": [ + "LinearRegression()" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "model2 = LinearRegression()\n", + "model2.fit(X, y)" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wyraz wolny (bias): [10.97412729]\n", + "Współczynniki cech: [[-0.63200209]]\n" + ] + } + ], + "source": [ + "print(\"Wyraz wolny (bias):\", model2.intercept_)\n", + "print(\"Współczynniki cech:\", model2.coef_)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Mając wytrenowany model możemy wykorzystać go do predykcji. Wystarczy wywołać metodę `predict`." + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "input: 6.2\t predicted: 55.83572421482946\t expected: 7.1785454837637\n", + "input: 1.76\t predicted: 75.43391191760766\t expected: 9.064620717626777\n", + "input: 2.73\t predicted: 71.15232586542413\t expected: 9.418492105471156\n", + "input: 6.43\t predicted: 54.82050277977564\t expected: 8.86827250899781\n", + "input: 2.16\t predicted: 73.66830942186188\t expected: 10.155646068918863\n" + ] + } + ], + "source": [ + "X_test = X[:5,:]\n", + "y_test = y[:5,:]\n", + "output = model.predict(X_test)\n", + "\n", + "for i in range(5):\n", + " print(\"input: {}\\t predicted: {}\\t expected: {}\".format(X_test[i,0], output[i,0], y_test[i,0]))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Sprawdzenie jakości modelu - metryki: $MSE$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Istnieją 3 metryki, które określają jak dobry jest nasz model:\n", + " * $MSE$: [błąd średnio-kwadratowy](https://pl.wikipedia.org/wiki/B%C5%82%C4%85d_%C5%9Bredniokwadratowy) \n", + " * $RMSE = \\sqrt{MSE}$" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Root Mean Squared Error: 61.20258121223673\n" + ] + } + ], + "source": [ + "from sklearn.metrics import mean_squared_error\n", + "\n", + "rmse = np.sqrt(mean_squared_error(y, model.predict(X)))\n", + "print(\"Root Mean Squared Error: {}\".format(rmse))" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Root Mean Squared Error: 0.8330994741525843\n" + ] + } + ], + "source": [ + "# Import necessary modules\n", + "from sklearn.linear_model import LinearRegression\n", + "from sklearn.metrics import mean_squared_error\n", + "from sklearn.model_selection import train_test_split\n", + "\n", + "# Create training and test sets\n", + "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.30, random_state=42)\n", + "\n", + "# Create the regressor: reg_all\n", + "reg_all = LinearRegression()\n", + "\n", + "# Fit the regressor to the training data\n", + "reg_all.fit(X_train, y_train)\n", + "\n", + "# Predict on the test data: y_pred\n", + "y_pred = reg_all.predict(X_test)\n", + "\n", + "# Compute and print RMSE\n", + "rmse = np.sqrt(mean_squared_error(y_test, y_pred))\n", + "print(\"Root Mean Squared Error: {}\".format(rmse))\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Regresja wielu zmiennych" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Model regresji liniowej wielu zmiennych nie różni się istotnie od modelu jednej zmiennej. Np. chcąc zbudować model oparty o dwie kolumny: `fertility` i `gdp` wystarczy zmienić X (cechy wejściowe):" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(175, 2)\n", + "Wyraz wolny (bias): [9.47431285]\n", + "Współczynniki cech: [[-3.58540438e-01 4.05443491e-05]]\n", + "Root Mean Squared Error: 0.5039206253337853\n" + ] + } + ], + "source": [ + "X = df[['fertility', 'gdp']]\n", + "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.30, random_state=42)\n", + "\n", + "print(X.shape)\n", + "\n", + "model_mv = LinearRegression()\n", + "model_mv.fit(X_train, y_train)\n", + "\n", + "print(\"Wyraz wolny (bias):\", model_mv.intercept_)\n", + "print(\"Współczynniki cech:\", model_mv.coef_)\n", + "\n", + "y_pred = model_mv.predict(X_test)\n", + "\n", + "rmse = np.sqrt(mean_squared_error(y_test, y_pred))\n", + "print(\"Root Mean Squared Error: {}\".format(rmse))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**zad. 6** \n", + " * Zbuduj model regresji liniowej, która oszacuje wartność kolumny `life_expectancy` na podstawie pozostałych kolumn.\n", + "* Wyświetl współczynniki modelu.\n", + "* Oblicz wartości metryki rmse na zbiorze trenującym.\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Index(['female_BMI', 'male_BMI', 'gdp', 'population', 'under5mortality',\n", + " 'life_expectancy', 'fertility', 'gdp_log'],\n", + " dtype='object')" + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.columns" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(175, 7)\n", + "Wyraz wolny (bias): [-2.48689958e-14]\n", + "Współczynniki cech: [[-4.53155263e-16 4.57243814e-16 5.81045637e-19 3.74348839e-26\n", + " 4.40441174e-16 -1.32227302e-16 1.00000000e+00]]\n", + "Root Mean Squared Error: 1.854651242181147e-14\n" + ] + } + ], + "source": [ + "X = df[['female_BMI', 'male_BMI', 'gdp', 'population', 'under5mortality', 'fertility', 'gdp_log']]\n", + "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.30, random_state=42)\n", + "\n", + "print(X.shape)\n", + "\n", + "model_mv = LinearRegression()\n", + "model_mv.fit(X_train, y_train)\n", + "\n", + "print(\"Wyraz wolny (bias):\", model_mv.intercept_)\n", + "print(\"Współczynniki cech:\", model_mv.coef_)\n", + "\n", + "y_pred = model_mv.predict(X_test)\n", + "\n", + "rmse = np.sqrt(mean_squared_error(y_test, y_pred))\n", + "print(\"Root Mean Squared Error: {}\".format(rmse))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**zad. 7**\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + " Zaimplementuj metrykę $RMSE$ jako fukcję rmse (szablon poniżej). Fukcja rmse przyjmuje dwa parametry typu list i ma zwrócić wartość metryki $RMSE$ ." + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "5.234841906276239\n", + "5.234841906276239\n" + ] + } + ], + "source": [ + "def rmse(expected, predicted):\n", + " \"\"\"\n", + " argumenty:\n", + " expected (type: list): poprawne wartości\n", + " predicted (type: list): oszacowanie z modelu\n", + " \"\"\"\n", + " return np.sqrt(sum([(e-p)**2 for e,p in zip(expected,predicted)])/len(expected))\n", + " \n", + "\n", + "y = df['life_expectancy'].values\n", + "X = df[['fertility', 'gdp']].values\n", + "\n", + "test_model = LinearRegression()\n", + "test_model.fit(X, y)\n", + "\n", + "predicted = list(test_model.predict(X))\n", + "expected = list(y)\n", + "\n", + "print(rmse(predicted,expected))\n", + "print(np.sqrt(mean_squared_error(predicted, expected)))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "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.11.7" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/zajecia4/sklearn cz. 1.ipynb b/zajecia4/sklearn cz. 1.ipynb new file mode 100644 index 0000000..c8bbf32 --- /dev/null +++ b/zajecia4/sklearn cz. 1.ipynb @@ -0,0 +1,430 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Kkolejna część zajęć będzie wprowadzeniem do szeroko używanej biblioteki w Pythonie: `sklearn`. Zajęcia będą miały charaktere case-study poprzeplatane zadaniami do wykonania. Zacznijmy od załadowania odpowiednich bibliotek." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "# ! pip install matplotlib" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import pandas as pd\n", + "import matplotlib.pyplot as plt\n", + "\n", + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Zacznijmy od załadowania danych. Na dzisiejszych zajęciach będziemy korzystać z danych z portalu [gapminder.org](https://www.gapminder.org/data/)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "df = pd.read_csv('gapminder.csv', index_col=0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Dane zawierają różne informacje z większość państw świata (z roku 2008). Poniżej znajduje się opis kolumn:\n", + " * female_BMI - średnie BMI u kobiet\n", + " * male_BMI - średnie BMI u mężczyzn\n", + " * gdp - PKB na obywatela\n", + " * population - wielkość populacji\n", + " * under5mortality - wskaźnik śmiertelności dzieni pon. 5 roku życia (na 1000 urodzonych dzieci)\n", + " * life_expectancy - średnia długość życia\n", + " * fertility - wskaźnik dzietności" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**zad. 1**\n", + "Na podstawie danych zawartych w `df` odpowiedz na następujące pytania:\n", + " * Jaki był współczynniki dzietności w Polsce w 2018?\n", + " * W którym kraju ludzie żyją najdłużej?\n", + " * Z ilu krajów zostały zebrane dane?" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**zad. 2** Stwórz kolumnę `gdp_log`, która powstanie z kolumny `gdp` poprzez zastowanie funkcji `log` (logarytm). \n", + "\n", + "Hint 1: Wykorzystaj funkcję `apply` (https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.apply.html#pandas.Series.apply).\n", + "\n", + "Hint 2: Wykorzystaj fukcję `log` z pakietu `np`." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Naszym zadaniem będzie oszacowanie długości życia (kolumna `life_expectancy`) na podstawie pozostałych zmiennych. Na samym początku, zastosujemy regresje jednowymiarową na `fertility`." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "y = df['life_expectancy'].values\n", + "X = df['fertility'].values\n", + "\n", + "print(\"Y shape:\", y.shape)\n", + "print(\"X shape:\", X.shape)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Będziemy korzystać z gotowej implementacji regreji liniowej z pakietu sklearn. Żeby móc wykorzystać, musimy napierw zmienić shape na dwuwymiarowy." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "y = y.reshape(-1, 1)\n", + "X = X.reshape(-1, 1)\n", + "\n", + "print(\"Y shape:\", y.shape)\n", + "print(\"X shape:\", X.shape)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Jeszcze przed właściwą analizą, narysujmy wykres i zobaczny czy istnieje \"wizualny\" związek pomiędzy kolumnami." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "df.plot.scatter('fertility', 'life_expectancy')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**zad. 3** Zaimportuj `LinearRegression` z pakietu `sklearn.linear_model`." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Tworzymy obiekt modelu regresji liniowej." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "model = LinearRegression()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Trening modelu ogranicza się do wywołania metodu `fit`, która przyjmuje dwa argumenty:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "model.fit(X, y)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Współczynniki modelu:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print(\"Wyraz wolny (bias):\", model.intercept_)\n", + "print(\"Współczynniki cech:\", model.coef_)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**zad. 4** Wytrenuj nowy model `model2`, który będzie jako X przyjmie kolumnę `gdp_log`. Wyświetl parametry nowego modelu." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Mając wytrenowany model możemy wykorzystać go do predykcji. Wystarczy wywołać metodę `predict`." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "X_test = X[:5,:]\n", + "y_test = y[:5,:]\n", + "output = model.predict(X_test)\n", + "\n", + "for i in range(5):\n", + " print(\"input: {}\\t predicted: {}\\t expected: {}\".format(X_test[i,0], output[i,0], y_test[i,0]))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Sprawdzenie jakości modelu - metryki: $MSE$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Istnieją 3 metryki, które określają jak dobry jest nasz model:\n", + " * $MSE$: [błąd średnio-kwadratowy](https://pl.wikipedia.org/wiki/B%C5%82%C4%85d_%C5%9Bredniokwadratowy) \n", + " * $RMSE = \\sqrt{MSE}$" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from sklearn.metrics import mean_squared_error\n", + "\n", + "rmse = np.sqrt(mean_squared_error(y, model.predict(X)))\n", + "print(\"Root Mean Squared Error: {}\".format(rmse))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Import necessary modules\n", + "from sklearn.linear_model import LinearRegression\n", + "from sklearn.metrics import mean_squared_error\n", + "from sklearn.model_selection import train_test_split\n", + "\n", + "# Create training and test sets\n", + "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.30, random_state=42)\n", + "\n", + "# Create the regressor: reg_all\n", + "reg_all = LinearRegression()\n", + "\n", + "# Fit the regressor to the training data\n", + "reg_all.fit(X_train, y_train)\n", + "\n", + "# Predict on the test data: y_pred\n", + "y_pred = reg_all.predict(X_test)\n", + "\n", + "# Compute and print R^2 and RMSE\n", + "print(\"R^2: {}\".format(reg_all.score(X_test, y_test)))\n", + "rmse = np.sqrt(mean_squared_error(y_test, y_pred))\n", + "print(\"Root Mean Squared Error: {}\".format(rmse))\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Regresja wielu zmiennych" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Model regresji liniowej wielu zmiennych nie różni się istotnie od modelu jednej zmiennej. Np. chcąc zbudować model oparty o dwie kolumny: `fertility` i `gdp` wystarczy zmienić X (cechy wejściowe):" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "X = df[['fertility', 'gdp']]\n", + "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.30, random_state=42)\n", + "\n", + "print(X.shape)\n", + "\n", + "model_mv = LinearRegression()\n", + "model_mv.fit(X_train, y_train)\n", + "\n", + "print(\"Wyraz wolny (bias):\", model_mv.intercept_)\n", + "print(\"Współczynniki cech:\", model_mv.coef_)\n", + "\n", + "y_pred = model_mv.predict(X_test)\n", + "\n", + "rmse = np.sqrt(mean_squared_error(y_test, y_pred))\n", + "print(\"Root Mean Squared Error: {}\".format(rmse))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**zad. 6** \n", + " * Zbuduj model regresji liniowej, która oszacuje wartność kolumny `life_expectancy` na podstawie pozostałych kolumn.\n", + " * Wyświetl współczynniki modelu.\n", + " * Oblicz wartości metryki rmse na zbiorze trenującym.\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**zad. 7**\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + " Zaimplementuj metrykę $RMSE$ jako fukcję rmse (szablon poniżej). Fukcja rmse przyjmuje dwa parametry typu list i ma zwrócić wartość metryki $RMSE$ ." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def rmse(expected, predicted):\n", + " \"\"\"\n", + " argumenty:\n", + " expected (type: list): poprawne wartości\n", + " predicted (type: list): oszacowanie z modelu\n", + " \"\"\"\n", + " pass\n", + " \n", + "\n", + "y = df['life_expectancy'].values\n", + "X = df[['fertility', 'gdp']].values\n", + "\n", + "test_model = LinearRegression()\n", + "test_model.fit(X, y)\n", + "\n", + "predicted = list(test_model.predict(X))\n", + "expected = list(y)\n", + "\n", + "print(rmse(predicted,expected))\n", + "print(np.sqrt(mean_squared_error(predicted, expected)))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "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.11.7" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +}