{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import seaborn as sns\n", "from sklearn.model_selection import train_test_split\n", "from collections import Counter" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "df_seoul = pd.read_feather(\"../data/data_for_modeling/df_seoul.feather\")\n", "df_busan = pd.read_feather(\"../data/data_for_modeling/df_busan.feather\")\n", "df_incheon = pd.read_feather(\"../data/data_for_modeling/df_incheon.feather\")\n", "df_daegu = pd.read_feather(\"../data/data_for_modeling/df_daegu.feather\")\n", "df_daejeon = pd.read_feather(\"../data/data_for_modeling/df_daejeon.feather\")\n", "df_gwangju = pd.read_feather(\"../data/data_for_modeling/df_gwangju.feather\")" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Counter({2: 48534, 1: 3941, 0: 109})" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Counter(df_seoul['multi_class'])" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Counter({2: 50069, 1: 2350, 0: 165})" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Counter(df_busan['multi_class'])" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Counter({2: 44944, 1: 6658, 0: 982})" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Counter(df_incheon['multi_class'])" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Counter({2: 50919, 1: 1610, 0: 55})" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Counter(df_daegu['multi_class'])" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Counter({2: 48047, 1: 4227, 0: 310})" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Counter(df_daejeon['multi_class'])" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Counter({2: 48405, 1: 4015, 0: 164})" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Counter(df_gwangju['multi_class'])" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(52584, 30)" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_seoul.shape" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "df_seoul = df_seoul.loc[df_seoul['year'].isin([2018, 2019, 2020, 2021]),:].copy()\n", "df_busan = df_busan.loc[df_busan['year'].isin([2018, 2019, 2020, 2021]),:].copy()\n", "df_incheon = df_incheon.loc[df_incheon['year'].isin([2018, 2019, 2020, 2021]),:].copy()\n", "df_daegu = df_daegu.loc[df_daegu['year'].isin([2018, 2019, 2020, 2021]),:].copy()\n", "df_daejeon = df_daejeon.loc[df_daejeon['year'].isin([2018, 2019, 2020, 2021]),:].copy()\n", "df_gwangju = df_gwangju.loc[df_gwangju['year'].isin([2018, 2019, 2020, 2021]),:].copy()" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "cols = [col for col in df_seoul.columns if col != \"multi_class\"] + [\"multi_class\"]" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [], "source": [ "df_seoul = df_seoul[cols]\n", "df_busan = df_busan[cols]\n", "df_incheon = df_incheon[cols]\n", "df_daegu = df_daegu[cols]\n", "df_daejeon = df_daejeon[cols]\n", "df_gwangju = df_gwangju[cols]" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [], "source": [ "df_seoul_train = df_seoul.loc[df_seoul['year'].isin([2018, 2019, 2020]),:].copy()\n", "df_seoul_test = df_seoul.loc[df_seoul['year'].isin([2021]),:].copy()\n", "\n", "df_busan_train = df_busan.loc[df_busan['year'].isin([2018, 2019, 2020]),:].copy()\n", "df_busan_test = df_busan.loc[df_busan['year'].isin([2021]),:].copy()\n", "\n", "df_incheon_train = df_incheon.loc[df_incheon['year'].isin([2018, 2019, 2020]),:].copy()\n", "df_incheon_test = df_incheon.loc[df_incheon['year'].isin([2021]),:].copy()\n", "\n", "df_daegu_train = df_daegu.loc[df_daegu['year'].isin([2018, 2019, 2020]),:].copy()\n", "df_daegu_test = df_daegu.loc[df_daegu['year'].isin([2021]),:].copy()\n", "\n", "df_daejeon_train = df_daejeon.loc[df_daejeon['year'].isin([2018, 2019, 2020]),:].copy()\n", "df_daejeon_test = df_daejeon.loc[df_daejeon['year'].isin([2021]),:].copy()\n", "\n", "df_gwangju_train = df_gwangju.loc[df_gwangju['year'].isin([2018, 2019, 2020]),:].copy()\n", "df_gwangju_test = df_gwangju.loc[df_gwangju['year'].isin([2021]),:].copy()" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
temp_Cprecip_mmwind_speedwind_dirhmvap_pressuredewpoint_Cloc_pressuresea_pressuresolarRad...yearmonthhourground_temp - temp_Chour_sinhour_cosmonth_sinmonth_cosvisimulti_class
01.20.01.636035.02.3-12.61015.81024.60.00...201810-5.40.0000001.000000e+000.50.8660252000.02
10.50.01.336033.02.1-13.91015.51024.30.00...201811-5.40.2588199.659258e-010.50.8660252000.02
20.10.01.52034.02.1-13.91015.71024.50.00...201812-5.40.5000008.660254e-010.50.8660252000.02
30.00.02.132037.02.3-12.91015.91024.70.00...201813-5.00.7071077.071068e-010.50.8660252000.02
4-0.10.02.334042.02.5-11.51016.01024.90.00...201814-4.30.8660255.000000e-010.50.8660252000.02
5-0.10.02.85043.02.6-11.21016.01024.90.00...201815-4.00.9659262.588190e-010.50.8660252000.02
6-0.50.02.12045.02.6-11.01016.51025.40.00...201816-4.11.0000006.123234e-170.50.8660252000.02
7-0.80.02.534045.02.6-11.21017.11026.00.00...201817-4.50.965926-2.588190e-010.50.8660252000.02
8-0.50.01.236043.02.5-11.51017.41026.30.03...201818-4.00.866025-5.000000e-010.50.8660252000.02
91.70.02.12039.02.7-10.81018.11026.90.46...2018192.80.707107-7.071068e-010.50.8660251953.02
\n", "

10 rows × 30 columns

\n", "
" ], "text/plain": [ " temp_C precip_mm wind_speed wind_dir hm vap_pressure dewpoint_C \\\n", "0 1.2 0.0 1.6 360 35.0 2.3 -12.6 \n", "1 0.5 0.0 1.3 360 33.0 2.1 -13.9 \n", "2 0.1 0.0 1.5 20 34.0 2.1 -13.9 \n", "3 0.0 0.0 2.1 320 37.0 2.3 -12.9 \n", "4 -0.1 0.0 2.3 340 42.0 2.5 -11.5 \n", "5 -0.1 0.0 2.8 50 43.0 2.6 -11.2 \n", "6 -0.5 0.0 2.1 20 45.0 2.6 -11.0 \n", "7 -0.8 0.0 2.5 340 45.0 2.6 -11.2 \n", "8 -0.5 0.0 1.2 360 43.0 2.5 -11.5 \n", "9 1.7 0.0 2.1 20 39.0 2.7 -10.8 \n", "\n", " loc_pressure sea_pressure solarRad ... year month hour \\\n", "0 1015.8 1024.6 0.00 ... 2018 1 0 \n", "1 1015.5 1024.3 0.00 ... 2018 1 1 \n", "2 1015.7 1024.5 0.00 ... 2018 1 2 \n", "3 1015.9 1024.7 0.00 ... 2018 1 3 \n", "4 1016.0 1024.9 0.00 ... 2018 1 4 \n", "5 1016.0 1024.9 0.00 ... 2018 1 5 \n", "6 1016.5 1025.4 0.00 ... 2018 1 6 \n", "7 1017.1 1026.0 0.00 ... 2018 1 7 \n", "8 1017.4 1026.3 0.03 ... 2018 1 8 \n", "9 1018.1 1026.9 0.46 ... 2018 1 9 \n", "\n", " ground_temp - temp_C hour_sin hour_cos month_sin month_cos visi \\\n", "0 -5.4 0.000000 1.000000e+00 0.5 0.866025 2000.0 \n", "1 -5.4 0.258819 9.659258e-01 0.5 0.866025 2000.0 \n", "2 -5.4 0.500000 8.660254e-01 0.5 0.866025 2000.0 \n", "3 -5.0 0.707107 7.071068e-01 0.5 0.866025 2000.0 \n", "4 -4.3 0.866025 5.000000e-01 0.5 0.866025 2000.0 \n", "5 -4.0 0.965926 2.588190e-01 0.5 0.866025 2000.0 \n", "6 -4.1 1.000000 6.123234e-17 0.5 0.866025 2000.0 \n", "7 -4.5 0.965926 -2.588190e-01 0.5 0.866025 2000.0 \n", "8 -4.0 0.866025 -5.000000e-01 0.5 0.866025 2000.0 \n", "9 2.8 0.707107 -7.071068e-01 0.5 0.866025 1953.0 \n", "\n", " multi_class \n", "0 2 \n", "1 2 \n", "2 2 \n", "3 2 \n", "4 2 \n", "5 2 \n", "6 2 \n", "7 2 \n", "8 2 \n", "9 2 \n", "\n", "[10 rows x 30 columns]" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_busan_train.head(10)" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
temp_Cprecip_mmwind_speedwind_dirhmvap_pressuredewpoint_Cloc_pressuresea_pressuresolarRad...yearmonthhourground_temp - temp_Chour_sinhour_cosmonth_sinmonth_cosvisimulti_class
262940.10.06.327037.02.3-12.91013.31022.12.07...202012145.8-0.500000-8.660254e-01-2.449294e-161.05000.02
262951.20.05.927035.02.3-12.61013.21022.01.71...202012155.6-0.707107-7.071068e-01-2.449294e-161.05000.02
262961.60.03.629034.02.3-12.61012.81021.61.14...202012161.4-0.866025-5.000000e-01-2.449294e-161.05000.02
262971.20.03.825038.02.5-11.51012.81021.60.48...20201217-0.4-0.965926-2.588190e-01-2.449294e-161.05000.02
262980.90.03.827040.02.6-11.21013.11021.90.02...20201218-0.8-1.000000-1.836970e-16-2.449294e-161.05000.02
262990.60.06.227041.02.6-11.11014.01022.80.00...20201219-1.1-0.9659262.588190e-01-2.449294e-161.05000.02
263000.10.06.027044.02.7-10.71014.81023.60.00...20201220-0.9-0.8660255.000000e-01-2.449294e-161.05000.02
26301-0.20.05.029048.02.9-9.91014.61023.40.00...20201221-0.8-0.7071077.071068e-01-2.449294e-161.05000.02
26302-0.70.02.727051.03.0-9.61014.81023.60.00...20201222-0.6-0.5000008.660254e-01-2.449294e-161.05000.02
26303-0.70.03.825055.03.2-8.61015.11024.00.00...20201223-0.6-0.2588199.659258e-01-2.449294e-161.05000.02
\n", "

10 rows × 30 columns

\n", "
" ], "text/plain": [ " temp_C precip_mm wind_speed wind_dir hm vap_pressure dewpoint_C \\\n", "26294 0.1 0.0 6.3 270 37.0 2.3 -12.9 \n", "26295 1.2 0.0 5.9 270 35.0 2.3 -12.6 \n", "26296 1.6 0.0 3.6 290 34.0 2.3 -12.6 \n", "26297 1.2 0.0 3.8 250 38.0 2.5 -11.5 \n", "26298 0.9 0.0 3.8 270 40.0 2.6 -11.2 \n", "26299 0.6 0.0 6.2 270 41.0 2.6 -11.1 \n", "26300 0.1 0.0 6.0 270 44.0 2.7 -10.7 \n", "26301 -0.2 0.0 5.0 290 48.0 2.9 -9.9 \n", "26302 -0.7 0.0 2.7 270 51.0 3.0 -9.6 \n", "26303 -0.7 0.0 3.8 250 55.0 3.2 -8.6 \n", "\n", " loc_pressure sea_pressure solarRad ... year month hour \\\n", "26294 1013.3 1022.1 2.07 ... 2020 12 14 \n", "26295 1013.2 1022.0 1.71 ... 2020 12 15 \n", "26296 1012.8 1021.6 1.14 ... 2020 12 16 \n", "26297 1012.8 1021.6 0.48 ... 2020 12 17 \n", "26298 1013.1 1021.9 0.02 ... 2020 12 18 \n", "26299 1014.0 1022.8 0.00 ... 2020 12 19 \n", "26300 1014.8 1023.6 0.00 ... 2020 12 20 \n", "26301 1014.6 1023.4 0.00 ... 2020 12 21 \n", "26302 1014.8 1023.6 0.00 ... 2020 12 22 \n", "26303 1015.1 1024.0 0.00 ... 2020 12 23 \n", "\n", " ground_temp - temp_C hour_sin hour_cos month_sin month_cos \\\n", "26294 5.8 -0.500000 -8.660254e-01 -2.449294e-16 1.0 \n", "26295 5.6 -0.707107 -7.071068e-01 -2.449294e-16 1.0 \n", "26296 1.4 -0.866025 -5.000000e-01 -2.449294e-16 1.0 \n", "26297 -0.4 -0.965926 -2.588190e-01 -2.449294e-16 1.0 \n", "26298 -0.8 -1.000000 -1.836970e-16 -2.449294e-16 1.0 \n", "26299 -1.1 -0.965926 2.588190e-01 -2.449294e-16 1.0 \n", "26300 -0.9 -0.866025 5.000000e-01 -2.449294e-16 1.0 \n", "26301 -0.8 -0.707107 7.071068e-01 -2.449294e-16 1.0 \n", "26302 -0.6 -0.500000 8.660254e-01 -2.449294e-16 1.0 \n", "26303 -0.6 -0.258819 9.659258e-01 -2.449294e-16 1.0 \n", "\n", " visi multi_class \n", "26294 5000.0 2 \n", "26295 5000.0 2 \n", "26296 5000.0 2 \n", "26297 5000.0 2 \n", "26298 5000.0 2 \n", "26299 5000.0 2 \n", "26300 5000.0 2 \n", "26301 5000.0 2 \n", "26302 5000.0 2 \n", "26303 5000.0 2 \n", "\n", "[10 rows x 30 columns]" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_busan_train.tail(10)" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "Index: 26304 entries, 0 to 26303\n", "Data columns (total 30 columns):\n", " # Column Non-Null Count Dtype \n", "--- ------ -------------- ----- \n", " 0 temp_C 26304 non-null float64 \n", " 1 precip_mm 26304 non-null float64 \n", " 2 wind_speed 26304 non-null float64 \n", " 3 wind_dir 26304 non-null category\n", " 4 hm 26304 non-null float64 \n", " 5 vap_pressure 26304 non-null float64 \n", " 6 dewpoint_C 26304 non-null float64 \n", " 7 loc_pressure 26304 non-null float64 \n", " 8 sea_pressure 26304 non-null float64 \n", " 9 solarRad 26304 non-null float64 \n", " 10 snow_cm 26304 non-null float64 \n", " 11 cloudcover 26304 non-null category\n", " 12 lm_cloudcover 26304 non-null category\n", " 13 low_cloudbase 26304 non-null float64 \n", " 14 groundtemp 26304 non-null float64 \n", " 15 O3 26304 non-null float64 \n", " 16 NO2 26304 non-null float64 \n", " 17 PM10 26304 non-null float64 \n", " 18 PM25 26304 non-null float64 \n", " 19 binary_class 26304 non-null int64 \n", " 20 year 26304 non-null int64 \n", " 21 month 26304 non-null int64 \n", " 22 hour 26304 non-null int64 \n", " 23 ground_temp - temp_C 26304 non-null float64 \n", " 24 hour_sin 26304 non-null float64 \n", " 25 hour_cos 26304 non-null float64 \n", " 26 month_sin 26304 non-null float64 \n", " 27 month_cos 26304 non-null float64 \n", " 28 visi 26304 non-null float64 \n", " 29 multi_class 26304 non-null int64 \n", "dtypes: category(3), float64(22), int64(5)\n", "memory usage: 5.7 MB\n" ] } ], "source": [ "df_busan_train.info()" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [], "source": [ "df_seoul_train.to_csv(\"../data/data_for_modeling/seoul_train.csv\")\n", "df_seoul_test.to_csv(\"../data/data_for_modeling/seoul_test.csv\")\n", "\n", "df_busan_train.to_csv(\"../data/data_for_modeling/busan_train.csv\")\n", "df_busan_test.to_csv(\"../data/data_for_modeling/busan_test.csv\")\n", "\n", "df_incheon_train.to_csv(\"../data/data_for_modeling/incheon_train.csv\")\n", "df_incheon_test.to_csv(\"../data/data_for_modeling/incheon_test.csv\")\n", "\n", "df_daegu_train.to_csv(\"../data/data_for_modeling/daegu_train.csv\")\n", "df_daegu_test.to_csv(\"../data/data_for_modeling/daegu_test.csv\")\n", "\n", "df_daejeon_train.to_csv(\"../data/data_for_modeling/daejeon_train.csv\")\n", "df_daejeon_test.to_csv(\"../data/data_for_modeling/daejeon_test.csv\")\n", "\n", "df_gwangju_train.to_csv(\"../data/data_for_modeling/gwangju_train.csv\")\n", "df_gwangju_test.to_csv(\"../data/data_for_modeling/gwangju_test.csv\")\n", "\n", "df_seoul_train = pd.read_csv(\"../data/data_for_modeling/seoul_train.csv\")\n", "df_seoul_test = pd.read_csv(\"../data/data_for_modeling/seoul_test.csv\")\n" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Counter({2: 8266, 1: 481, 0: 13})\n", "Counter({2: 23686, 1: 2579, 0: 39})\n", "Counter({2: 8455, 1: 281, 0: 24})\n", "Counter({2: 24694, 1: 1516, 0: 94})\n", "Counter({2: 7373, 1: 1205, 0: 182})\n", "Counter({2: 21893, 1: 3892, 0: 519})\n", "Counter({2: 8631, 1: 128, 0: 1})\n", "Counter({2: 25149, 1: 1107, 0: 48})\n", "Counter({2: 8089, 1: 618, 0: 53})\n", "Counter({2: 23471, 1: 2660, 0: 173})\n", "Counter({2: 8087, 1: 643, 0: 30})\n", "Counter({2: 23798, 1: 2411, 0: 95})\n" ] } ], "source": [ "print(Counter(df_seoul_test['multi_class']))\n", "print(Counter(df_seoul_train['multi_class']))\n", "\n", "print(Counter(df_busan_test['multi_class']))\n", "print(Counter(df_busan_train['multi_class']))\n", "\n", "print(Counter(df_incheon_test['multi_class']))\n", "print(Counter(df_incheon_train['multi_class']))\n", "\n", "print(Counter(df_daegu_test['multi_class']))\n", "print(Counter(df_daegu_train['multi_class']))\n", "\n", "print(Counter(df_daejeon_test['multi_class']))\n", "print(Counter(df_daejeon_train['multi_class']))\n", "\n", "print(Counter(df_gwangju_test['multi_class']))\n", "print(Counter(df_gwangju_train['multi_class']))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, "nbformat_minor": 2 }