Add project solution
This commit is contained in:
commit
953cf03b68
1000
dev-0/expected.tsv
Normal file
1000
dev-0/expected.tsv
Normal file
File diff suppressed because it is too large
Load Diff
1000
dev-0/in.tsv
Normal file
1000
dev-0/in.tsv
Normal file
File diff suppressed because it is too large
Load Diff
855
regression.ipynb
Normal file
855
regression.ipynb
Normal file
@ -0,0 +1,855 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import pandas as pd\n",
|
||||
"from pandas import DataFrame\n",
|
||||
"from sklearn import preprocessing\n",
|
||||
"from sklearn.preprocessing import PolynomialFeatures\n",
|
||||
"from sklearn.linear_model import LinearRegression\n",
|
||||
"from sklearn.metrics import mean_squared_error\n",
|
||||
"from sklearn import ensemble\n",
|
||||
"from tensorflow.keras.layers import Input, Dense\n",
|
||||
"from tensorflow.keras.models import Model"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Cel projektu\n",
|
||||
"\n",
|
||||
"Celem projektu jest stworzenie różnych modeli, których zadanie polega na predykcji\n",
|
||||
"cen poszczególnych samochodów na podstawie danych takich jak:\n",
|
||||
" - rok produkcji\n",
|
||||
" - przebieg\n",
|
||||
" - marka\n",
|
||||
" - rodzaj silnika\n",
|
||||
" - pojemność silnika\n",
|
||||
" "
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Wczytywanie danych\n",
|
||||
"\n",
|
||||
"Zbiór zawiera listę samochodów, wraz z ich najważniejszymi cechami.\n",
|
||||
"Rozmiar zbioru: 47930 wierszy × 5 kolumn"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 15,
|
||||
"metadata": {
|
||||
"pycharm": {
|
||||
"name": "#%%\n"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"col_names = [\"price\", \"mileage\", \"year\", \"brand\", \"engine_type\", \"engine_cap\"]\n",
|
||||
"col_names_in = [\"mileage\", \"year\", \"brand\", \"engine_type\", \"engine_cap\"]\n",
|
||||
"df_train = pd.read_csv(\n",
|
||||
" \"train/train.tsv\", error_bad_lines=False, header=None, sep=\"\\t\", names=col_names\n",
|
||||
")\n",
|
||||
"df = df_train\n",
|
||||
"test = pd.read_csv(\n",
|
||||
" \"dev-0/in.tsv\", error_bad_lines=False, header=None, sep=\"\\t\", names=col_names_in\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"test_expected = pd.read_csv(\"dev-0/expected.tsv\", error_bad_lines=False, header=None, sep=\"\\t\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 29,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<style scoped>\n",
|
||||
" .dataframe tbody tr th:only-of-type {\n",
|
||||
" vertical-align: middle;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe tbody tr th {\n",
|
||||
" vertical-align: top;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe thead th {\n",
|
||||
" text-align: right;\n",
|
||||
" }\n",
|
||||
"</style>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>mileage</th>\n",
|
||||
" <th>year</th>\n",
|
||||
" <th>brand</th>\n",
|
||||
" <th>engine_type</th>\n",
|
||||
" <th>engine_cap</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>29.077465</td>\n",
|
||||
" <td>1.0060</td>\n",
|
||||
" <td>volvo</td>\n",
|
||||
" <td>benzyna</td>\n",
|
||||
" <td>960.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>1</th>\n",
|
||||
" <td>19.800027</td>\n",
|
||||
" <td>1.0080</td>\n",
|
||||
" <td>kia</td>\n",
|
||||
" <td>diesel</td>\n",
|
||||
" <td>418.8</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>2</th>\n",
|
||||
" <td>27.916642</td>\n",
|
||||
" <td>1.0075</td>\n",
|
||||
" <td>toyota</td>\n",
|
||||
" <td>diesel</td>\n",
|
||||
" <td>420.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>3</th>\n",
|
||||
" <td>32.976864</td>\n",
|
||||
" <td>1.0075</td>\n",
|
||||
" <td>skoda</td>\n",
|
||||
" <td>diesel</td>\n",
|
||||
" <td>480.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>4</th>\n",
|
||||
" <td>38.932205</td>\n",
|
||||
" <td>1.0060</td>\n",
|
||||
" <td>renault</td>\n",
|
||||
" <td>diesel</td>\n",
|
||||
" <td>600.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>5</th>\n",
|
||||
" <td>32.089045</td>\n",
|
||||
" <td>1.0070</td>\n",
|
||||
" <td>opel</td>\n",
|
||||
" <td>diesel</td>\n",
|
||||
" <td>390.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>6</th>\n",
|
||||
" <td>31.997055</td>\n",
|
||||
" <td>1.0065</td>\n",
|
||||
" <td>mercedes-benz</td>\n",
|
||||
" <td>diesel</td>\n",
|
||||
" <td>900.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>7</th>\n",
|
||||
" <td>26.138626</td>\n",
|
||||
" <td>1.0075</td>\n",
|
||||
" <td>ford</td>\n",
|
||||
" <td>benzyna</td>\n",
|
||||
" <td>300.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>8</th>\n",
|
||||
" <td>38.142843</td>\n",
|
||||
" <td>1.0015</td>\n",
|
||||
" <td>seat</td>\n",
|
||||
" <td>diesel</td>\n",
|
||||
" <td>570.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>9</th>\n",
|
||||
" <td>26.715448</td>\n",
|
||||
" <td>1.0060</td>\n",
|
||||
" <td>mercedes-benz</td>\n",
|
||||
" <td>diesel</td>\n",
|
||||
" <td>642.9</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"</div>"
|
||||
],
|
||||
"text/plain": [
|
||||
" mileage year brand engine_type engine_cap\n",
|
||||
"0 29.077465 1.0060 volvo benzyna 960.0\n",
|
||||
"1 19.800027 1.0080 kia diesel 418.8\n",
|
||||
"2 27.916642 1.0075 toyota diesel 420.0\n",
|
||||
"3 32.976864 1.0075 skoda diesel 480.0\n",
|
||||
"4 38.932205 1.0060 renault diesel 600.0\n",
|
||||
"5 32.089045 1.0070 opel diesel 390.0\n",
|
||||
"6 31.997055 1.0065 mercedes-benz diesel 900.0\n",
|
||||
"7 26.138626 1.0075 ford benzyna 300.0\n",
|
||||
"8 38.142843 1.0015 seat diesel 570.0\n",
|
||||
"9 26.715448 1.0060 mercedes-benz diesel 642.9"
|
||||
]
|
||||
},
|
||||
"execution_count": 29,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"df.head(10)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 30,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<style scoped>\n",
|
||||
" .dataframe tbody tr th:only-of-type {\n",
|
||||
" vertical-align: middle;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe tbody tr th {\n",
|
||||
" vertical-align: top;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe thead th {\n",
|
||||
" text-align: right;\n",
|
||||
" }\n",
|
||||
"</style>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>mileage</th>\n",
|
||||
" <th>year</th>\n",
|
||||
" <th>brand</th>\n",
|
||||
" <th>engine_type</th>\n",
|
||||
" <th>engine_cap</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>29.077465</td>\n",
|
||||
" <td>1.0060</td>\n",
|
||||
" <td>volvo</td>\n",
|
||||
" <td>benzyna</td>\n",
|
||||
" <td>960.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>1</th>\n",
|
||||
" <td>19.800027</td>\n",
|
||||
" <td>1.0080</td>\n",
|
||||
" <td>kia</td>\n",
|
||||
" <td>diesel</td>\n",
|
||||
" <td>418.8</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>2</th>\n",
|
||||
" <td>27.916642</td>\n",
|
||||
" <td>1.0075</td>\n",
|
||||
" <td>toyota</td>\n",
|
||||
" <td>diesel</td>\n",
|
||||
" <td>420.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>3</th>\n",
|
||||
" <td>32.976864</td>\n",
|
||||
" <td>1.0075</td>\n",
|
||||
" <td>skoda</td>\n",
|
||||
" <td>diesel</td>\n",
|
||||
" <td>480.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>4</th>\n",
|
||||
" <td>38.932205</td>\n",
|
||||
" <td>1.0060</td>\n",
|
||||
" <td>renault</td>\n",
|
||||
" <td>diesel</td>\n",
|
||||
" <td>600.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>...</th>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>47997</th>\n",
|
||||
" <td>25.530471</td>\n",
|
||||
" <td>1.0055</td>\n",
|
||||
" <td>mini</td>\n",
|
||||
" <td>benzyna</td>\n",
|
||||
" <td>479.4</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>47998</th>\n",
|
||||
" <td>41.875698</td>\n",
|
||||
" <td>1.0020</td>\n",
|
||||
" <td>mercedes-benz</td>\n",
|
||||
" <td>diesel</td>\n",
|
||||
" <td>644.4</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>47999</th>\n",
|
||||
" <td>40.061463</td>\n",
|
||||
" <td>1.0025</td>\n",
|
||||
" <td>mercedes-benz</td>\n",
|
||||
" <td>diesel</td>\n",
|
||||
" <td>506.7</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>48000</th>\n",
|
||||
" <td>40.809827</td>\n",
|
||||
" <td>1.0010</td>\n",
|
||||
" <td>mercedes-benz</td>\n",
|
||||
" <td>diesel</td>\n",
|
||||
" <td>644.4</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>48001</th>\n",
|
||||
" <td>38.337702</td>\n",
|
||||
" <td>1.0035</td>\n",
|
||||
" <td>mercedes-benz</td>\n",
|
||||
" <td>diesel</td>\n",
|
||||
" <td>896.1</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"<p>47930 rows × 5 columns</p>\n",
|
||||
"</div>"
|
||||
],
|
||||
"text/plain": [
|
||||
" mileage year brand engine_type engine_cap\n",
|
||||
"0 29.077465 1.0060 volvo benzyna 960.0\n",
|
||||
"1 19.800027 1.0080 kia diesel 418.8\n",
|
||||
"2 27.916642 1.0075 toyota diesel 420.0\n",
|
||||
"3 32.976864 1.0075 skoda diesel 480.0\n",
|
||||
"4 38.932205 1.0060 renault diesel 600.0\n",
|
||||
"... ... ... ... ... ...\n",
|
||||
"47997 25.530471 1.0055 mini benzyna 479.4\n",
|
||||
"47998 41.875698 1.0020 mercedes-benz diesel 644.4\n",
|
||||
"47999 40.061463 1.0025 mercedes-benz diesel 506.7\n",
|
||||
"48000 40.809827 1.0010 mercedes-benz diesel 644.4\n",
|
||||
"48001 38.337702 1.0035 mercedes-benz diesel 896.1\n",
|
||||
"\n",
|
||||
"[47930 rows x 5 columns]"
|
||||
]
|
||||
},
|
||||
"execution_count": 30,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"df"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Preprocessing danych\n",
|
||||
"\n",
|
||||
"## 1. Dane odstające\n",
|
||||
"Na początku zostały usunięte dane odstające, takie jak auta, których cena jest poniżej tysiąca, lub których przebieg jest wyższy niż 900 000km."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 16,
|
||||
"metadata": {
|
||||
"pycharm": {
|
||||
"name": "#%%\n"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"Y_test = test_expected[0]\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"# Drop rows which have strange value\n",
|
||||
"brands = df.brand.value_counts()[:35].index.tolist()\n",
|
||||
"indexes = df_train[(df_train.price < 1000) & (df_train.price > 1)].index\n",
|
||||
"df_train.drop(indexes, inplace=True)\n",
|
||||
"\n",
|
||||
"index = df_train[(df_train.mileage > 900000)].index\n",
|
||||
"df_train.drop(index, inplace=True)\n",
|
||||
"\n",
|
||||
"Y_train = df_train[\"price\"]\n",
|
||||
"df_train.drop(\"price\", axis=1, inplace=True)\n",
|
||||
"\n",
|
||||
"\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 2. Normalizacja danych liczbowych\n",
|
||||
"\n",
|
||||
"Dane takie jak rok, przebieg czy pojemność silnika zostały znacząco zredukowane\n",
|
||||
"\n",
|
||||
"## 3. Lowercase nazw producentów\n",
|
||||
"\n",
|
||||
"Nazwy producentów zostały zapisane wyłącznie małymi literami\n",
|
||||
"\n",
|
||||
"## 4. Utworzenie 'dummies'\n",
|
||||
"\n",
|
||||
"Zostały utworzone kolumny dla każdej z marek przyjmujące wartość (0,1)\n",
|
||||
"\n",
|
||||
"## 5. Utworzenie wielomianiu stopnia 2\n",
|
||||
"\n",
|
||||
"Z wykorzystaniem biblioteki sklearn.preprocessing"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"metadata": {
|
||||
"pycharm": {
|
||||
"name": "#%%\n"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"def preprocess_data(df: DataFrame, brands: list) -> DataFrame:\n",
|
||||
" \"\"\"Prepare dataset to linear regression\"\"\"\n",
|
||||
"\n",
|
||||
" df.brand = df.brand.apply(lambda x: x if x in brands else \"0\")\n",
|
||||
" df[\"year\"] = df.year / 2000\n",
|
||||
" df[\"mileage\"] = df.mileage ** 0.3\n",
|
||||
" df[\"engine_cap\"] = df.engine_cap * 0.3\n",
|
||||
" df[\"brand\"] = df[\"brand\"].str.lower()\n",
|
||||
"\n",
|
||||
" df = pd.get_dummies(df, columns=[\"brand\", \"engine_type\"])\n",
|
||||
"\n",
|
||||
" scaler = preprocessing.RobustScaler()\n",
|
||||
" df[[\"mileage\", \"year\", \"engine_cap\", \"year\"]] = scaler.fit_transform(\n",
|
||||
" df[[\"mileage\", \"year\", \"engine_cap\", \"year\"]]\n",
|
||||
" )\n",
|
||||
"\n",
|
||||
" poly = PolynomialFeatures(2, interaction_only=True)\n",
|
||||
" df = poly.fit_transform(df)\n",
|
||||
"\n",
|
||||
" return df"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 18,
|
||||
"metadata": {
|
||||
"pycharm": {
|
||||
"name": "#%%\n"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"X_train = preprocess_data(df_train, brands)\n",
|
||||
"X_test = preprocess_data(test, brands)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Regresja liniowa\n",
|
||||
"\n",
|
||||
"Implementacja regresji liniowej za pomocą biblioteki sklearn\n",
|
||||
"\n",
|
||||
"## RMSE: 22065.84\n",
|
||||
"## MSE: 486901471.27"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 21,
|
||||
"metadata": {
|
||||
"pycharm": {
|
||||
"name": "#%%\n"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"RMSE: 22065.843996457512\n",
|
||||
"MSE: 486901471.276\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Load model and fit data\n",
|
||||
"lm_model = LinearRegression()\n",
|
||||
"lm_model.fit(X_train, Y_train)\n",
|
||||
"\n",
|
||||
"# Predict\n",
|
||||
"lr_test_predicted = lm_model.predict(X_test)\n",
|
||||
"\n",
|
||||
"# Predicted values to tsv\n",
|
||||
"print(\"RMSE: \", mean_squared_error(Y_test, lr_test_predicted, squared=False))\n",
|
||||
"print(\"MSE: \", mean_squared_error(Y_test, lr_test_predicted))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Sieć neuronowa (Keras)\n",
|
||||
"\n",
|
||||
"batch size: 64,\n",
|
||||
"epochs: 100,\n",
|
||||
"3 x ReLU\n",
|
||||
"optimizer: adam,\n",
|
||||
"loss: mean squared error\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"## RMSE: 18558.15\n",
|
||||
"## MSE: 344404977.04"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 27,
|
||||
"metadata": {
|
||||
"pycharm": {
|
||||
"name": "#%%\n"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Epoch 1/100\n",
|
||||
"600/600 [==============================] - 5s 7ms/step - loss: 2673221721.0250 - mean_squared_error: 2673221721.0250 - val_loss: 551377856.0000 - val_mean_squared_error: 551377856.0000\n",
|
||||
"Epoch 2/100\n",
|
||||
"600/600 [==============================] - 3s 6ms/step - loss: 442345591.4276 - mean_squared_error: 442345591.4276 - val_loss: 423978976.0000 - val_mean_squared_error: 423978976.0000\n",
|
||||
"Epoch 3/100\n",
|
||||
"600/600 [==============================] - 3s 6ms/step - loss: 378405340.5923 - mean_squared_error: 378405340.5923 - val_loss: 378884192.0000 - val_mean_squared_error: 378884192.0000\n",
|
||||
"Epoch 4/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 384769043.7271 - mean_squared_error: 384769043.7271 - val_loss: 357286848.0000 - val_mean_squared_error: 357286848.0000\n",
|
||||
"Epoch 5/100\n",
|
||||
"600/600 [==============================] - 4s 6ms/step - loss: 343957554.7155 - mean_squared_error: 343957554.7155 - val_loss: 340152512.0000 - val_mean_squared_error: 340152512.0000\n",
|
||||
"Epoch 6/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 337887713.4376 - mean_squared_error: 337887713.4376 - val_loss: 331659872.0000 - val_mean_squared_error: 331659872.0000\n",
|
||||
"Epoch 7/100\n",
|
||||
"600/600 [==============================] - 4s 6ms/step - loss: 313163787.1281 - mean_squared_error: 313163787.1281 - val_loss: 323213504.0000 - val_mean_squared_error: 323213504.0000\n",
|
||||
"Epoch 8/100\n",
|
||||
"600/600 [==============================] - 4s 6ms/step - loss: 314339570.3428 - mean_squared_error: 314339570.3428 - val_loss: 317251488.0000 - val_mean_squared_error: 317251488.0000\n",
|
||||
"Epoch 9/100\n",
|
||||
"600/600 [==============================] - 5s 9ms/step - loss: 303178196.5524 - mean_squared_error: 303178196.5524 - val_loss: 314496736.0000 - val_mean_squared_error: 314496736.0000\n",
|
||||
"Epoch 10/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 313794526.9351 - mean_squared_error: 313794526.9351 - val_loss: 310654176.0000 - val_mean_squared_error: 310654176.0000\n",
|
||||
"Epoch 11/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 284679367.4542 - mean_squared_error: 284679367.4542 - val_loss: 304685248.0000 - val_mean_squared_error: 304685248.0000\n",
|
||||
"Epoch 12/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 311546194.3161 - mean_squared_error: 311546194.3161 - val_loss: 304376256.0000 - val_mean_squared_error: 304376256.0000\n",
|
||||
"Epoch 13/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 286383306.4892 - mean_squared_error: 286383306.4892 - val_loss: 303079392.0000 - val_mean_squared_error: 303079392.0000\n",
|
||||
"Epoch 14/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 312419505.4110 - mean_squared_error: 312419505.4110 - val_loss: 296362720.0000 - val_mean_squared_error: 296362720.0000\n",
|
||||
"Epoch 15/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 281224970.5957 - mean_squared_error: 281224970.5957 - val_loss: 295127040.0000 - val_mean_squared_error: 295127040.0000\n",
|
||||
"Epoch 16/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 300456786.4759 - mean_squared_error: 300456786.4759 - val_loss: 291579264.0000 - val_mean_squared_error: 291579264.0000\n",
|
||||
"Epoch 17/100\n",
|
||||
"600/600 [==============================] - 4s 6ms/step - loss: 271273312.1864 - mean_squared_error: 271273312.1864 - val_loss: 293092064.0000 - val_mean_squared_error: 293092064.0000\n",
|
||||
"Epoch 18/100\n",
|
||||
"600/600 [==============================] - 4s 6ms/step - loss: 274466717.5241 - mean_squared_error: 274466717.5241 - val_loss: 291955424.0000 - val_mean_squared_error: 291955424.0000\n",
|
||||
"Epoch 19/100\n",
|
||||
"600/600 [==============================] - 4s 6ms/step - loss: 280078536.3328 - mean_squared_error: 280078536.3328 - val_loss: 286574528.0000 - val_mean_squared_error: 286574528.0000\n",
|
||||
"Epoch 20/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 283455574.6290 - mean_squared_error: 283455574.6290 - val_loss: 283341472.0000 - val_mean_squared_error: 283341472.0000\n",
|
||||
"Epoch 21/100\n",
|
||||
"600/600 [==============================] - 4s 6ms/step - loss: 269008367.3078 - mean_squared_error: 269008367.3078 - val_loss: 287479776.0000 - val_mean_squared_error: 287479776.0000\n",
|
||||
"Epoch 22/100\n",
|
||||
"600/600 [==============================] - 4s 6ms/step - loss: 285307228.4326 - mean_squared_error: 285307228.4326 - val_loss: 281901632.0000 - val_mean_squared_error: 281901632.0000\n",
|
||||
"Epoch 23/100\n",
|
||||
"600/600 [==============================] - 4s 6ms/step - loss: 270041985.1448 - mean_squared_error: 270041985.1448 - val_loss: 285430688.0000 - val_mean_squared_error: 285430688.0000\n",
|
||||
"Epoch 24/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 287381889.8902 - mean_squared_error: 287381889.8902 - val_loss: 283002208.0000 - val_mean_squared_error: 283002208.0000\n",
|
||||
"Epoch 25/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 290092397.6839 - mean_squared_error: 290092397.6839 - val_loss: 281590592.0000 - val_mean_squared_error: 281590592.0000\n",
|
||||
"Epoch 26/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 287577090.5291 - mean_squared_error: 287577090.5291 - val_loss: 277902464.0000 - val_mean_squared_error: 277902464.0000\n",
|
||||
"Epoch 27/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 272385114.1165 - mean_squared_error: 272385114.1165 - val_loss: 280177056.0000 - val_mean_squared_error: 280177056.0000\n",
|
||||
"Epoch 28/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 257438328.8785 - mean_squared_error: 257438328.8785 - val_loss: 284091104.0000 - val_mean_squared_error: 284091104.0000\n",
|
||||
"Epoch 29/100\n",
|
||||
"600/600 [==============================] - 3s 6ms/step - loss: 276722888.6256 - mean_squared_error: 276722888.6256 - val_loss: 277816032.0000 - val_mean_squared_error: 277816032.0000\n",
|
||||
"Epoch 30/100\n",
|
||||
"600/600 [==============================] - 3s 6ms/step - loss: 271698972.8586 - mean_squared_error: 271698972.8586 - val_loss: 281744256.0000 - val_mean_squared_error: 281744256.0000\n",
|
||||
"Epoch 31/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 277800460.3261 - mean_squared_error: 277800460.3261 - val_loss: 275767552.0000 - val_mean_squared_error: 275767552.0000\n",
|
||||
"Epoch 32/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 255387858.4093 - mean_squared_error: 255387858.4093 - val_loss: 274004512.0000 - val_mean_squared_error: 274004512.0000\n",
|
||||
"Epoch 33/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 267013800.2263 - mean_squared_error: 267013800.2263 - val_loss: 274496832.0000 - val_mean_squared_error: 274496832.0000\n",
|
||||
"Epoch 34/100\n",
|
||||
"600/600 [==============================] - 4s 6ms/step - loss: 270699375.3611 - mean_squared_error: 270699375.3611 - val_loss: 276478944.0000 - val_mean_squared_error: 276478944.0000\n",
|
||||
"Epoch 35/100\n",
|
||||
"600/600 [==============================] - 4s 6ms/step - loss: 279694474.7288 - mean_squared_error: 279694474.7288 - val_loss: 279028160.0000 - val_mean_squared_error: 279028160.0000\n",
|
||||
"Epoch 36/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 270710719.1747 - mean_squared_error: 270710719.1747 - val_loss: 273949600.0000 - val_mean_squared_error: 273949600.0000\n",
|
||||
"Epoch 37/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 272804902.7354 - mean_squared_error: 272804902.7354 - val_loss: 274979104.0000 - val_mean_squared_error: 274979104.0000\n",
|
||||
"Epoch 38/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 254984751.6805 - mean_squared_error: 254984751.6805 - val_loss: 278099008.0000 - val_mean_squared_error: 278099008.0000\n",
|
||||
"Epoch 39/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 263644632.1597 - mean_squared_error: 263644632.1597 - val_loss: 275570400.0000 - val_mean_squared_error: 275570400.0000\n",
|
||||
"Epoch 40/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 283981970.5824 - mean_squared_error: 283981970.5824 - val_loss: 269600896.0000 - val_mean_squared_error: 269600896.0000\n",
|
||||
"Epoch 41/100\n",
|
||||
"600/600 [==============================] - 4s 6ms/step - loss: 263011782.5225 - mean_squared_error: 263011782.5225 - val_loss: 270043744.0000 - val_mean_squared_error: 270043744.0000\n",
|
||||
"Epoch 42/100\n",
|
||||
"600/600 [==============================] - 4s 6ms/step - loss: 275432014.8286 - mean_squared_error: 275432014.8286 - val_loss: 268776480.0000 - val_mean_squared_error: 268776480.0000\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Epoch 43/100\n",
|
||||
"600/600 [==============================] - 3s 6ms/step - loss: 260651440.1864 - mean_squared_error: 260651440.1864 - val_loss: 275194144.0000 - val_mean_squared_error: 275194144.0000\n",
|
||||
"Epoch 44/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 257748764.5125 - mean_squared_error: 257748764.5125 - val_loss: 270911072.0000 - val_mean_squared_error: 270911072.0000\n",
|
||||
"Epoch 45/100\n",
|
||||
"600/600 [==============================] - 3s 6ms/step - loss: 266450056.8918 - mean_squared_error: 266450056.8918 - val_loss: 270361472.0000 - val_mean_squared_error: 270361472.0000\n",
|
||||
"Epoch 46/100\n",
|
||||
"600/600 [==============================] - 3s 5ms/step - loss: 267280017.8369 - mean_squared_error: 267280017.8369 - val_loss: 268170224.0000 - val_mean_squared_error: 268170224.0000\n",
|
||||
"Epoch 47/100\n",
|
||||
"600/600 [==============================] - 4s 6ms/step - loss: 270953393.1048 - mean_squared_error: 270953393.1048 - val_loss: 266962048.0000 - val_mean_squared_error: 266962048.0000\n",
|
||||
"Epoch 48/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 261569597.8436 - mean_squared_error: 261569597.8436 - val_loss: 270642752.0000 - val_mean_squared_error: 270642752.0000\n",
|
||||
"Epoch 49/100\n",
|
||||
"600/600 [==============================] - 5s 9ms/step - loss: 252863808.0799 - mean_squared_error: 252863808.0799 - val_loss: 264875584.0000 - val_mean_squared_error: 264875584.0000\n",
|
||||
"Epoch 50/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 269732835.3677 - mean_squared_error: 269732835.3677 - val_loss: 265078368.0000 - val_mean_squared_error: 265078368.0000\n",
|
||||
"Epoch 51/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 277777046.5225 - mean_squared_error: 277777046.5225 - val_loss: 265569424.0000 - val_mean_squared_error: 265569424.0000\n",
|
||||
"Epoch 52/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 259421935.3611 - mean_squared_error: 259421935.3611 - val_loss: 263121728.0000 - val_mean_squared_error: 263121728.0000\n",
|
||||
"Epoch 53/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 246818920.4126 - mean_squared_error: 246818920.4126 - val_loss: 268283376.0000 - val_mean_squared_error: 268283376.0000\n",
|
||||
"Epoch 54/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 262059519.1747 - mean_squared_error: 262059519.1747 - val_loss: 264587712.0000 - val_mean_squared_error: 264587712.0000\n",
|
||||
"Epoch 55/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 251146320.5857 - mean_squared_error: 251146320.5857 - val_loss: 264188048.0000 - val_mean_squared_error: 264188048.0000\n",
|
||||
"Epoch 56/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 277728213.8569 - mean_squared_error: 277728213.8569 - val_loss: 265315792.0000 - val_mean_squared_error: 265315792.0000\n",
|
||||
"Epoch 57/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 273021954.3694 - mean_squared_error: 273021954.3694 - val_loss: 265453232.0000 - val_mean_squared_error: 265453232.0000\n",
|
||||
"Epoch 58/100\n",
|
||||
"600/600 [==============================] - 5s 7ms/step - loss: 235758602.8619 - mean_squared_error: 235758602.8619 - val_loss: 267418880.0000 - val_mean_squared_error: 267418880.0000\n",
|
||||
"Epoch 59/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 253989512.0932 - mean_squared_error: 253989512.0932 - val_loss: 263675520.0000 - val_mean_squared_error: 263675520.0000\n",
|
||||
"Epoch 60/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 262297644.0067 - mean_squared_error: 262297644.0067 - val_loss: 260217264.0000 - val_mean_squared_error: 260217264.0000\n",
|
||||
"Epoch 61/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 265082348.2596 - mean_squared_error: 265082348.2596 - val_loss: 262431664.0000 - val_mean_squared_error: 262431664.0000\n",
|
||||
"Epoch 62/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 257870115.1681 - mean_squared_error: 257870115.1681 - val_loss: 262881312.0000 - val_mean_squared_error: 262881312.0000\n",
|
||||
"Epoch 63/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 240457727.4143 - mean_squared_error: 240457727.4143 - val_loss: 261733392.0000 - val_mean_squared_error: 261733392.0000\n",
|
||||
"Epoch 64/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 277940927.2013 - mean_squared_error: 277940927.2013 - val_loss: 260641392.0000 - val_mean_squared_error: 260641392.0000\n",
|
||||
"Epoch 65/100\n",
|
||||
"600/600 [==============================] - 5s 9ms/step - loss: 243245328.8120 - mean_squared_error: 243245328.8120 - val_loss: 266007856.0000 - val_mean_squared_error: 266007856.0000\n",
|
||||
"Epoch 66/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 280276759.2679 - mean_squared_error: 280276759.2679 - val_loss: 260283456.0000 - val_mean_squared_error: 260283456.0000\n",
|
||||
"Epoch 67/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 256323983.0948 - mean_squared_error: 256323983.0948 - val_loss: 260369344.0000 - val_mean_squared_error: 260369344.0000\n",
|
||||
"Epoch 68/100\n",
|
||||
"600/600 [==============================] - 6s 10ms/step - loss: 257920354.0499 - mean_squared_error: 257920354.0499 - val_loss: 259491872.0000 - val_mean_squared_error: 259491872.0000\n",
|
||||
"Epoch 69/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 248803245.8436 - mean_squared_error: 248803245.8436 - val_loss: 260577376.0000 - val_mean_squared_error: 260577376.0000\n",
|
||||
"Epoch 70/100\n",
|
||||
"600/600 [==============================] - 5s 9ms/step - loss: 262326159.4676 - mean_squared_error: 262326159.4676 - val_loss: 261333040.0000 - val_mean_squared_error: 261333040.0000\n",
|
||||
"Epoch 71/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 244443427.6473 - mean_squared_error: 244443427.6473 - val_loss: 260864640.0000 - val_mean_squared_error: 260864640.0000\n",
|
||||
"Epoch 72/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 251957369.0782 - mean_squared_error: 251957369.0782 - val_loss: 260814608.0000 - val_mean_squared_error: 260814608.0000\n",
|
||||
"Epoch 73/100\n",
|
||||
"600/600 [==============================] - 5s 7ms/step - loss: 258517712.4792 - mean_squared_error: 258517712.4792 - val_loss: 258114464.0000 - val_mean_squared_error: 258114464.0000\n",
|
||||
"Epoch 74/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 219879441.5308 - mean_squared_error: 219879441.5308 - val_loss: 262360560.0000 - val_mean_squared_error: 262360560.0000\n",
|
||||
"Epoch 75/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 260794823.4143 - mean_squared_error: 260794823.4143 - val_loss: 256498032.0000 - val_mean_squared_error: 256498032.0000\n",
|
||||
"Epoch 76/100\n",
|
||||
"600/600 [==============================] - 5s 9ms/step - loss: 239282565.3511 - mean_squared_error: 239282565.3511 - val_loss: 262098640.0000 - val_mean_squared_error: 262098640.0000\n",
|
||||
"Epoch 77/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 257229255.3478 - mean_squared_error: 257229255.3478 - val_loss: 259628224.0000 - val_mean_squared_error: 259628224.0000\n",
|
||||
"Epoch 78/100\n",
|
||||
"600/600 [==============================] - 5s 9ms/step - loss: 244059795.5541 - mean_squared_error: 244059795.5541 - val_loss: 259398896.0000 - val_mean_squared_error: 259398896.0000\n",
|
||||
"Epoch 79/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 255108445.9767 - mean_squared_error: 255108445.9767 - val_loss: 259564784.0000 - val_mean_squared_error: 259564784.0000\n",
|
||||
"Epoch 80/100\n",
|
||||
"600/600 [==============================] - 5s 9ms/step - loss: 252858985.0250 - mean_squared_error: 252858985.0250 - val_loss: 261315536.0000 - val_mean_squared_error: 261315536.0000\n",
|
||||
"Epoch 81/100\n",
|
||||
"600/600 [==============================] - 6s 9ms/step - loss: 251545596.1664 - mean_squared_error: 251545596.1664 - val_loss: 259559184.0000 - val_mean_squared_error: 259559184.0000\n",
|
||||
"Epoch 82/100\n",
|
||||
"600/600 [==============================] - 6s 10ms/step - loss: 253448548.1464 - mean_squared_error: 253448548.1464 - val_loss: 257081360.0000 - val_mean_squared_error: 257081360.0000\n",
|
||||
"Epoch 83/100\n",
|
||||
"600/600 [==============================] - 7s 11ms/step - loss: 223692804.4592 - mean_squared_error: 223692804.4592 - val_loss: 260599392.0000 - val_mean_squared_error: 260599392.0000\n",
|
||||
"Epoch 84/100\n",
|
||||
"600/600 [==============================] - 6s 10ms/step - loss: 238604269.9767 - mean_squared_error: 238604269.9767 - val_loss: 259515504.0000 - val_mean_squared_error: 259515504.0000\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Epoch 85/100\n",
|
||||
"600/600 [==============================] - 4s 6ms/step - loss: 239357600.3993 - mean_squared_error: 239357600.3993 - val_loss: 258469696.0000 - val_mean_squared_error: 258469696.0000\n",
|
||||
"Epoch 86/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 250585435.0483 - mean_squared_error: 250585435.0483 - val_loss: 257148032.0000 - val_mean_squared_error: 257148032.0000\n",
|
||||
"Epoch 87/100\n",
|
||||
"600/600 [==============================] - 4s 6ms/step - loss: 241135506.1564 - mean_squared_error: 241135506.1564 - val_loss: 255790992.0000 - val_mean_squared_error: 255790992.0000\n",
|
||||
"Epoch 88/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 236478667.7005 - mean_squared_error: 236478667.7005 - val_loss: 255462960.0000 - val_mean_squared_error: 255462960.0000\n",
|
||||
"Epoch 89/100\n",
|
||||
"600/600 [==============================] - 4s 7ms/step - loss: 255623276.9917 - mean_squared_error: 255623276.9917 - val_loss: 256298672.0000 - val_mean_squared_error: 256298672.0000\n",
|
||||
"Epoch 90/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 225196806.3095 - mean_squared_error: 225196806.3095 - val_loss: 258884368.0000 - val_mean_squared_error: 258884368.0000\n",
|
||||
"Epoch 91/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 240176409.9700 - mean_squared_error: 240176409.9700 - val_loss: 257321488.0000 - val_mean_squared_error: 257321488.0000\n",
|
||||
"Epoch 92/100\n",
|
||||
"600/600 [==============================] - 5s 9ms/step - loss: 239258905.3710 - mean_squared_error: 239258905.3710 - val_loss: 260538288.0000 - val_mean_squared_error: 260538288.0000\n",
|
||||
"Epoch 93/100\n",
|
||||
"600/600 [==============================] - 5s 9ms/step - loss: 245292192.2130 - mean_squared_error: 245292192.2130 - val_loss: 255793472.0000 - val_mean_squared_error: 255793472.0000\n",
|
||||
"Epoch 94/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 243730631.4542 - mean_squared_error: 243730631.4542 - val_loss: 255217168.0000 - val_mean_squared_error: 255217168.0000\n",
|
||||
"Epoch 95/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 241191757.3378 - mean_squared_error: 241191757.3378 - val_loss: 258455520.0000 - val_mean_squared_error: 258455520.0000\n",
|
||||
"Epoch 96/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 234345852.6057 - mean_squared_error: 234345852.6057 - val_loss: 259143584.0000 - val_mean_squared_error: 259143584.0000\n",
|
||||
"Epoch 97/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 237245952.2130 - mean_squared_error: 237245952.2130 - val_loss: 256133552.0000 - val_mean_squared_error: 256133552.0000\n",
|
||||
"Epoch 98/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 246080581.8835 - mean_squared_error: 246080581.8835 - val_loss: 255931216.0000 - val_mean_squared_error: 255931216.0000\n",
|
||||
"Epoch 99/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 259659058.3428 - mean_squared_error: 259659058.3428 - val_loss: 253970368.0000 - val_mean_squared_error: 253970368.0000\n",
|
||||
"Epoch 100/100\n",
|
||||
"600/600 [==============================] - 5s 8ms/step - loss: 251161536.1864 - mean_squared_error: 251161536.1864 - val_loss: 253605840.0000 - val_mean_squared_error: 253605840.0000\n",
|
||||
"RMSE: 18558.15122927888\n",
|
||||
"MSE: 344404977.04878515\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"input_layer = Input(shape=(X_train.shape[1]))\n",
|
||||
"dense_layer_1 = Dense(100, activation='relu')(input_layer)\n",
|
||||
"dense_layer_2 = Dense(50, activation='relu')(dense_layer_1)\n",
|
||||
"dense_layer_3 = Dense(25, activation='relu')(dense_layer_2)\n",
|
||||
"output = Dense(1)(dense_layer_3)\n",
|
||||
"\n",
|
||||
"model = Model(inputs=input_layer, outputs=output)\n",
|
||||
"model.compile(loss=\"mean_squared_error\", optimizer=\"adam\", metrics=[\"mean_squared_error\"])\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"model.fit(X_train, Y_train, batch_size=64, epochs=100, verbose=1, validation_split=0.2)\n",
|
||||
"y_pred = model.predict(X_test)\n",
|
||||
"\n",
|
||||
"print(f\"RMSE: {mean_squared_error(Y_test, y_pred, squared=False)}\")\n",
|
||||
"print(f\"MSE: {mean_squared_error(Y_test, y_pred)}\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Gradient Boosting Regressor\n",
|
||||
"\n",
|
||||
"Regresja liniowa z wykorzystaniem technik wzmocnienia gradientowego z wykorzystaniem \n",
|
||||
"sklearn\n",
|
||||
"\n",
|
||||
"## RMSE: 19705.96\n",
|
||||
"## MSE: 388324934.97"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 28,
|
||||
"metadata": {
|
||||
"pycharm": {
|
||||
"name": "#%%\n"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"RMSE: 19705.961914565338\n",
|
||||
"MSE: 388324934.9782996\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"\"\"\"\n",
|
||||
"Gradient Boosting Regressor\n",
|
||||
"\"\"\"\n",
|
||||
"\n",
|
||||
"model = ensemble.GradientBoostingRegressor()\n",
|
||||
"model.fit(X_train, Y_train)\n",
|
||||
"\n",
|
||||
"gradient_predicted = model.predict(X_test)\n",
|
||||
"print(f\"RMSE: {mean_squared_error(Y_test, gradient_predicted, squared=False)}\")\n",
|
||||
"print(f\"MSE: {mean_squared_error(Y_test, gradient_predicted)}\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Podsumowanie\n",
|
||||
"\n",
|
||||
"## 1. Sieć neuronowa \n",
|
||||
"## 2. Gradient Boosting Regressor\n",
|
||||
"## 3. Regresja liniowa\n",
|
||||
"\n",
|
||||
"Najlepsze wyniki zostały osiągnięte przez model sieci neuronowej. Na drugim miejscu plasuje się metoda wzmocnienia gradientowego, a na trzecim regresja liniowa, wynika to z użycia wzmocnienia gradientowego, który pomaga wskazać kierunek, w którym nasz model ma się poprawiać."
|
||||
]
|
||||
}
|
||||
],
|
||||
"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.9.5"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 1
|
||||
}
|
177
requirements.txt
Normal file
177
requirements.txt
Normal file
@ -0,0 +1,177 @@
|
||||
# This file may be used to create an environment using:
|
||||
# $ conda create --name <env> --file <this file>
|
||||
# platform: linux-64
|
||||
_libgcc_mutex=0.1=main
|
||||
_openmp_mutex=4.5=1_gnu
|
||||
_tflow_select=2.3.0=mkl
|
||||
absl-py=0.12.0=py39h06a4308_0
|
||||
aiohttp=3.7.4=py39h27cfd23_1
|
||||
argon2-cffi=20.1.0=py39h27cfd23_1
|
||||
astor=0.8.1=py39h06a4308_0
|
||||
astunparse=1.6.3=py_0
|
||||
async-timeout=3.0.1=py39h06a4308_0
|
||||
async_generator=1.10=pyhd3eb1b0_0
|
||||
attrs=21.2.0=pyhd3eb1b0_0
|
||||
backcall=0.2.0=pyhd3eb1b0_0
|
||||
blas=1.0=mkl
|
||||
bleach=3.3.0=pyhd3eb1b0_0
|
||||
blinker=1.4=py39h06a4308_0
|
||||
brotlipy=0.7.0=py39h27cfd23_1003
|
||||
c-ares=1.17.1=h27cfd23_0
|
||||
ca-certificates=2021.5.25=h06a4308_1
|
||||
cachetools=4.2.2=pyhd3eb1b0_0
|
||||
certifi=2021.5.30=py39h06a4308_0
|
||||
cffi=1.14.5=py39h261ae71_0
|
||||
chardet=3.0.4=py39h06a4308_1003
|
||||
click=8.0.1=pyhd3eb1b0_0
|
||||
coverage=5.5=py39h27cfd23_2
|
||||
cryptography=3.4.7=py39hd23ed53_0
|
||||
cython=0.29.23=py39h2531618_0
|
||||
daal4py=2021.2.2=py39ha9443f7_0
|
||||
dal=2021.2.2=h06a4308_389
|
||||
dbus=1.13.18=hb2f20db_0
|
||||
decorator=5.0.9=pyhd3eb1b0_0
|
||||
defusedxml=0.7.1=pyhd3eb1b0_0
|
||||
entrypoints=0.3=py39h06a4308_0
|
||||
expat=2.4.1=h2531618_2
|
||||
fontconfig=2.13.1=h6c09931_0
|
||||
freetype=2.10.4=h5ab3b9f_0
|
||||
gast=0.4.0=py_0
|
||||
glib=2.68.2=h36276a3_0
|
||||
google-auth=1.30.1=pyhd3eb1b0_0
|
||||
google-auth-oauthlib=0.4.4=pyhd3eb1b0_0
|
||||
google-pasta=0.2.0=py_0
|
||||
grpcio=1.36.1=py39h2157cd5_1
|
||||
gst-plugins-base=1.14.0=h8213a91_2
|
||||
gstreamer=1.14.0=h28cd5cc_2
|
||||
h5py=2.10.0=py39hec9cf62_0
|
||||
hdf5=1.10.6=hb1b8bf9_0
|
||||
icu=58.2=he6710b0_3
|
||||
idna=2.10=pyhd3eb1b0_0
|
||||
importlib-metadata=3.10.0=py39h06a4308_0
|
||||
importlib_metadata=3.10.0=hd3eb1b0_0
|
||||
intel-openmp=2021.2.0=h06a4308_610
|
||||
ipykernel=5.3.4=py39hb070fc8_0
|
||||
ipython=7.22.0=py39hb070fc8_0
|
||||
ipython_genutils=0.2.0=pyhd3eb1b0_1
|
||||
ipywidgets=7.6.3=pyhd3eb1b0_1
|
||||
jedi=0.17.2=py39h06a4308_1
|
||||
jinja2=3.0.0=pyhd3eb1b0_0
|
||||
joblib=1.0.1=pyhd3eb1b0_0
|
||||
jpeg=9b=h024ee3a_2
|
||||
jsonschema=3.2.0=py_2
|
||||
jupyter=1.0.0=py39h06a4308_7
|
||||
jupyter_client=6.1.12=pyhd3eb1b0_0
|
||||
jupyter_console=6.4.0=pyhd3eb1b0_0
|
||||
jupyter_core=4.7.1=py39h06a4308_0
|
||||
jupyterlab_pygments=0.1.2=py_0
|
||||
jupyterlab_widgets=1.0.0=pyhd3eb1b0_1
|
||||
keras-preprocessing=1.1.2=pyhd3eb1b0_0
|
||||
ld_impl_linux-64=2.35.1=h7274673_9
|
||||
libffi=3.3=he6710b0_2
|
||||
libgcc-ng=9.3.0=h5101ec6_17
|
||||
libgfortran-ng=7.5.0=ha8ba4b0_17
|
||||
libgfortran4=7.5.0=ha8ba4b0_17
|
||||
libgomp=9.3.0=h5101ec6_17
|
||||
libpng=1.6.37=hbc83047_0
|
||||
libprotobuf=3.14.0=h8c45485_0
|
||||
libsodium=1.0.18=h7b6447c_0
|
||||
libstdcxx-ng=9.3.0=hd4cf53a_17
|
||||
libuuid=1.0.3=h1bed415_2
|
||||
libxcb=1.14=h7b6447c_0
|
||||
libxml2=2.9.10=hb55368b_3
|
||||
markdown=3.3.4=py39h06a4308_0
|
||||
markupsafe=2.0.1=py39h27cfd23_0
|
||||
mistune=0.8.4=py39h27cfd23_1000
|
||||
mkl=2021.2.0=h06a4308_296
|
||||
mkl-service=2.3.0=py39h27cfd23_1
|
||||
mkl_fft=1.3.0=py39h42c9631_2
|
||||
mkl_random=1.2.1=py39ha9443f7_2
|
||||
mpi=1.0=mpich
|
||||
mpich=3.3.2=hc856adb_0
|
||||
multidict=5.1.0=py39h27cfd23_2
|
||||
nbclient=0.5.3=pyhd3eb1b0_0
|
||||
nbconvert=6.0.7=py39h06a4308_0
|
||||
nbformat=5.1.3=pyhd3eb1b0_0
|
||||
ncurses=6.2=he6710b0_1
|
||||
nest-asyncio=1.5.1=pyhd3eb1b0_0
|
||||
notebook=6.4.0=py39h06a4308_0
|
||||
numpy=1.20.2=py39h2d18471_0
|
||||
numpy-base=1.20.2=py39hfae3a4d_0
|
||||
oauthlib=3.1.1=pyhd3eb1b0_0
|
||||
openssl=1.1.1k=h27cfd23_0
|
||||
opt_einsum=3.3.0=pyhd3eb1b0_1
|
||||
packaging=20.9=pyhd3eb1b0_0
|
||||
pandas=1.2.4=py39h2531618_0
|
||||
pandoc=2.12=h06a4308_0
|
||||
pandocfilters=1.4.3=py39h06a4308_1
|
||||
parso=0.7.0=py_0
|
||||
pcre=8.44=he6710b0_0
|
||||
pexpect=4.8.0=pyhd3eb1b0_3
|
||||
pickleshare=0.7.5=pyhd3eb1b0_1003
|
||||
pip=21.1.2=py39h06a4308_0
|
||||
prometheus_client=0.11.0=pyhd3eb1b0_0
|
||||
prompt-toolkit=3.0.17=pyh06a4308_0
|
||||
prompt_toolkit=3.0.17=hd3eb1b0_0
|
||||
protobuf=3.14.0=py39h2531618_1
|
||||
ptyprocess=0.7.0=pyhd3eb1b0_2
|
||||
pyasn1=0.4.8=py_0
|
||||
pyasn1-modules=0.2.8=py_0
|
||||
pycparser=2.20=py_2
|
||||
pygments=2.9.0=pyhd3eb1b0_0
|
||||
pyjwt=2.1.0=py39h06a4308_0
|
||||
pyopenssl=20.0.1=pyhd3eb1b0_1
|
||||
pyparsing=2.4.7=pyhd3eb1b0_0
|
||||
pyqt=5.9.2=py39h2531618_6
|
||||
pyrsistent=0.17.3=py39h27cfd23_0
|
||||
pysocks=1.7.1=py39h06a4308_0
|
||||
python=3.9.5=h12debd9_4
|
||||
python-dateutil=2.8.1=pyhd3eb1b0_0
|
||||
python-flatbuffers=1.12=pyhd3eb1b0_0
|
||||
pytz=2021.1=pyhd3eb1b0_0
|
||||
pyzmq=20.0.0=py39h2531618_1
|
||||
qt=5.9.7=h5867ecd_1
|
||||
qtconsole=5.1.0=pyhd3eb1b0_0
|
||||
qtpy=1.9.0=py_0
|
||||
readline=8.1=h27cfd23_0
|
||||
requests=2.25.1=pyhd3eb1b0_0
|
||||
requests-oauthlib=1.3.0=py_0
|
||||
rsa=4.7.2=pyhd3eb1b0_1
|
||||
scikit-learn=0.24.2=py39ha9443f7_0
|
||||
scikit-learn-intelex=2021.2.2=py39h06a4308_0
|
||||
scipy=1.6.2=py39had2a1c9_1
|
||||
send2trash=1.5.0=pyhd3eb1b0_1
|
||||
setuptools=52.0.0=py39h06a4308_0
|
||||
sip=4.19.13=py39h2531618_0
|
||||
six=1.15.0=py39h06a4308_0
|
||||
sqlite=3.35.4=hdfb4753_0
|
||||
tbb=2021.2.0=hff7bd54_0
|
||||
tensorboard=2.4.0=pyhc547734_0
|
||||
tensorboard-plugin-wit=1.6.0=py_0
|
||||
tensorflow=2.4.1=mkl_py39h4683426_0
|
||||
tensorflow-addons=0.13.0=pypi_0
|
||||
tensorflow-base=2.4.1=mkl_py39h43e0292_0
|
||||
tensorflow-estimator=2.5.0=pyh7b7c402_0
|
||||
termcolor=1.1.0=py39h06a4308_1
|
||||
terminado=0.9.4=py39h06a4308_0
|
||||
testpath=0.4.4=pyhd3eb1b0_0
|
||||
threadpoolctl=2.1.0=pyh5ca1d4c_0
|
||||
tk=8.6.10=hbc83047_0
|
||||
tornado=6.1=py39h27cfd23_0
|
||||
traitlets=5.0.5=pyhd3eb1b0_0
|
||||
typeguard=2.12.1=pypi_0
|
||||
typing-extensions=3.7.4.3=hd3eb1b0_0
|
||||
typing_extensions=3.7.4.3=pyh06a4308_0
|
||||
tzdata=2020f=h52ac0ba_0
|
||||
urllib3=1.26.4=pyhd3eb1b0_0
|
||||
wcwidth=0.2.5=py_0
|
||||
webencodings=0.5.1=py39h06a4308_1
|
||||
werkzeug=1.0.1=pyhd3eb1b0_0
|
||||
wheel=0.36.2=pyhd3eb1b0_0
|
||||
widgetsnbextension=3.5.1=py39h06a4308_0
|
||||
wrapt=1.12.1=py39he8ac12f_1
|
||||
xz=5.2.5=h7b6447c_0
|
||||
yarl=1.6.3=py39h27cfd23_0
|
||||
zeromq=4.3.4=h2531618_0
|
||||
zipp=3.4.1=pyhd3eb1b0_0
|
||||
zlib=1.2.11=h7b6447c_3
|
48002
train/train.tsv
Normal file
48002
train/train.tsv
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user