{ "cells": [ { "cell_type": "code", "execution_count": 5, "id": "99f56426", "metadata": {}, "outputs": [], "source": [ "# Import required libraries\n", "import pandas as pd\n", "import numpy as np \n", "import matplotlib.pyplot as plt\n", "import sklearn\n", "\n", "# Import necessary modules\n", "from sklearn.model_selection import train_test_split\n", "from sklearn.metrics import mean_squared_error\n", "from math import sqrt\n", "\n", "# Keras specific\n", "import keras\n", "from keras.models import Sequential\n", "from keras.layers import Dense" ] }, { "cell_type": "code", "execution_count": 13, "id": "10b8d271", "metadata": {}, "outputs": [], "source": [ "in_columns = ['id_stacji', 'nazwa_stacji', 'typ_zbioru', 'rok', 'miesiąc']\n", "\n", "df = pd.read_csv('train/in.tsv', names=in_columns, sep='\\t')" ] }, { "cell_type": "code", "execution_count": 18, "id": "0cd1b792", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | id_stacji | \n", "rok | \n", "miesiąc | \n", "
---|---|---|---|
0 | \n", "249180010 | \n", "1981 | \n", "1 | \n", "
1 | \n", "249180010 | \n", "1981 | \n", "2 | \n", "
2 | \n", "249180010 | \n", "1981 | \n", "3 | \n", "
3 | \n", "249180010 | \n", "1981 | \n", "4 | \n", "
4 | \n", "249180010 | \n", "1981 | \n", "5 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "
8755 | \n", "252230120 | \n", "2010 | \n", "8 | \n", "
8756 | \n", "252230120 | \n", "2010 | \n", "9 | \n", "
8757 | \n", "252230120 | \n", "2010 | \n", "10 | \n", "
8758 | \n", "252230120 | \n", "2010 | \n", "11 | \n", "
8759 | \n", "252230120 | \n", "2010 | \n", "12 | \n", "
8760 rows × 3 columns
\n", "\n", " | rainfall | \n", "
---|---|
0 | \n", "19.4 | \n", "
1 | \n", "43.2 | \n", "
2 | \n", "72.2 | \n", "
3 | \n", "25.3 | \n", "
4 | \n", "89.3 | \n", "
... | \n", "... | \n", "
8755 | \n", "114.9 | \n", "
8756 | \n", "101.2 | \n", "
8757 | \n", "20.4 | \n", "
8758 | \n", "93.2 | \n", "
8759 | \n", "46.9 | \n", "
8760 rows × 1 columns
\n", "