From f5a3c13824aecc22b3d7ce53f62fb88f6ddc419f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sk=C3=B3rzewski?= Date: Thu, 3 Nov 2022 15:43:18 +0100 Subject: [PATCH] =?UTF-8?q?Zmiana=20numaracji=20materia=C5=82=C3=B3w=20do?= =?UTF-8?q?=20laboratori=C3=B3w?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ch.ipynb => 04_Reprezentacja_danych.ipynb} | 135 ++++++++++++++---- 1 file changed, 111 insertions(+), 24 deletions(-) rename lab/{03_Reprezentacja_danych.ipynb => 04_Reprezentacja_danych.ipynb} (77%) diff --git a/lab/03_Reprezentacja_danych.ipynb b/lab/04_Reprezentacja_danych.ipynb similarity index 77% rename from lab/03_Reprezentacja_danych.ipynb rename to lab/04_Reprezentacja_danych.ipynb index 968e8f5..9eef67d 100644 --- a/lab/03_Reprezentacja_danych.ipynb +++ b/lab/04_Reprezentacja_danych.ipynb @@ -9,7 +9,7 @@ }, "source": [ "### Uczenie maszynowe — laboratoria\n", - "# 3. Reprezentacja danych" + "# 4. Reprezentacja danych" ] }, { @@ -28,7 +28,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -129,7 +129,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -176,7 +176,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -219,7 +219,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -244,7 +244,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -294,7 +294,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 20, "metadata": {}, "outputs": [ { @@ -355,7 +355,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 21, "metadata": {}, "outputs": [ { @@ -391,7 +391,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 22, "metadata": {}, "outputs": [ { @@ -421,7 +421,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 23, "metadata": {}, "outputs": [ { @@ -469,7 +469,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 24, "metadata": {}, "outputs": [ { @@ -490,7 +490,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 25, "metadata": {}, "outputs": [ { @@ -518,7 +518,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 26, "metadata": {}, "outputs": [], "source": [ @@ -530,7 +530,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 27, "metadata": {}, "outputs": [ { @@ -598,18 +598,105 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 28, "metadata": {}, "outputs": [ { - "ename": "NameError", - "evalue": "name 'pandas' is not defined", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn [14], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m alldata_2 \u001b[39m=\u001b[39m pandas\u001b[39m.\u001b[39mget_dummies(alldata_2, columns\u001b[39m=\u001b[39m[\u001b[39m\"\u001b[39m\u001b[39mTyp zabudowy\u001b[39m\u001b[39m\"\u001b[39m, \u001b[39m\"\u001b[39m\u001b[39mMateriał budynku\u001b[39m\u001b[39m\"\u001b[39m])\n\u001b[1;32m 3\u001b[0m \u001b[39mprint\u001b[39m(alldata_2)\n", - "\u001b[0;31mNameError\u001b[0m: name 'pandas' is not defined" + "name": "stdout", + "output_type": "stream", + "text": [ + " cena Powierzchnia w m2 Liczba pokoi Garaż Liczba pięter w budynku \\\n", + "0 290386 46 2 0 5.0 \n", + "1 450000 59 2 0 3.0 \n", + "2 375000 79 3 0 16.0 \n", + "3 400000 63 3 1 2.0 \n", + "13 450000 64 3 0 4.0 \n", + "... ... ... ... ... ... \n", + "4909 141300 46 2 0 1.0 \n", + "4917 710000 120 4 1 1.0 \n", + "4918 858000 120 5 0 3.0 \n", + "4920 399000 69 3 0 2.0 \n", + "4937 127900 36 2 0 2.0 \n", + "\n", + " Piętro Rok budowy opis \\\n", + "0 0.0 2017.0 Polecam mieszkanie 2 pokojowe o metrażu 46,68 ... \n", + "1 2.0 1902.0 Ekskluzywna oferta - tylko u nas! Projekt arch... \n", + "2 5.0 1990.0 Polecam do kupna przestronne mieszkanie trzypo... \n", + "3 2.0 2009.0 Dla rodziny albo pod wynajem. Świetna lokaliza... \n", + "13 2.0 1992.0 Witam,Mam na imię Jędrzej i w biurze Platan po... \n", + "... ... ... ... \n", + "4909 0.0 2014.0 !!! Apartamenty w Lusówku oddawane w stanie de... \n", + "4917 0.0 2013.0 Sprzedam lokal mieszkalny odrębna własność w b... \n", + "4918 3.0 1993.0 Polecam do kupna mieszkanie 5 pokojowe o pow. ... \n", + "4920 1.0 2008.0 Przestronne mieszkanie z pięknym widokiem!Dwup... \n", + "4937 2.0 2018.0 Sprzedaż nowego mieszkania w FAŁKOWIE - Osiedl... \n", + "\n", + " Typ zabudowy_apartamentowiec Typ zabudowy_blok \\\n", + "0 1 0 \n", + "1 0 0 \n", + "2 0 1 \n", + "3 0 1 \n", + "13 0 1 \n", + "... ... ... \n", + "4909 1 0 \n", + "4917 0 0 \n", + "4918 0 1 \n", + "4920 0 0 \n", + "4937 0 0 \n", + "\n", + " Typ zabudowy_dom wielorodzinny/szeregowiec Typ zabudowy_kamienica \\\n", + "0 0 0 \n", + "1 0 1 \n", + "2 0 0 \n", + "3 0 0 \n", + "13 0 0 \n", + "... ... ... \n", + "4909 0 0 \n", + "4917 1 0 \n", + "4918 0 0 \n", + "4920 1 0 \n", + "4937 1 0 \n", + "\n", + " Typ zabudowy_plomba Materiał budynku_beton Materiał budynku_cegła \\\n", + "0 0 0 1 \n", + "1 0 0 1 \n", + "2 0 0 0 \n", + "3 0 0 1 \n", + "13 0 0 1 \n", + "... ... ... ... \n", + "4909 0 0 1 \n", + "4917 0 0 1 \n", + "4918 0 0 1 \n", + "4920 0 0 1 \n", + "4937 0 0 1 \n", + "\n", + " Materiał budynku_inne Materiał budynku_pustak Materiał budynku_płyta \\\n", + "0 0 0 0 \n", + "1 0 0 0 \n", + "2 0 0 1 \n", + "3 0 0 0 \n", + "13 0 0 0 \n", + "... ... ... ... \n", + "4909 0 0 0 \n", + "4917 0 0 0 \n", + "4918 0 0 0 \n", + "4920 0 0 0 \n", + "4937 0 0 0 \n", + "\n", + " Materiał budynku_silikat \n", + "0 0 \n", + "1 0 \n", + "2 0 \n", + "3 0 \n", + "13 0 \n", + "... ... \n", + "4909 0 \n", + "4917 0 \n", + "4918 0 \n", + "4920 0 \n", + "4937 0 \n", + "\n", + "[888 rows x 19 columns]\n" ] } ], @@ -665,7 +752,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 29, "metadata": {}, "outputs": [ {