diff --git a/22-06-17-DL/Diamond_custom.ipynb b/22-06-17-DL/Diamond_custom.ipynb
new file mode 100644
index 0000000..2e67993
--- /dev/null
+++ b/22-06-17-DL/Diamond_custom.ipynb
@@ -0,0 +1,1498 @@
+{
+ "nbformat": 4,
+ "nbformat_minor": 0,
+ "metadata": {
+ "colab": {
+ "name": "Keras.ipynb",
+ "provenance": [],
+ "toc_visible": true,
+ "authorship_tag": "ABX9TyMHa43EodRi7Ii/GrWrt/mn",
+ "include_colab_link": true
+ },
+ "kernelspec": {
+ "name": "python3",
+ "display_name": "Python 3"
+ },
+ "language_info": {
+ "name": "python"
+ }
+ },
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "view-in-github",
+ "colab_type": "text"
+ },
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "DataSet: https://www.kaggle.com/datasets/shivam2503/diamonds"
+ ],
+ "metadata": {
+ "id": "6e_s7G9AmmF4"
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "2_wrKy6tmWDP",
+ "outputId": "79d314a2-77be-426b-db75-c0cc73cc8cdd"
+ },
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "Archive: /content/archive.zip\n",
+ " inflating: diamonds.csv \n"
+ ]
+ }
+ ],
+ "source": [
+ "! unzip /content/archive.zip"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "SEED = 40"
+ ],
+ "metadata": {
+ "id": "bfzq2tmZkLNe"
+ },
+ "execution_count": 12,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "import numpy as np\n",
+ "import pandas as pd"
+ ],
+ "metadata": {
+ "id": "l_YDxihVmtKc"
+ },
+ "execution_count": 4,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "df = pd.read_csv('diamonds.csv')\n",
+ "df.head()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 206
+ },
+ "id": "ZGlvfpy_mybm",
+ "outputId": "5cf885cc-5f38-4698-c8d1-c152b91f8595"
+ },
+ "execution_count": 5,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ " Unnamed: 0 carat cut color clarity depth table price x y \\\n",
+ "0 1 0.23 Ideal E SI2 61.5 55.0 326 3.95 3.98 \n",
+ "1 2 0.21 Premium E SI1 59.8 61.0 326 3.89 3.84 \n",
+ "2 3 0.23 Good E VS1 56.9 65.0 327 4.05 4.07 \n",
+ "3 4 0.29 Premium I VS2 62.4 58.0 334 4.20 4.23 \n",
+ "4 5 0.31 Good J SI2 63.3 58.0 335 4.34 4.35 \n",
+ "\n",
+ " z \n",
+ "0 2.43 \n",
+ "1 2.31 \n",
+ "2 2.31 \n",
+ "3 2.63 \n",
+ "4 2.75 "
+ ],
+ "text/html": [
+ "\n",
+ "
\n",
+ "
\n",
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Unnamed: 0 | \n",
+ " carat | \n",
+ " cut | \n",
+ " color | \n",
+ " clarity | \n",
+ " depth | \n",
+ " table | \n",
+ " price | \n",
+ " x | \n",
+ " y | \n",
+ " z | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 1 | \n",
+ " 0.23 | \n",
+ " Ideal | \n",
+ " E | \n",
+ " SI2 | \n",
+ " 61.5 | \n",
+ " 55.0 | \n",
+ " 326 | \n",
+ " 3.95 | \n",
+ " 3.98 | \n",
+ " 2.43 | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " 2 | \n",
+ " 0.21 | \n",
+ " Premium | \n",
+ " E | \n",
+ " SI1 | \n",
+ " 59.8 | \n",
+ " 61.0 | \n",
+ " 326 | \n",
+ " 3.89 | \n",
+ " 3.84 | \n",
+ " 2.31 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 3 | \n",
+ " 0.23 | \n",
+ " Good | \n",
+ " E | \n",
+ " VS1 | \n",
+ " 56.9 | \n",
+ " 65.0 | \n",
+ " 327 | \n",
+ " 4.05 | \n",
+ " 4.07 | \n",
+ " 2.31 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " 4 | \n",
+ " 0.29 | \n",
+ " Premium | \n",
+ " I | \n",
+ " VS2 | \n",
+ " 62.4 | \n",
+ " 58.0 | \n",
+ " 334 | \n",
+ " 4.20 | \n",
+ " 4.23 | \n",
+ " 2.63 | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " 5 | \n",
+ " 0.31 | \n",
+ " Good | \n",
+ " J | \n",
+ " SI2 | \n",
+ " 63.3 | \n",
+ " 58.0 | \n",
+ " 335 | \n",
+ " 4.34 | \n",
+ " 4.35 | \n",
+ " 2.75 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
\n",
+ "
\n",
+ " \n",
+ " \n",
+ "\n",
+ " \n",
+ "
\n",
+ "
\n",
+ " "
+ ]
+ },
+ "metadata": {},
+ "execution_count": 5
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "df.drop('Unnamed: 0', axis=1, inplace = True)"
+ ],
+ "metadata": {
+ "id": "ggmAfo5qp4Ss"
+ },
+ "execution_count": 6,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "df.isna().sum()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "3-4KdSBOm3xG",
+ "outputId": "0f6a0062-e0f8-4eed-9c65-fe4fce55b17b"
+ },
+ "execution_count": 7,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "carat 0\n",
+ "cut 0\n",
+ "color 0\n",
+ "clarity 0\n",
+ "depth 0\n",
+ "table 0\n",
+ "price 0\n",
+ "x 0\n",
+ "y 0\n",
+ "z 0\n",
+ "dtype: int64"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 7
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "df.info()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "GVJ1LszMnLsX",
+ "outputId": "ddb8256d-9fc3-4f18-9c29-c83dd12961e1"
+ },
+ "execution_count": 8,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "\n",
+ "RangeIndex: 53940 entries, 0 to 53939\n",
+ "Data columns (total 10 columns):\n",
+ " # Column Non-Null Count Dtype \n",
+ "--- ------ -------------- ----- \n",
+ " 0 carat 53940 non-null float64\n",
+ " 1 cut 53940 non-null object \n",
+ " 2 color 53940 non-null object \n",
+ " 3 clarity 53940 non-null object \n",
+ " 4 depth 53940 non-null float64\n",
+ " 5 table 53940 non-null float64\n",
+ " 6 price 53940 non-null int64 \n",
+ " 7 x 53940 non-null float64\n",
+ " 8 y 53940 non-null float64\n",
+ " 9 z 53940 non-null float64\n",
+ "dtypes: float64(6), int64(1), object(3)\n",
+ "memory usage: 4.1+ MB\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "from sklearn.preprocessing import OrdinalEncoder\n",
+ "\n",
+ "cut = ['Fair', 'Good', 'Very Good', 'Premium', 'Ideal']\n",
+ "color = ['D', 'E', 'F', 'G', 'H', 'I', 'J']\n",
+ "clarity = ['I1', 'SI2', 'SI1', 'VS2', 'VS1', 'VVS2', 'VVS1', 'IF']\n",
+ "\n",
+ "oe = OrdinalEncoder(categories = [cut, color, clarity])\n",
+ "oe.fit_transform(df[['cut', 'color', 'clarity']])"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "YzNS0HzEnv91",
+ "outputId": "61f3bc82-be65-4fdb-a110-61658006d263"
+ },
+ "execution_count": 9,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "array([[4., 1., 1.],\n",
+ " [3., 1., 2.],\n",
+ " [1., 1., 4.],\n",
+ " ...,\n",
+ " [2., 0., 2.],\n",
+ " [3., 4., 1.],\n",
+ " [4., 0., 1.]])"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 9
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "from sklearn.compose import ColumnTransformer\n",
+ "from sklearn.preprocessing import StandardScaler\n",
+ "\n",
+ "df['xyz'] = df['x']*df['y']*df['z']\n",
+ "\n",
+ "real_num = ['carat','depth','table', 'x','y','z', 'xyz']\n",
+ "cl = ColumnTransformer([\n",
+ " ('1', OrdinalEncoder(categories = [cut, color, clarity]), ['cut', 'color', 'clarity']),\n",
+ " ('2', StandardScaler(),real_num)\n",
+ "])\n",
+ "\n"
+ ],
+ "metadata": {
+ "id": "gIR-vkMHnNWO"
+ },
+ "execution_count": 10,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "Y = df['price']\n",
+ "X = df.drop('price', axis=1)\n",
+ "\n",
+ "X = cl.fit_transform(X)\n",
+ "X = StandardScaler().fit_transform(X)"
+ ],
+ "metadata": {
+ "id": "KxNuja7LpyU7"
+ },
+ "execution_count": 28,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "X.shape"
+ ],
+ "metadata": {
+ "id": "4DybCoG9kijg",
+ "outputId": "9ba34c78-2c71-4be4-f3ea-9b0400c0a5d7",
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ }
+ },
+ "execution_count": 29,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "(53940, 10)"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 29
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "from sklearn.model_selection import train_test_split\n",
+ "\n",
+ "xtrain, xtest, ytrain, ytest = train_test_split(X, Y, random_state = SEED)"
+ ],
+ "metadata": {
+ "id": "uLVGkYvWqLtR"
+ },
+ "execution_count": 30,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "from sklearn.linear_model import LinearRegression\n",
+ "from sklearn.metrics import mean_squared_error\n",
+ "\n",
+ "lin = LinearRegression()\n",
+ "lin.fit(xtrain, ytrain)\n",
+ "\n",
+ "mean_squared_error(ytest, lin.predict(xtest))"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "PfIerOxzqgEw",
+ "outputId": "839346b2-f682-4ffd-8317-f6833df7e00f"
+ },
+ "execution_count": 31,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "1498228.1729978432"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 31
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Keras"
+ ],
+ "metadata": {
+ "id": "-2Khue1sq47v"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "(X.shape[1],)"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "SviZAZELrLQT",
+ "outputId": "8e419068-b606-44fd-99b7-ded8dda8a0cf"
+ },
+ "execution_count": 16,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "(10,)"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 16
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "import tensorflow as tf"
+ ],
+ "metadata": {
+ "id": "C55_zzG0q1LE"
+ },
+ "execution_count": 17,
+ "outputs": []
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "Weight Init https://www.tensorflow.org/api_docs/python/tf/keras/initializers"
+ ],
+ "metadata": {
+ "id": "9gv5tdXklK0z"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "model = tf.keras.Sequential([\n",
+ " tf.keras.Input(shape=(X.shape[1],), name='input'),\n",
+ " tf.keras.layers.Dense(20, activation='leaky_relu', kernel_initializer='he_uniform', name='dense_1'),\n",
+ " tf.keras.layers.Dense(10, activation='leaky_relu', kernel_initializer='he_uniform', name='dense_2'),\n",
+ " tf.keras.layers.Dense(1, activation='linear', name='output'),\n",
+ "])\n",
+ "model.summary()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "OPD93aYyq8hj",
+ "outputId": "6df73215-4297-4d2d-f12f-3c4701e9d53c"
+ },
+ "execution_count": 32,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "Model: \"sequential_1\"\n",
+ "_________________________________________________________________\n",
+ " Layer (type) Output Shape Param # \n",
+ "=================================================================\n",
+ " dense_1 (Dense) (None, 20) 220 \n",
+ " \n",
+ " dense_2 (Dense) (None, 10) 210 \n",
+ " \n",
+ " output (Dense) (None, 1) 11 \n",
+ " \n",
+ "=================================================================\n",
+ "Total params: 441\n",
+ "Trainable params: 441\n",
+ "Non-trainable params: 0\n",
+ "_________________________________________________________________\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Layers\n",
+ "\n",
+ "\n",
+ "\n",
+ "* `get_layer()`\n",
+ "* `get_weights`\n",
+ "* `set_weights`\n",
+ "\n"
+ ],
+ "metadata": {
+ "id": "NrZvXwPZu78I"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "# model.layers[1].name\n",
+ "model.get_layer('dense_2').name"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 35
+ },
+ "id": "G81upI49sdur",
+ "outputId": "cfc15da8-f36a-4f0c-9ec4-750257fa4dd8"
+ },
+ "execution_count": 19,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "'dense_2'"
+ ],
+ "application/vnd.google.colaboratory.intrinsic+json": {
+ "type": "string"
+ }
+ },
+ "metadata": {},
+ "execution_count": 19
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "model.get_layer('dense_2').trainable = False\n",
+ "\n",
+ "model.summary()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "ym6z-0r2uh_Q",
+ "outputId": "2da97e6d-6008-4407-89c3-b5c7ae825596"
+ },
+ "execution_count": 20,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "Model: \"sequential\"\n",
+ "_________________________________________________________________\n",
+ " Layer (type) Output Shape Param # \n",
+ "=================================================================\n",
+ " dense_1 (Dense) (None, 20) 220 \n",
+ " \n",
+ " dense_2 (Dense) (None, 10) 210 \n",
+ " \n",
+ " output (Dense) (None, 1) 11 \n",
+ " \n",
+ "=================================================================\n",
+ "Total params: 441\n",
+ "Trainable params: 231\n",
+ "Non-trainable params: 210\n",
+ "_________________________________________________________________\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "model.trainable = True\n",
+ "model.summary()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "JTjwvss-umXM",
+ "outputId": "d359f3fb-bf7b-4a3e-d6dd-2e530f773376"
+ },
+ "execution_count": 21,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "Model: \"sequential\"\n",
+ "_________________________________________________________________\n",
+ " Layer (type) Output Shape Param # \n",
+ "=================================================================\n",
+ " dense_1 (Dense) (None, 20) 220 \n",
+ " \n",
+ " dense_2 (Dense) (None, 10) 210 \n",
+ " \n",
+ " output (Dense) (None, 1) 11 \n",
+ " \n",
+ "=================================================================\n",
+ "Total params: 441\n",
+ "Trainable params: 441\n",
+ "Non-trainable params: 0\n",
+ "_________________________________________________________________\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "weights, biases = model.get_layer('dense_2').get_weights()\n",
+ "weights.shape, biases.shape"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "911lkX7evCUf",
+ "outputId": "679dbae6-c373-4704-a5da-3632aa4f5872"
+ },
+ "execution_count": 23,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "((20, 10), (10,))"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 23
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "model.get_layer('dense_2').set_weights((weights, biases))"
+ ],
+ "metadata": {
+ "id": "Jj88lZqmve7e"
+ },
+ "execution_count": 24,
+ "outputs": []
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Training"
+ ],
+ "metadata": {
+ "id": "BdQxG6kpwMbX"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "optimizer = tf.keras.optimizers.Adam(\n",
+ " learning_rate=0.01,\n",
+ " beta_1=0.9,\n",
+ " beta_2=0.999,\n",
+ " epsilon=1e-07,\n",
+ " amsgrad=False,\n",
+ " name=\"Adam\",\n",
+ ")\n",
+ "\n",
+ "model.compile(\n",
+ " optimizer = optimizer,\n",
+ " loss = 'mse',\n",
+ " metrics = ['mae']\n",
+ ")"
+ ],
+ "metadata": {
+ "id": "1vGyBjajwD_L"
+ },
+ "execution_count": 33,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "history = model.fit(xtrain, ytrain, epochs=20, batch_size=32, validation_data=(xtest, ytest))"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "loHCOYGCxSZi",
+ "outputId": "10b44359-8e5b-44ae-d20c-b54c1430750f"
+ },
+ "execution_count": 34,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "Epoch 1/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 4126269.2500 - mae: 1155.9417 - val_loss: 1013396.1875 - val_mae: 628.8307\n",
+ "Epoch 2/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 1071703.1250 - mae: 560.4971 - val_loss: 798690.7500 - val_mae: 525.2033\n",
+ "Epoch 3/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 872668.1250 - mae: 505.2391 - val_loss: 727379.6875 - val_mae: 484.0403\n",
+ "Epoch 4/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 731504.0000 - mae: 464.1201 - val_loss: 664893.0625 - val_mae: 453.8429\n",
+ "Epoch 5/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 653399.3125 - mae: 441.1927 - val_loss: 612473.5625 - val_mae: 426.9374\n",
+ "Epoch 6/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 613934.8125 - mae: 422.3171 - val_loss: 599795.4375 - val_mae: 415.0961\n",
+ "Epoch 7/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 594179.2500 - mae: 415.1149 - val_loss: 588223.5625 - val_mae: 424.5157\n",
+ "Epoch 8/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 581641.4375 - mae: 411.0179 - val_loss: 560804.5000 - val_mae: 420.3340\n",
+ "Epoch 9/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 567633.8125 - mae: 405.9885 - val_loss: 580659.1875 - val_mae: 405.4107\n",
+ "Epoch 10/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 549532.5000 - mae: 402.3339 - val_loss: 524761.0625 - val_mae: 398.7661\n",
+ "Epoch 11/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 544760.6250 - mae: 398.9495 - val_loss: 512673.5625 - val_mae: 392.6149\n",
+ "Epoch 12/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 513657.9375 - mae: 390.3521 - val_loss: 497101.1562 - val_mae: 381.3392\n",
+ "Epoch 13/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 503235.5312 - mae: 383.9448 - val_loss: 485992.5312 - val_mae: 378.1144\n",
+ "Epoch 14/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 487951.0938 - mae: 379.6519 - val_loss: 463189.7500 - val_mae: 371.7734\n",
+ "Epoch 15/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 485077.0625 - mae: 377.6407 - val_loss: 475196.0625 - val_mae: 383.2153\n",
+ "Epoch 16/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 474165.5312 - mae: 374.8802 - val_loss: 480229.4375 - val_mae: 398.1135\n",
+ "Epoch 17/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 470443.9062 - mae: 374.5289 - val_loss: 452923.6250 - val_mae: 365.0916\n",
+ "Epoch 18/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 458504.0312 - mae: 372.3924 - val_loss: 442998.0312 - val_mae: 365.8562\n",
+ "Epoch 19/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 456432.1562 - mae: 372.0327 - val_loss: 515682.5625 - val_mae: 403.4404\n",
+ "Epoch 20/20\n",
+ "1265/1265 [==============================] - 3s 2ms/step - loss: 450242.7812 - mae: 369.8306 - val_loss: 440685.7188 - val_mae: 359.1219\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "pd.DataFrame(history.history).plot()\n",
+ "# history.history"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 293
+ },
+ "id": "Fq5no1R4yRW4",
+ "outputId": "a1a2f667-d4dd-4382-d6a2-ef9d17b30f7e"
+ },
+ "execution_count": 36,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "execution_count": 36
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "