From 7aca36cfe234651fa0bd76e70f35336b1172808c Mon Sep 17 00:00:00 2001 From: Avdhesh-Varshney <114330097+Avdhesh-Varshney@users.noreply.github.com> Date: Sun, 7 Jan 2024 01:11:07 +0530 Subject: [PATCH] =?UTF-8?q?Singaporean=20Cryptocurrency=20Analysis=20?= =?UTF-8?q?=F0=9F=93=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dataset/README.md | 1 + .../Models/README.md | 47 + .../singaporean_cryptocurrency_analysis.ipynb | 5429 +++++++++++++++++ .../requirements.txt | 8 + 4 files changed, 5485 insertions(+) create mode 100644 Singaporean Cryptocurrency Analysis/Dataset/README.md create mode 100644 Singaporean Cryptocurrency Analysis/Models/README.md create mode 100644 Singaporean Cryptocurrency Analysis/Models/singaporean_cryptocurrency_analysis.ipynb create mode 100644 Singaporean Cryptocurrency Analysis/requirements.txt diff --git a/Singaporean Cryptocurrency Analysis/Dataset/README.md b/Singaporean Cryptocurrency Analysis/Dataset/README.md new file mode 100644 index 000000000..1ae4d2ae5 --- /dev/null +++ b/Singaporean Cryptocurrency Analysis/Dataset/README.md @@ -0,0 +1 @@ +The Dataset is used here is taken from the Kaggle database website. You can download the file from the link given here, [Singaporean Cryptocurrency Analysis](https://www.kaggle.com/datasets/imperialwarrior/singapore-crypto) diff --git a/Singaporean Cryptocurrency Analysis/Models/README.md b/Singaporean Cryptocurrency Analysis/Models/README.md new file mode 100644 index 000000000..a87777224 --- /dev/null +++ b/Singaporean Cryptocurrency Analysis/Models/README.md @@ -0,0 +1,47 @@ +

Singaporean Cryptocurrency Anlaysis

+ +**GOAL** + +To analyze the Singaporean Dataset using Exploratory Data analysis. + +**DATASET** + +https://www.kaggle.com/datasets/imperialwarrior/singapore-crypto + +**DESCRIPTION** + +To analyze the dataset of Singaporean Cryptocurrency Analysis + +**WHAT I HAD DONE** + +* Checked for first dataset values out of 7537 datasets. +* Checked for missing values and cleaned the data accordingly. +* Analyzed the data, found insights and visualized them accordingly. +* Found detailed insights of different columns with target variable using plotting libraries. +* Train the datasets by different models and saves their accuracies into a dataframe. + + +**LIBRARIES NEEDED** + +1. Pandas +2. Plotly +3. Sklearn +4. NumPy +5. XGBoost +6. Tensorflow +7. Keras + + +**CONCLUSION** + +- Linear Regression and Decision Tree Regression Models are best fitted to the datasets. +- Accuracy achieved is around 99.5 %. +- LSTM Model also perfoms well on the datasets as their MSE and R2 scores are very much good. + + +**YOUR NAME** + +*Avdhesh Varshney* + +[![LinkedIn](https://img.shields.io/badge/linkedin-%230077B5.svg?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/avdhesh-varshney-5314a4233/) [![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/Avdhesh-Varshney) + diff --git a/Singaporean Cryptocurrency Analysis/Models/singaporean_cryptocurrency_analysis.ipynb b/Singaporean Cryptocurrency Analysis/Models/singaporean_cryptocurrency_analysis.ipynb new file mode 100644 index 000000000..44daed41f --- /dev/null +++ b/Singaporean Cryptocurrency Analysis/Models/singaporean_cryptocurrency_analysis.ipynb @@ -0,0 +1,5429 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [], + "gpuType": "T4" + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + } + }, + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "RauUxNMxrQiM", + "outputId": "967e30ee-f8fb-45ef-e375-c2a675a08ca3" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n" + ] + } + ], + "source": [ + "# Mount google drive in colab\n", + "from google.colab import drive\n", + "drive.mount('/content/drive')\n", + "\n", + "# Connect kaggle in colab\n", + "!pip install -q kaggle\n", + "!mkdir -p ~/.kaggle\n", + "!cp /content/drive/MyDrive/kaggle.json ~/.kaggle/\n", + "!chmod 600 ~/.kaggle/kaggle.json\n", + "\n", + "# Set the environment variable for Kaggle API key\n", + "import os\n", + "os.environ['KAGGLE_CONFIG_DIR'] = '/root/.kaggle/'\n", + "\n", + "# Now you can use Kaggle API to download datasets\n", + "import kaggle\n", + "kaggle.api.authenticate()\n", + "\n", + "# Replace 'username/dataset-name' with the actual dataset you want to download\n", + "kaggle.api.dataset_download_files('imperialwarrior/singapore-crypto', unzip=True)\n" + ] + }, + { + "cell_type": "markdown", + "source": [ + "# Singaporean Cryptocurrency Analysis using DL\n", + "\n", + "- Dataset from Kaggle [Link](https://www.kaggle.com/datasets/imperialwarrior/singapore-crypto?rvi=1)" + ], + "metadata": { + "id": "jB7MgbYaRcgg" + } + }, + { + "cell_type": "markdown", + "source": [ + "### Importing necessary Modules and Libraries" + ], + "metadata": { + "id": "g-yNQMaqRxgZ" + } + }, + { + "cell_type": "code", + "source": [ + "import pandas as pd\n", + "import numpy as np\n", + "import os\n", + "\n", + "import plotly.graph_objects as go\n", + "\n", + "from sklearn import preprocessing\n", + "from sklearn.model_selection import train_test_split\n", + "\n", + "# Different models\n", + "from sklearn.linear_model import LinearRegression, Ridge\n", + "from sklearn.ensemble import RandomForestRegressor, GradientBoostingRegressor\n", + "from sklearn.tree import DecisionTreeRegressor\n", + "from xgboost import XGBRegressor\n" + ], + "metadata": { + "id": "33FptWydrjoD" + }, + "execution_count": 2, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## Reading `metadata.csv` file\n", + "- It contains information about the Bit coin Pair Name and Bit Coin Pair Symbol.\n", + "- Along with that it also contains the `Filename` of that bitcoin dataset." + ], + "metadata": { + "id": "b5ylP7S0R2_I" + } + }, + { + "cell_type": "code", + "source": [ + "df = pd.read_csv('/content/metadata.csv')\n", + "print(df.shape)\n", + "df.head()" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 223 + }, + "id": "poU84R80sXKE", + "outputId": "fb2fd440-b18e-426d-8e09-940b27514eae" + }, + "execution_count": 3, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "(7537, 3)\n" + ] + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + " Coin Pair Name Coin Pair Symbol Filename\n", + "0 Bitcoin SGD BTC-SGD BTC-SGD.csv\n", + "1 Ethereum SGD ETH-SGD ETH-SGD.csv\n", + "2 Tether USDt SGD USDT-SGD USDT-SGD.csv\n", + "3 BNB SGD BNB-SGD BNB-SGD.csv\n", + "4 USD Coin SGD USDC-SGD USDC-SGD.csv" + ], + "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", + "
Coin Pair NameCoin Pair SymbolFilename
0Bitcoin SGDBTC-SGDBTC-SGD.csv
1Ethereum SGDETH-SGDETH-SGD.csv
2Tether USDt SGDUSDT-SGDUSDT-SGD.csv
3BNB SGDBNB-SGDBNB-SGD.csv
4USD Coin SGDUSDC-SGDUSDC-SGD.csv
\n", + "
\n", + "
\n", + "\n", + "
\n", + " \n", + "\n", + " \n", + "\n", + " \n", + "
\n", + "\n", + "\n", + "
\n", + " \n", + "\n", + "\n", + "\n", + " \n", + "
\n", + "\n", + "
\n", + "
\n" + ] + }, + "metadata": {}, + "execution_count": 3 + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "### Reading about basic information of file `metadata.csv` like, unique values corresponding to the different columns." + ], + "metadata": { + "id": "zy-Y2EDUSYQJ" + } + }, + { + "cell_type": "code", + "source": [ + "print(len(df['Coin Pair Name'].unique()))\n", + "print(len(df['Coin Pair Symbol'].unique()))\n", + "print(len(df['Filename'].unique()))" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "jWLkbg_0sdYc", + "outputId": "7842b926-d541-416e-d8a3-1fd0a530cebe" + }, + "execution_count": 4, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "7474\n", + "7537\n", + "7537\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "### Let's see the dataset of index 0 i.e., First dataset" + ], + "metadata": { + "id": "W_vOckfvS5kw" + } + }, + { + "cell_type": "code", + "source": [ + "data = pd.read_csv(os.path.join('/content/data/', df['Filename'][0]))\n", + "print(f'Unique elements correspond to Name = {len(data[\"Name\"].unique())}')\n", + "print(f'Unique elements correspond to Symbol = {len(data[\"Symbol\"].unique())}')\n", + "print(f'Shape: ', data.shape)\n", + "data.head()" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 258 + }, + "id": "x6yxJsGwmh6r", + "outputId": "cba0a0c4-cd72-4db3-d673-989e085747d6" + }, + "execution_count": 5, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Unique elements correspond to Name = 1\n", + "Unique elements correspond to Symbol = 1\n", + "Shape: (3383, 9)\n" + ] + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + " Name Symbol Date Open High Low \\\n", + "0 Bitcoin SGD BTC-SGD 2014-09-17 588.148647 591.064995 571.178236 \n", + "1 Bitcoin SGD BTC-SGD 2014-09-18 579.204817 579.204817 523.731201 \n", + "2 Bitcoin SGD BTC-SGD 2014-09-19 537.202785 541.930028 487.079011 \n", + "3 Bitcoin SGD BTC-SGD 2014-09-20 499.924402 536.180566 493.856994 \n", + "4 Bitcoin SGD BTC-SGD 2014-09-21 516.913098 522.411760 498.034510 \n", + "\n", + " Close Adj Close Volume \n", + "0 577.379609 577.379609 21056800 \n", + "1 538.102924 538.102924 34483200 \n", + "2 500.080185 500.080185 37919700 \n", + "3 517.950509 517.950509 36863600 \n", + "4 505.178603 505.178603 26580100 " + ], + "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", + "
NameSymbolDateOpenHighLowCloseAdj CloseVolume
0Bitcoin SGDBTC-SGD2014-09-17588.148647591.064995571.178236577.379609577.37960921056800
1Bitcoin SGDBTC-SGD2014-09-18579.204817579.204817523.731201538.102924538.10292434483200
2Bitcoin SGDBTC-SGD2014-09-19537.202785541.930028487.079011500.080185500.08018537919700
3Bitcoin SGDBTC-SGD2014-09-20499.924402536.180566493.856994517.950509517.95050936863600
4Bitcoin SGDBTC-SGD2014-09-21516.913098522.411760498.034510505.178603505.17860326580100
\n", + "
\n", + "
\n", + "\n", + "
\n", + " \n", + "\n", + " \n", + "\n", + " \n", + "
\n", + "\n", + "\n", + "
\n", + " \n", + "\n", + "\n", + "\n", + " \n", + "
\n", + "\n", + "
\n", + "
\n" + ] + }, + "metadata": {}, + "execution_count": 5 + } + ] + }, + { + "cell_type": "code", + "source": [ + "data.drop(columns=['Name', 'Symbol'], inplace=True)\n", + "data.Date = pd.to_datetime(data.Date)\n", + "data.info()" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "2RSenh-r_rF5", + "outputId": "bac5b018-f7b1-450f-f058-5cb7b12b55d3" + }, + "execution_count": 6, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\n", + "RangeIndex: 3383 entries, 0 to 3382\n", + "Data columns (total 7 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 Date 3383 non-null datetime64[ns]\n", + " 1 Open 3383 non-null float64 \n", + " 2 High 3383 non-null float64 \n", + " 3 Low 3383 non-null float64 \n", + " 4 Close 3383 non-null float64 \n", + " 5 Adj Close 3383 non-null float64 \n", + " 6 Volume 3383 non-null int64 \n", + "dtypes: datetime64[ns](1), float64(5), int64(1)\n", + "memory usage: 185.1 KB\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "### Declaring some global variables after watching the datasets." + ], + "metadata": { + "id": "AxOES7JCSrdP" + } + }, + { + "cell_type": "code", + "source": [ + "filePath = '/content/data/'\n", + "target = 'Close'\n", + "check = 5\n", + "testSize = 0.2\n", + "\n", + "# Training only first 25 Datasets out of 7537 datasets.\n", + "limit = 25\n", + "models = {\n", + " 'Linear Regression': LinearRegression(),\n", + " 'Ridge Regression': Ridge(),\n", + " 'Random Forest Regressor': RandomForestRegressor(),\n", + " 'Decision Tree Regressor': DecisionTreeRegressor(),\n", + " 'Gradient Boosting Regressor': GradientBoostingRegressor(),\n", + " 'XGBoost Regressor': XGBRegressor(objective ='reg:squarederror')\n", + "}" + ], + "metadata": { + "id": "LXvpXMrmXnDk" + }, + "execution_count": 7, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "### Function which can plot the graph of the dataset" + ], + "metadata": { + "id": "d1DNVpl0U1WV" + } + }, + { + "cell_type": "code", + "source": [ + "def plotGraph(data, name):\n", + " figure = go.Figure(data=[go.Candlestick(x=data['Date'],\n", + " open=data['Open'],\n", + " high=data['High'],\n", + " low=data['Low'],\n", + " close=data['Close'])])\n", + "\n", + " figure.update_layout(title=name, xaxis_rangeslider_visible=False)\n", + " figure.show()" + ], + "metadata": { + "id": "jI6C5BjA6QRg" + }, + "execution_count": 8, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "### Splitting the dataset into training, testing, and validation dataset." + ], + "metadata": { + "id": "qVfgfnzXU7hm" + } + }, + { + "cell_type": "code", + "source": [ + "def splitData(dataFrame, testSize=0.2):\n", + " # Preprocessing the datasets\n", + " x = dataFrame[[\"Open\", \"High\", \"Low\", \"Volume\"]]\n", + " y = dataFrame[target]\n", + " x = x.to_numpy()\n", + " y = y.to_numpy()\n", + " y = y.reshape(-1, 1)\n", + "\n", + " # Split the dataset into training and testing sets using train_test_split\n", + " xtrain, xtest, ytrain, ytest = train_test_split(x, y, test_size=testSize, random_state=42)\n", + "\n", + " response = [xtrain, xtest, ytrain, ytest]\n", + " return response\n" + ], + "metadata": { + "id": "KgZlYE_67wGZ" + }, + "execution_count": 9, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "### Function to train the model and return the accuracy to that corresponding dataset." + ], + "metadata": { + "id": "M5SQ7mkcVP88" + } + }, + { + "cell_type": "code", + "source": [ + "def trainModel(xtrain, xtest, ytrain, ytest, fileName):\n", + " # Create an empty DataFrame to store accuracy for the current dataset\n", + " datasetAccuracy = pd.DataFrame(columns=['Dataset'] + list(models.keys()))\n", + "\n", + " # Store the dataset name\n", + " datasetAccuracy['Dataset'] = [fileName]\n", + "\n", + " for modelName, model in models.items():\n", + " # Fit the model\n", + " model.fit(xtrain, ytrain)\n", + "\n", + " # Check the accuracy of the model and its forecasting\n", + " score = model.score(xtest, ytest)\n", + "\n", + " # Store the accuracy in the DataFrame\n", + " datasetAccuracy[modelName] = [score]\n", + "\n", + " return datasetAccuracy\n" + ], + "metadata": { + "id": "VqT_ouIS5XKB" + }, + "execution_count": 10, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "### Function to train the dataset on all the models and get the accuracies on different models." + ], + "metadata": { + "id": "yZyi6wdNDacU" + } + }, + { + "cell_type": "code", + "source": [ + "def trainModels(dataFrame):\n", + " # Initialize an empty DataFrame to store accuracy results\n", + " accuracyDF = pd.DataFrame(columns=['Dataset'] + list(models.keys()))\n", + "\n", + " # Iterate over only limited datasets\n", + " for i in dataFrame.index:\n", + " if i >= limit:\n", + " break\n", + "\n", + " # For a single dataset\n", + " fileName = dataFrame['Filename'][i]\n", + " data = pd.read_csv(os.path.join(filePath, fileName))\n", + "\n", + " # Let's plot the graph of the ith dataset\n", + " plotGraph(data, fileName)\n", + "\n", + " # Split dataset for training and testing purpose\n", + " xtrain, xtest, ytrain, ytest = splitData(data)\n", + "\n", + " # Now, train the model and get the accuracy of all the models\n", + " datasetAccuracy = trainModel(xtrain, xtest, ytrain, ytest, fileName[slice(-4)])\n", + "\n", + " # Append the accuracy for the current dataset to the overall DataFrame\n", + " accuracyDF = accuracyDF.append(datasetAccuracy, ignore_index=True)\n", + "\n", + " return accuracyDF" + ], + "metadata": { + "id": "R7smfeAT9S1X" + }, + "execution_count": 11, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "### Calling the function to train the models on the limited dataset\n", + "\n", + "(because lack of resouces like GPU, RAM, etc.)" + ], + "metadata": { + "id": "0br1OWyEWdZb" + } + }, + { + "cell_type": "code", + "source": [ + "# Call the trainModels function\n", + "accuracies = trainModels(df)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 1000 + }, + "id": "WNPhYEVS-9lK", + "outputId": "dfe8b27d-5244-4f4f-c994-5bb5e511c2c5" + }, + "execution_count": 12, + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=1.46304e-17): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=4.02119e-25): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=1.3842e-17): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=1.60799e-28): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=1.44375e-22): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=3.05175e-22): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=4.04878e-23): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=1.68924e-18): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=3.67734e-22): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=1.78396e-17): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=1.07982e-20): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=1.94815e-19): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=1.89242e-21): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=3.89996e-18): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=2.63595e-22): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=1.29537e-21): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=9.59135e-18): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=1.48274e-20): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "
\n", + "
\n", + "\n", + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.10/dist-packages/sklearn/linear_model/_ridge.py:216: LinAlgWarning:\n", + "\n", + "Ill-conditioned matrix (rcond=2.12519e-21): result may not be accurate.\n", + "\n", + ":10: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", + "\n", + "/usr/local/lib/python3.10/dist-packages/sklearn/ensemble/_gb.py:437: DataConversionWarning:\n", + "\n", + "A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n", + "\n", + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "### Save accuracies of the whole training results into a single csv file named `results.csv`" + ], + "metadata": { + "id": "GJ7rgBoqW4CO" + } + }, + { + "cell_type": "code", + "source": [ + "accuracies.to_csv('results.csv', index=False)" + ], + "metadata": { + "id": "IcEb_Q-lCsD8" + }, + "execution_count": 13, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "### Let us see the saved dataset `results.csv`" + ], + "metadata": { + "id": "NMCYUICyXbb9" + } + }, + { + "cell_type": "code", + "source": [ + "resultsData = pd.read_csv('results.csv')\n", + "print(\"Accuracies of Different models on different datasets!\")\n", + "resultsData" + ], + "metadata": { + "id": "QOGwvRHOXiT1", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 885 + }, + "outputId": "ebd66848-187c-4551-c4d3-25ecad5653bc" + }, + "execution_count": 14, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Accuracies of Different models on different datasets!\n" + ] + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + " Dataset Linear Regression Ridge Regression \\\n", + "0 BTC-SGD 0.999703 0.999703 \n", + "1 ETH-SGD 0.999311 0.999311 \n", + "2 USDT-SGD 0.973631 0.931483 \n", + "3 BNB-SGD 0.999381 0.999381 \n", + "4 USDC-SGD 0.976592 0.880117 \n", + "5 XRP-SGD 0.986789 0.990231 \n", + "6 STETH-SGD 0.997152 0.997152 \n", + "7 ADA-SGD 0.998844 0.998843 \n", + "8 DOGE-SGD 0.997532 0.996282 \n", + "9 WTRX-SGD 0.993193 0.520164 \n", + "10 SOL-SGD 0.998861 0.998861 \n", + "11 TRX-SGD 0.994416 0.970182 \n", + "12 TON11419-SGD 0.987901 0.986923 \n", + "13 DAI-SGD 0.956892 0.863366 \n", + "14 DOT-SGD 0.997157 0.997160 \n", + "15 MATIC-SGD 0.998655 0.998550 \n", + "16 LTC-SGD 0.998378 0.998378 \n", + "17 WBTC-SGD 0.998118 0.998118 \n", + "18 SHIB-SGD 0.997543 0.348902 \n", + "19 BCH-SGD 0.998268 0.998268 \n", + "20 XLM-SGD 0.996184 0.994903 \n", + "21 LEO-SGD 0.998021 0.997750 \n", + "22 AVAX-SGD 0.997976 0.997976 \n", + "23 LINK-SGD 0.998810 0.998809 \n", + "24 TUSD-SGD 0.922381 0.877465 \n", + "\n", + " Random Forest Regressor Decision Tree Regressor \\\n", + "0 0.999468 0.999053 \n", + "1 0.998623 0.998094 \n", + "2 0.965214 0.950597 \n", + "3 0.998764 0.998167 \n", + "4 0.980140 0.969791 \n", + "5 0.991697 0.987660 \n", + "6 0.995287 0.993184 \n", + "7 0.998173 0.995809 \n", + "8 0.996732 0.995176 \n", + "9 0.985621 0.979841 \n", + "10 0.997650 0.997153 \n", + "11 0.981699 0.985031 \n", + "12 0.980488 0.955144 \n", + "13 0.969210 0.955764 \n", + "14 0.996588 0.993182 \n", + "15 0.996827 0.993972 \n", + "16 0.997971 0.995632 \n", + "17 0.992431 0.997462 \n", + "18 0.977479 0.956806 \n", + "19 0.995707 0.992923 \n", + "20 0.995776 0.989450 \n", + "21 0.991283 0.989968 \n", + "22 0.995018 0.990893 \n", + "23 0.997424 0.995608 \n", + "24 0.976368 0.961560 \n", + "\n", + " Gradient Boosting Regressor XGBoost Regressor \n", + "0 0.999401 0.999357 \n", + "1 0.998480 0.998446 \n", + "2 0.963910 0.966679 \n", + "3 0.998875 0.998626 \n", + "4 0.977137 0.979106 \n", + "5 0.991987 0.991860 \n", + "6 0.995217 0.994591 \n", + "7 0.997596 0.997686 \n", + "8 0.996231 0.994917 \n", + "9 0.986519 0.981738 \n", + "10 0.997514 0.997196 \n", + "11 0.984792 0.980132 \n", + "12 0.981399 0.974923 \n", + "13 0.970992 0.966129 \n", + "14 0.996363 0.995526 \n", + "15 0.997526 0.996792 \n", + "16 0.997830 0.996950 \n", + "17 0.994908 0.991558 \n", + "18 0.983012 -0.004916 \n", + "19 0.995370 0.994136 \n", + "20 0.993943 0.995530 \n", + "21 0.994527 0.995926 \n", + "22 0.995090 0.994441 \n", + "23 0.997546 0.996198 \n", + "24 0.964749 0.965890 " + ], + "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", + "
DatasetLinear RegressionRidge RegressionRandom Forest RegressorDecision Tree RegressorGradient Boosting RegressorXGBoost Regressor
0BTC-SGD0.9997030.9997030.9994680.9990530.9994010.999357
1ETH-SGD0.9993110.9993110.9986230.9980940.9984800.998446
2USDT-SGD0.9736310.9314830.9652140.9505970.9639100.966679
3BNB-SGD0.9993810.9993810.9987640.9981670.9988750.998626
4USDC-SGD0.9765920.8801170.9801400.9697910.9771370.979106
5XRP-SGD0.9867890.9902310.9916970.9876600.9919870.991860
6STETH-SGD0.9971520.9971520.9952870.9931840.9952170.994591
7ADA-SGD0.9988440.9988430.9981730.9958090.9975960.997686
8DOGE-SGD0.9975320.9962820.9967320.9951760.9962310.994917
9WTRX-SGD0.9931930.5201640.9856210.9798410.9865190.981738
10SOL-SGD0.9988610.9988610.9976500.9971530.9975140.997196
11TRX-SGD0.9944160.9701820.9816990.9850310.9847920.980132
12TON11419-SGD0.9879010.9869230.9804880.9551440.9813990.974923
13DAI-SGD0.9568920.8633660.9692100.9557640.9709920.966129
14DOT-SGD0.9971570.9971600.9965880.9931820.9963630.995526
15MATIC-SGD0.9986550.9985500.9968270.9939720.9975260.996792
16LTC-SGD0.9983780.9983780.9979710.9956320.9978300.996950
17WBTC-SGD0.9981180.9981180.9924310.9974620.9949080.991558
18SHIB-SGD0.9975430.3489020.9774790.9568060.983012-0.004916
19BCH-SGD0.9982680.9982680.9957070.9929230.9953700.994136
20XLM-SGD0.9961840.9949030.9957760.9894500.9939430.995530
21LEO-SGD0.9980210.9977500.9912830.9899680.9945270.995926
22AVAX-SGD0.9979760.9979760.9950180.9908930.9950900.994441
23LINK-SGD0.9988100.9988090.9974240.9956080.9975460.996198
24TUSD-SGD0.9223810.8774650.9763680.9615600.9647490.965890
\n", + "
\n", + "
\n", + "\n", + "
\n", + " \n", + "\n", + " \n", + "\n", + " \n", + "
\n", + "\n", + "\n", + "
\n", + " \n", + "\n", + "\n", + "\n", + " \n", + "
\n", + "\n", + "
\n", + " \n", + " \n", + " \n", + "
\n", + "\n", + "
\n", + "
\n" + ] + }, + "metadata": {}, + "execution_count": 14 + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "#### Hence, Model training completed, and accuracy of all models on different dataset is stored in the CSV file.\n", + "\n", + "---" + ], + "metadata": { + "id": "p-cYQ12oXrx9" + } + }, + { + "cell_type": "markdown", + "source": [ + "## Let's now train the model on LSTM model" + ], + "metadata": { + "id": "83wIfUG7EHnr" + } + }, + { + "cell_type": "code", + "source": [ + "from keras.models import Sequential\n", + "from keras.layers import Dense, LSTM\n", + "from sklearn.metrics import mean_squared_error, r2_score\n" + ], + "metadata": { + "id": "p9LRWqE6Usa1" + }, + "execution_count": 15, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "#### Now, prepare the LSTM Neural Network" + ], + "metadata": { + "id": "fX4UZ8_5ES8i" + } + }, + { + "cell_type": "code", + "source": [ + "def lstmNeuralNetwork(shape):\n", + " # LSTM neural network building\n", + " model = Sequential()\n", + " model.add(LSTM(128, return_sequences=True, input_shape=(shape, 1)))\n", + " model.add(LSTM(64, return_sequences=False))\n", + " model.add(Dense(25))\n", + " model.add(Dense(1))\n", + " model.summary()\n", + " return model\n" + ], + "metadata": { + "id": "M-u7Jw2lENff" + }, + "execution_count": 16, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "#### Let's train the model and fit the dataset on the model" + ], + "metadata": { + "id": "TVSNsLTbV4dB" + } + }, + { + "cell_type": "code", + "source": [ + "def lstmTrain(xtrain, ytrain, xtest, ytest, model, epochs=30, batchSize=1):\n", + " # Compile this model and fit the dataset on the model\n", + " model.compile(optimizer='adam', loss='mean_squared_error')\n", + " model.fit(xtrain, ytrain, batch_size=batchSize, epochs=epochs)\n", + "\n", + " predictions = model.predict(xtest)\n", + "\n", + " # Calculate Mean Squared Error\n", + " mse = mean_squared_error(ytest, predictions)\n", + "\n", + " # Calculate R2 Score\n", + " r2 = r2_score(ytest, predictions)\n", + "\n", + " return {'mse': mse, 'r2': r2}\n" + ], + "metadata": { + "id": "P380o3wLO3Ru" + }, + "execution_count": 17, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "#### Iterate over all the datasets and fit the on the model and store the accuracy of the model on that corresponding dataset" + ], + "metadata": { + "id": "9oc_9ZNbWDgU" + } + }, + { + "cell_type": "code", + "source": [ + "def lstmModelTrain(dataFrame):\n", + " # Create an empty DataFrame to store accuracy results\n", + " accuracyDF = pd.DataFrame(columns=['Dataset', 'MSE', 'R2'])\n", + "\n", + " # LSTM model building\n", + " model = lstmNeuralNetwork(4)\n", + "\n", + " # Iterate over only limited datasets\n", + " for i in dataFrame.index:\n", + " if i >= limit:\n", + " break\n", + "\n", + " # For a single dataset\n", + " fileName = dataFrame['Filename'][i]\n", + " data = pd.read_csv(os.path.join(filePath, fileName))\n", + "\n", + " # Split dataset for training and testing purpose\n", + " xtrain, xtest, ytrain, ytest = splitData(data)\n", + "\n", + " # Now, train the model and get the accuracy of all the models\n", + " accuracy = lstmTrain(xtrain, ytrain, xtest, ytest, model, 20)\n", + "\n", + " # Append the accuracy for the current dataset to the overall DataFrame\n", + " accuracyDF = accuracyDF.append({'Dataset': fileName[slice(-4)], 'MSE': accuracy['mse'], 'R2': accuracy['r2']}, ignore_index=True)\n", + "\n", + " return accuracyDF\n" + ], + "metadata": { + "id": "hUGuIEeiNh4l" + }, + "execution_count": 18, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "### Calling the function to train the models on the limited dataset\n", + "\n", + "(because lack of resouces like GPU, RAM, etc.)" + ], + "metadata": { + "id": "Pa51Rcr_WU5k" + } + }, + { + "cell_type": "code", + "source": [ + "# Call the trainModels function\n", + "accuracies = lstmModelTrain(df)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "gvQ9hnJ6SAGo", + "outputId": "c1cfb918-b5eb-4cb7-b069-d91993c22383" + }, + "execution_count": 19, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Model: \"sequential\"\n", + "_________________________________________________________________\n", + " Layer (type) Output Shape Param # \n", + "=================================================================\n", + " lstm (LSTM) (None, 4, 128) 66560 \n", + " \n", + " lstm_1 (LSTM) (None, 64) 49408 \n", + " \n", + " dense (Dense) (None, 25) 1625 \n", + " \n", + " dense_1 (Dense) (None, 1) 26 \n", + " \n", + "=================================================================\n", + "Total params: 117619 (459.45 KB)\n", + "Trainable params: 117619 (459.45 KB)\n", + "Non-trainable params: 0 (0.00 Byte)\n", + "_________________________________________________________________\n", + "Epoch 1/20\n", + "2706/2706 [==============================] - 18s 5ms/step - loss: 745167104.0000\n", + "Epoch 2/20\n", + "2706/2706 [==============================] - 15s 6ms/step - loss: 517995776.0000\n", + "Epoch 3/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 472471264.0000\n", + "Epoch 4/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 469290688.0000\n", + "Epoch 5/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 469053408.0000\n", + "Epoch 6/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 469044256.0000\n", + "Epoch 7/20\n", + "2706/2706 [==============================] - 14s 5ms/step - loss: 468994272.0000\n", + "Epoch 8/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 469105632.0000\n", + "Epoch 9/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 468921408.0000\n", + "Epoch 10/20\n", + "2706/2706 [==============================] - 14s 5ms/step - loss: 469063584.0000\n", + "Epoch 11/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 469037664.0000\n", + "Epoch 12/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 469074912.0000\n", + "Epoch 13/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 469041920.0000\n", + "Epoch 14/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 469036256.0000\n", + "Epoch 15/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 469050752.0000\n", + "Epoch 16/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 469056032.0000\n", + "Epoch 17/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 469053760.0000\n", + "Epoch 18/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 469044544.0000\n", + "Epoch 19/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 469045504.0000\n", + "Epoch 20/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 469074176.0000\n", + "22/22 [==============================] - 1s 3ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "1787/1787 [==============================] - 12s 5ms/step - loss: 28121298.0000\n", + "Epoch 2/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 4415281.5000\n", + "Epoch 3/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 3828182.0000\n", + "Epoch 4/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 3561334.7500\n", + "Epoch 5/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 3261703.0000\n", + "Epoch 6/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 2911701.0000\n", + "Epoch 7/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 2608607.0000\n", + "Epoch 8/20\n", + "1787/1787 [==============================] - 10s 5ms/step - loss: 2425824.7500\n", + "Epoch 9/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 2340636.2500\n", + "Epoch 10/20\n", + "1787/1787 [==============================] - 11s 6ms/step - loss: 1795463.1250\n", + "Epoch 11/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 1198625.7500\n", + "Epoch 12/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 1016240.5625\n", + "Epoch 13/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 726112.7500\n", + "Epoch 14/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 564695.2500\n", + "Epoch 15/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 777175.8125\n", + "Epoch 16/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 499804.1562\n", + "Epoch 17/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 459943.9062\n", + "Epoch 18/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 336601.8125\n", + "Epoch 19/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 522445.0938\n", + "Epoch 20/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 232420.4531\n", + "14/14 [==============================] - 1s 3ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "1787/1787 [==============================] - 12s 5ms/step - loss: 12907430.0000\n", + "Epoch 2/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 252.9839\n", + "Epoch 3/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 32.2892\n", + "Epoch 4/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 33.7245\n", + "Epoch 5/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 36.0902\n", + "Epoch 6/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 43.2694\n", + "Epoch 7/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 35.8518\n", + "Epoch 8/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 27.0522\n", + "Epoch 9/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 21.3199\n", + "Epoch 10/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 14.8917\n", + "Epoch 11/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 12.3881\n", + "Epoch 12/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 16.6229\n", + "Epoch 13/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 3.2254\n", + "Epoch 14/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 1.9756\n", + "Epoch 15/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 0.7544\n", + "Epoch 16/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.4971\n", + "Epoch 17/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 1.2031\n", + "Epoch 18/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0143\n", + "Epoch 19/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0275\n", + "Epoch 20/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 0.1628\n", + "14/14 [==============================] - 1s 2ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "1787/1787 [==============================] - 12s 5ms/step - loss: 1644.2269\n", + "Epoch 2/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 1736.9709\n", + "Epoch 3/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 1750.3033\n", + "Epoch 4/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 1772.7800\n", + "Epoch 5/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 2956.1462\n", + "Epoch 6/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 762.8350\n", + "Epoch 7/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 2338.3623\n", + "Epoch 8/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 911.2818\n", + "Epoch 9/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 645.5426\n", + "Epoch 10/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 3467.8271\n", + "Epoch 11/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 805.9503\n", + "Epoch 12/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 1611.6888\n", + "Epoch 13/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 1314.8313\n", + "Epoch 14/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 997.9952\n", + "Epoch 15/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 721.5272\n", + "Epoch 16/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 2062.2024\n", + "Epoch 17/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 1444.7482\n", + "Epoch 18/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 900.2365\n", + "Epoch 19/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 1294.5601\n", + "Epoch 20/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 3334.3242\n", + "14/14 [==============================] - 1s 3ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "1520/1520 [==============================] - 10s 5ms/step - loss: 0.2619\n", + "Epoch 2/20\n", + "1520/1520 [==============================] - 7s 5ms/step - loss: 0.0880\n", + "Epoch 3/20\n", + "1520/1520 [==============================] - 8s 5ms/step - loss: 0.0346\n", + "Epoch 4/20\n", + "1520/1520 [==============================] - 7s 5ms/step - loss: 0.8757\n", + "Epoch 5/20\n", + "1520/1520 [==============================] - 7s 5ms/step - loss: 0.0010\n", + "Epoch 6/20\n", + "1520/1520 [==============================] - 7s 5ms/step - loss: 0.0013\n", + "Epoch 7/20\n", + "1520/1520 [==============================] - 7s 5ms/step - loss: 0.0295\n", + "Epoch 8/20\n", + "1520/1520 [==============================] - 7s 5ms/step - loss: 0.0022\n", + "Epoch 9/20\n", + "1520/1520 [==============================] - 8s 5ms/step - loss: 0.0039\n", + "Epoch 10/20\n", + "1520/1520 [==============================] - 7s 5ms/step - loss: 0.0108\n", + "Epoch 11/20\n", + "1520/1520 [==============================] - 7s 5ms/step - loss: 0.0091\n", + "Epoch 12/20\n", + "1520/1520 [==============================] - 9s 6ms/step - loss: 0.0052\n", + "Epoch 13/20\n", + "1520/1520 [==============================] - 9s 6ms/step - loss: 0.0055\n", + "Epoch 14/20\n", + "1520/1520 [==============================] - 7s 4ms/step - loss: 0.0053\n", + "Epoch 15/20\n", + "1520/1520 [==============================] - 8s 5ms/step - loss: 0.0060\n", + "Epoch 16/20\n", + "1520/1520 [==============================] - 7s 4ms/step - loss: 0.0068\n", + "Epoch 17/20\n", + "1520/1520 [==============================] - 8s 5ms/step - loss: 0.0064\n", + "Epoch 18/20\n", + "1520/1520 [==============================] - 7s 4ms/step - loss: 0.0062\n", + "Epoch 19/20\n", + "1520/1520 [==============================] - 8s 5ms/step - loss: 0.0065\n", + "Epoch 20/20\n", + "1520/1520 [==============================] - 7s 4ms/step - loss: 0.0056\n", + "12/12 [==============================] - 1s 3ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "1787/1787 [==============================] - 12s 4ms/step - loss: 0.1028\n", + "Epoch 2/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.1243\n", + "Epoch 3/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 0.0416\n", + "Epoch 4/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0652\n", + "Epoch 5/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0307\n", + "Epoch 6/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0405\n", + "Epoch 7/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0427\n", + "Epoch 8/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 0.0611\n", + "Epoch 9/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0539\n", + "Epoch 10/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 0.0270\n", + "Epoch 11/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0523\n", + "Epoch 12/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0416\n", + "Epoch 13/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 0.0605\n", + "Epoch 14/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0598\n", + "Epoch 15/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 0.0674\n", + "Epoch 16/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0397\n", + "Epoch 17/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0317\n", + "Epoch 18/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 0.0320\n", + "Epoch 19/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0451\n", + "Epoch 20/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 0.0649\n", + "14/14 [==============================] - 1s 3ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "875/875 [==============================] - 8s 5ms/step - loss: 1958158.3750\n", + "Epoch 2/20\n", + "875/875 [==============================] - 4s 5ms/step - loss: 1365010.3750\n", + "Epoch 3/20\n", + "875/875 [==============================] - 5s 5ms/step - loss: 1360005.1250\n", + "Epoch 4/20\n", + "875/875 [==============================] - 4s 5ms/step - loss: 1361292.3750\n", + "Epoch 5/20\n", + "875/875 [==============================] - 4s 4ms/step - loss: 1360881.7500\n", + "Epoch 6/20\n", + "875/875 [==============================] - 4s 5ms/step - loss: 1359680.5000\n", + "Epoch 7/20\n", + "875/875 [==============================] - 5s 5ms/step - loss: 1356693.2500\n", + "Epoch 8/20\n", + "875/875 [==============================] - 4s 4ms/step - loss: 1357700.2500\n", + "Epoch 9/20\n", + "875/875 [==============================] - 4s 4ms/step - loss: 1356368.2500\n", + "Epoch 10/20\n", + "875/875 [==============================] - 5s 5ms/step - loss: 1357665.1250\n", + "Epoch 11/20\n", + "875/875 [==============================] - 4s 5ms/step - loss: 1355672.8750\n", + "Epoch 12/20\n", + "875/875 [==============================] - 4s 4ms/step - loss: 1357419.5000\n", + "Epoch 13/20\n", + "875/875 [==============================] - 4s 5ms/step - loss: 1356008.0000\n", + "Epoch 14/20\n", + "875/875 [==============================] - 5s 5ms/step - loss: 1355431.8750\n", + "Epoch 15/20\n", + "875/875 [==============================] - 4s 4ms/step - loss: 1355876.3750\n", + "Epoch 16/20\n", + "875/875 [==============================] - 4s 4ms/step - loss: 1357984.3750\n", + "Epoch 17/20\n", + "875/875 [==============================] - 5s 6ms/step - loss: 1355780.3750\n", + "Epoch 18/20\n", + "875/875 [==============================] - 4s 5ms/step - loss: 1356507.7500\n", + "Epoch 19/20\n", + "875/875 [==============================] - 4s 5ms/step - loss: 1356533.5000\n", + "Epoch 20/20\n", + "875/875 [==============================] - 4s 5ms/step - loss: 1355791.3750\n", + "7/7 [==============================] - 1s 3ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "1787/1787 [==============================] - 12s 5ms/step - loss: 9676.1680\n", + "Epoch 2/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 455.9001\n", + "Epoch 3/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.4216\n", + "Epoch 4/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.5213\n", + "Epoch 5/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 21.7830\n", + "Epoch 6/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 0.0408\n", + "Epoch 7/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.1842\n", + "Epoch 8/20\n", + "1787/1787 [==============================] - 10s 5ms/step - loss: 253.1790\n", + "Epoch 9/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 0.6591\n", + "Epoch 10/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 2.9636\n", + "Epoch 11/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 0.0292\n", + "Epoch 12/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.6333\n", + "Epoch 13/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0074\n", + "Epoch 14/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 0.0110\n", + "Epoch 15/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0329\n", + "Epoch 16/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 0.0828\n", + "Epoch 17/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0217\n", + "Epoch 18/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.1064\n", + "Epoch 19/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 0.0452\n", + "Epoch 20/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0578\n", + "14/14 [==============================] - 1s 3ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "1787/1787 [==============================] - 12s 5ms/step - loss: 0.0415\n", + "Epoch 2/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 0.0014\n", + "Epoch 3/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0055\n", + "Epoch 4/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0076\n", + "Epoch 5/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 0.0036\n", + "Epoch 6/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0042\n", + "Epoch 7/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 0.0058\n", + "Epoch 8/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0066\n", + "Epoch 9/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0070\n", + "Epoch 10/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 0.0061\n", + "Epoch 11/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0061\n", + "Epoch 12/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 0.0095\n", + "Epoch 13/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0041\n", + "Epoch 14/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0058\n", + "Epoch 15/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0049\n", + "Epoch 16/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0046\n", + "Epoch 17/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 0.0052\n", + "Epoch 18/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0037\n", + "Epoch 19/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0038\n", + "Epoch 20/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0050\n", + "14/14 [==============================] - 1s 3ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "525/525 [==============================] - 6s 6ms/step - loss: 12681.9512\n", + "Epoch 2/20\n", + "525/525 [==============================] - 3s 5ms/step - loss: 6382.3164\n", + "Epoch 3/20\n", + "525/525 [==============================] - 2s 5ms/step - loss: 130.9532\n", + "Epoch 4/20\n", + "525/525 [==============================] - 2s 5ms/step - loss: 0.1048\n", + "Epoch 5/20\n", + "525/525 [==============================] - 2s 5ms/step - loss: 0.0558\n", + "Epoch 6/20\n", + "525/525 [==============================] - 3s 5ms/step - loss: 1.0279\n", + "Epoch 7/20\n", + "525/525 [==============================] - 3s 6ms/step - loss: 154.4657\n", + "Epoch 8/20\n", + "525/525 [==============================] - 2s 4ms/step - loss: 180.0177\n", + "Epoch 9/20\n", + "525/525 [==============================] - 2s 5ms/step - loss: 0.1756\n", + "Epoch 10/20\n", + "525/525 [==============================] - 2s 5ms/step - loss: 0.0213\n", + "Epoch 11/20\n", + "525/525 [==============================] - 2s 5ms/step - loss: 0.1201\n", + "Epoch 12/20\n", + "525/525 [==============================] - 3s 6ms/step - loss: 16.9270\n", + "Epoch 13/20\n", + "525/525 [==============================] - 3s 5ms/step - loss: 68.0034\n", + "Epoch 14/20\n", + "525/525 [==============================] - 2s 5ms/step - loss: 15.5969\n", + "Epoch 15/20\n", + "525/525 [==============================] - 2s 5ms/step - loss: 38.2134\n", + "Epoch 16/20\n", + "525/525 [==============================] - 2s 5ms/step - loss: 16.4367\n", + "Epoch 17/20\n", + "525/525 [==============================] - 3s 5ms/step - loss: 5.7491\n", + "Epoch 18/20\n", + "525/525 [==============================] - 3s 6ms/step - loss: 14.6192\n", + "Epoch 19/20\n", + "525/525 [==============================] - 3s 5ms/step - loss: 18.5513\n", + "Epoch 20/20\n", + "525/525 [==============================] - 2s 5ms/step - loss: 9.6940\n", + "5/5 [==============================] - 1s 3ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "1080/1080 [==============================] - 9s 6ms/step - loss: 2279.0322\n", + "Epoch 2/20\n", + "1080/1080 [==============================] - 5s 5ms/step - loss: 172.8917\n", + "Epoch 3/20\n", + "1080/1080 [==============================] - 5s 5ms/step - loss: 119.5325\n", + "Epoch 4/20\n", + "1080/1080 [==============================] - 6s 6ms/step - loss: 86.0607\n", + "Epoch 5/20\n", + "1080/1080 [==============================] - 5s 4ms/step - loss: 101.9860\n", + "Epoch 6/20\n", + "1080/1080 [==============================] - 5s 5ms/step - loss: 86.6312\n", + "Epoch 7/20\n", + "1080/1080 [==============================] - 6s 6ms/step - loss: 59.3291\n", + "Epoch 8/20\n", + "1080/1080 [==============================] - 5s 4ms/step - loss: 57.0641\n", + "Epoch 9/20\n", + "1080/1080 [==============================] - 5s 5ms/step - loss: 104.0968\n", + "Epoch 10/20\n", + "1080/1080 [==============================] - 6s 5ms/step - loss: 169.3685\n", + "Epoch 11/20\n", + "1080/1080 [==============================] - 5s 5ms/step - loss: 54.6372\n", + "Epoch 12/20\n", + "1080/1080 [==============================] - 6s 5ms/step - loss: 40.7266\n", + "Epoch 13/20\n", + "1080/1080 [==============================] - 5s 5ms/step - loss: 87.4302\n", + "Epoch 14/20\n", + "1080/1080 [==============================] - 5s 5ms/step - loss: 54.4349\n", + "Epoch 15/20\n", + "1080/1080 [==============================] - 6s 6ms/step - loss: 47.4644\n", + "Epoch 16/20\n", + "1080/1080 [==============================] - 5s 5ms/step - loss: 60.9636\n", + "Epoch 17/20\n", + "1080/1080 [==============================] - 5s 5ms/step - loss: 56.8926\n", + "Epoch 18/20\n", + "1080/1080 [==============================] - 6s 5ms/step - loss: 69.0652\n", + "Epoch 19/20\n", + "1080/1080 [==============================] - 5s 5ms/step - loss: 47.1356\n", + "Epoch 20/20\n", + "1080/1080 [==============================] - 6s 5ms/step - loss: 44.6408\n", + "9/9 [==============================] - 1s 4ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "1787/1787 [==============================] - 12s 5ms/step - loss: 0.0523\n", + "Epoch 2/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 22.1228\n", + "Epoch 3/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.6087\n", + "Epoch 4/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 0.0361\n", + "Epoch 5/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0261\n", + "Epoch 6/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 9.1933e-04\n", + "Epoch 7/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0132\n", + "Epoch 8/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 1.0421\n", + "Epoch 9/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 119.7811\n", + "Epoch 10/20\n", + "1787/1787 [==============================] - 10s 5ms/step - loss: 0.0010\n", + "Epoch 11/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 0.0674\n", + "Epoch 12/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.2460\n", + "Epoch 13/20\n", + "1787/1787 [==============================] - 10s 5ms/step - loss: 0.0016\n", + "Epoch 14/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 3.7577e-04\n", + "Epoch 15/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.2507\n", + "Epoch 16/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.6188\n", + "Epoch 17/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.4150\n", + "Epoch 18/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0700\n", + "Epoch 19/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 0.1270\n", + "Epoch 20/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0022\n", + "14/14 [==============================] - 1s 2ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "677/677 [==============================] - 6s 5ms/step - loss: 0.4461\n", + "Epoch 2/20\n", + "677/677 [==============================] - 4s 5ms/step - loss: 0.1615\n", + "Epoch 3/20\n", + "677/677 [==============================] - 4s 6ms/step - loss: 0.0852\n", + "Epoch 4/20\n", + "677/677 [==============================] - 3s 5ms/step - loss: 0.0368\n", + "Epoch 5/20\n", + "677/677 [==============================] - 3s 5ms/step - loss: 0.0652\n", + "Epoch 6/20\n", + "677/677 [==============================] - 3s 5ms/step - loss: 0.0548\n", + "Epoch 7/20\n", + "677/677 [==============================] - 4s 6ms/step - loss: 0.0483\n", + "Epoch 8/20\n", + "677/677 [==============================] - 3s 5ms/step - loss: 0.0793\n", + "Epoch 9/20\n", + "677/677 [==============================] - 3s 5ms/step - loss: 0.0539\n", + "Epoch 10/20\n", + "677/677 [==============================] - 3s 5ms/step - loss: 0.0433\n", + "Epoch 11/20\n", + "677/677 [==============================] - 4s 5ms/step - loss: 0.0509\n", + "Epoch 12/20\n", + "677/677 [==============================] - 4s 5ms/step - loss: 0.0442\n", + "Epoch 13/20\n", + "677/677 [==============================] - 3s 5ms/step - loss: 0.0910\n", + "Epoch 14/20\n", + "677/677 [==============================] - 3s 5ms/step - loss: 0.0459\n", + "Epoch 15/20\n", + "677/677 [==============================] - 3s 5ms/step - loss: 0.1896\n", + "Epoch 16/20\n", + "677/677 [==============================] - 4s 6ms/step - loss: 0.0706\n", + "Epoch 17/20\n", + "677/677 [==============================] - 3s 5ms/step - loss: 0.2524\n", + "Epoch 18/20\n", + "677/677 [==============================] - 3s 5ms/step - loss: 0.0338\n", + "Epoch 19/20\n", + "677/677 [==============================] - 3s 5ms/step - loss: 0.0630\n", + "Epoch 20/20\n", + "677/677 [==============================] - 4s 6ms/step - loss: 0.0282\n", + "6/6 [==============================] - 1s 4ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "1192/1192 [==============================] - 9s 5ms/step - loss: 0.1546\n", + "Epoch 2/20\n", + "1192/1192 [==============================] - 7s 6ms/step - loss: 0.0074\n", + "Epoch 3/20\n", + "1192/1192 [==============================] - 6s 5ms/step - loss: 0.0023\n", + "Epoch 4/20\n", + "1192/1192 [==============================] - 6s 5ms/step - loss: 0.0027\n", + "Epoch 5/20\n", + "1192/1192 [==============================] - 6s 5ms/step - loss: 0.0016\n", + "Epoch 6/20\n", + "1192/1192 [==============================] - 6s 5ms/step - loss: 0.0029\n", + "Epoch 7/20\n", + "1192/1192 [==============================] - 7s 6ms/step - loss: 0.0042\n", + "Epoch 8/20\n", + "1192/1192 [==============================] - 6s 5ms/step - loss: 0.0027\n", + "Epoch 9/20\n", + "1192/1192 [==============================] - 6s 5ms/step - loss: 0.0363\n", + "Epoch 10/20\n", + "1192/1192 [==============================] - 6s 5ms/step - loss: 0.0028\n", + "Epoch 11/20\n", + "1192/1192 [==============================] - 5s 5ms/step - loss: 0.0062\n", + "Epoch 12/20\n", + "1192/1192 [==============================] - 7s 6ms/step - loss: 0.0041\n", + "Epoch 13/20\n", + "1192/1192 [==============================] - 6s 5ms/step - loss: 0.0182\n", + "Epoch 14/20\n", + "1192/1192 [==============================] - 7s 5ms/step - loss: 0.0195\n", + "Epoch 15/20\n", + "1192/1192 [==============================] - 6s 5ms/step - loss: 0.0319\n", + "Epoch 16/20\n", + "1192/1192 [==============================] - 5s 5ms/step - loss: 0.0012\n", + "Epoch 17/20\n", + "1192/1192 [==============================] - 7s 6ms/step - loss: 0.0024\n", + "Epoch 18/20\n", + "1192/1192 [==============================] - 5s 5ms/step - loss: 0.0281\n", + "Epoch 19/20\n", + "1192/1192 [==============================] - 6s 5ms/step - loss: 0.0031\n", + "Epoch 20/20\n", + "1192/1192 [==============================] - 6s 5ms/step - loss: 0.0343\n", + "10/10 [==============================] - 1s 3ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "975/975 [==============================] - 8s 6ms/step - loss: 211.7144\n", + "Epoch 2/20\n", + "975/975 [==============================] - 5s 5ms/step - loss: 4.7379\n", + "Epoch 3/20\n", + "975/975 [==============================] - 4s 5ms/step - loss: 2.6904\n", + "Epoch 4/20\n", + "975/975 [==============================] - 5s 5ms/step - loss: 2.0289\n", + "Epoch 5/20\n", + "975/975 [==============================] - 5s 5ms/step - loss: 2.3495\n", + "Epoch 6/20\n", + "975/975 [==============================] - 4s 4ms/step - loss: 3.3149\n", + "Epoch 7/20\n", + "975/975 [==============================] - 5s 5ms/step - loss: 4.7495\n", + "Epoch 8/20\n", + "975/975 [==============================] - 5s 5ms/step - loss: 3.8194\n", + "Epoch 9/20\n", + "975/975 [==============================] - 4s 5ms/step - loss: 2.4366\n", + "Epoch 10/20\n", + "975/975 [==============================] - 5s 5ms/step - loss: 2.0540\n", + "Epoch 11/20\n", + "975/975 [==============================] - 5s 5ms/step - loss: 3.1854\n", + "Epoch 12/20\n", + "975/975 [==============================] - 4s 5ms/step - loss: 7.0814\n", + "Epoch 13/20\n", + "975/975 [==============================] - 5s 5ms/step - loss: 16.5649\n", + "Epoch 14/20\n", + "975/975 [==============================] - 5s 5ms/step - loss: 3.3780\n", + "Epoch 15/20\n", + "975/975 [==============================] - 4s 5ms/step - loss: 13.1634\n", + "Epoch 16/20\n", + "975/975 [==============================] - 5s 5ms/step - loss: 1.4604\n", + "Epoch 17/20\n", + "975/975 [==============================] - 5s 5ms/step - loss: 2.7536\n", + "Epoch 18/20\n", + "975/975 [==============================] - 4s 5ms/step - loss: 4.0950\n", + "Epoch 19/20\n", + "975/975 [==============================] - 5s 5ms/step - loss: 2.5791\n", + "Epoch 20/20\n", + "975/975 [==============================] - 5s 5ms/step - loss: 5.8590\n", + "8/8 [==============================] - 1s 3ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "1359/1359 [==============================] - 11s 5ms/step - loss: 2.8934\n", + "Epoch 2/20\n", + "1359/1359 [==============================] - 7s 5ms/step - loss: 0.0831\n", + "Epoch 3/20\n", + "1359/1359 [==============================] - 7s 5ms/step - loss: 0.3315\n", + "Epoch 4/20\n", + "1359/1359 [==============================] - 6s 5ms/step - loss: 0.2367\n", + "Epoch 5/20\n", + "1359/1359 [==============================] - 9s 7ms/step - loss: 0.0630\n", + "Epoch 6/20\n", + "1359/1359 [==============================] - 8s 6ms/step - loss: 0.0648\n", + "Epoch 7/20\n", + "1359/1359 [==============================] - 7s 5ms/step - loss: 0.5722\n", + "Epoch 8/20\n", + "1359/1359 [==============================] - 6s 5ms/step - loss: 0.0229\n", + "Epoch 9/20\n", + "1359/1359 [==============================] - 7s 5ms/step - loss: 0.0169\n", + "Epoch 10/20\n", + "1359/1359 [==============================] - 6s 5ms/step - loss: 0.2041\n", + "Epoch 11/20\n", + "1359/1359 [==============================] - 7s 5ms/step - loss: 0.0909\n", + "Epoch 12/20\n", + "1359/1359 [==============================] - 6s 5ms/step - loss: 0.0209\n", + "Epoch 13/20\n", + "1359/1359 [==============================] - 7s 5ms/step - loss: 0.0310\n", + "Epoch 14/20\n", + "1359/1359 [==============================] - 6s 5ms/step - loss: 0.0495\n", + "Epoch 15/20\n", + "1359/1359 [==============================] - 7s 5ms/step - loss: 0.0278\n", + "Epoch 16/20\n", + "1359/1359 [==============================] - 7s 5ms/step - loss: 0.0662\n", + "Epoch 17/20\n", + "1359/1359 [==============================] - 6s 5ms/step - loss: 0.0208\n", + "Epoch 18/20\n", + "1359/1359 [==============================] - 7s 5ms/step - loss: 0.0355\n", + "Epoch 19/20\n", + "1359/1359 [==============================] - 6s 5ms/step - loss: 0.0216\n", + "Epoch 20/20\n", + "1359/1359 [==============================] - 7s 5ms/step - loss: 0.0233\n", + "11/11 [==============================] - 1s 3ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "2706/2706 [==============================] - 17s 5ms/step - loss: 417.2587\n", + "Epoch 2/20\n", + "2706/2706 [==============================] - 14s 5ms/step - loss: 239.4198\n", + "Epoch 3/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 155.2303\n", + "Epoch 4/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 94.1213\n", + "Epoch 5/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 146.0436\n", + "Epoch 6/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 102.2642\n", + "Epoch 7/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 92.9752\n", + "Epoch 8/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 123.6125\n", + "Epoch 9/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 114.3514\n", + "Epoch 10/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 141.0581\n", + "Epoch 11/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 80.9123\n", + "Epoch 12/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 95.0775\n", + "Epoch 13/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 124.9699\n", + "Epoch 14/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 94.1694\n", + "Epoch 15/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 97.9396\n", + "Epoch 16/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 104.2824\n", + "Epoch 17/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 98.4615\n", + "Epoch 18/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 70.3739\n", + "Epoch 19/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 79.2161\n", + "Epoch 20/20\n", + "2706/2706 [==============================] - 13s 5ms/step - loss: 89.2208\n", + "22/22 [==============================] - 1s 2ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "1429/1429 [==============================] - 11s 5ms/step - loss: 1259658368.0000\n", + "Epoch 2/20\n", + "1429/1429 [==============================] - 6s 4ms/step - loss: 488986528.0000\n", + "Epoch 3/20\n", + "1429/1429 [==============================] - 8s 5ms/step - loss: 484934304.0000\n", + "Epoch 4/20\n", + "1429/1429 [==============================] - 6s 4ms/step - loss: 478468736.0000\n", + "Epoch 5/20\n", + "1429/1429 [==============================] - 7s 5ms/step - loss: 489869088.0000\n", + "Epoch 6/20\n", + "1429/1429 [==============================] - 6s 4ms/step - loss: 489364320.0000\n", + "Epoch 7/20\n", + "1429/1429 [==============================] - 7s 5ms/step - loss: 472512128.0000\n", + "Epoch 8/20\n", + "1429/1429 [==============================] - 7s 5ms/step - loss: 470370368.0000\n", + "Epoch 9/20\n", + "1429/1429 [==============================] - 7s 5ms/step - loss: 466969088.0000\n", + "Epoch 10/20\n", + "1429/1429 [==============================] - 7s 5ms/step - loss: 466593984.0000\n", + "Epoch 11/20\n", + "1429/1429 [==============================] - 7s 5ms/step - loss: 469077760.0000\n", + "Epoch 12/20\n", + "1429/1429 [==============================] - 7s 5ms/step - loss: 467190016.0000\n", + "Epoch 13/20\n", + "1429/1429 [==============================] - 7s 5ms/step - loss: 466956832.0000\n", + "Epoch 14/20\n", + "1429/1429 [==============================] - 7s 5ms/step - loss: 466532864.0000\n", + "Epoch 15/20\n", + "1429/1429 [==============================] - 6s 4ms/step - loss: 466411328.0000\n", + "Epoch 16/20\n", + "1429/1429 [==============================] - 7s 5ms/step - loss: 466750112.0000\n", + "Epoch 17/20\n", + "1429/1429 [==============================] - 6s 4ms/step - loss: 466557952.0000\n", + "Epoch 18/20\n", + "1429/1429 [==============================] - 8s 5ms/step - loss: 466535360.0000\n", + "Epoch 19/20\n", + "1429/1429 [==============================] - 6s 4ms/step - loss: 466657536.0000\n", + "Epoch 20/20\n", + "1429/1429 [==============================] - 8s 5ms/step - loss: 466554912.0000\n", + "12/12 [==============================] - 1s 3ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "957/957 [==============================] - 7s 4ms/step - loss: 621084.6250\n", + "Epoch 2/20\n", + "957/957 [==============================] - 6s 6ms/step - loss: 27236.0508\n", + "Epoch 3/20\n", + "957/957 [==============================] - 4s 4ms/step - loss: 4219.5806\n", + "Epoch 4/20\n", + "957/957 [==============================] - 4s 5ms/step - loss: 1857.9496\n", + "Epoch 5/20\n", + "957/957 [==============================] - 5s 5ms/step - loss: 1858.0149\n", + "Epoch 6/20\n", + "957/957 [==============================] - 4s 5ms/step - loss: 778.3851\n", + "Epoch 7/20\n", + "957/957 [==============================] - 4s 4ms/step - loss: 236.4230\n", + "Epoch 8/20\n", + "957/957 [==============================] - 5s 5ms/step - loss: 3138.8855\n", + "Epoch 9/20\n", + "957/957 [==============================] - 5s 5ms/step - loss: 1146.1658\n", + "Epoch 10/20\n", + "957/957 [==============================] - 4s 5ms/step - loss: 499.8585\n", + "Epoch 11/20\n", + "957/957 [==============================] - 5s 5ms/step - loss: 195.5746\n", + "Epoch 12/20\n", + "957/957 [==============================] - 6s 6ms/step - loss: 1514.0706\n", + "Epoch 13/20\n", + "957/957 [==============================] - 4s 5ms/step - loss: 547.1377\n", + "Epoch 14/20\n", + "957/957 [==============================] - 5s 5ms/step - loss: 1453.9470\n", + "Epoch 15/20\n", + "957/957 [==============================] - 5s 6ms/step - loss: 2273.0786\n", + "Epoch 16/20\n", + "957/957 [==============================] - 4s 5ms/step - loss: 293.5168\n", + "Epoch 17/20\n", + "957/957 [==============================] - 5s 5ms/step - loss: 494.5534\n", + "Epoch 18/20\n", + "957/957 [==============================] - 5s 6ms/step - loss: 541.9650\n", + "Epoch 19/20\n", + "957/957 [==============================] - 4s 5ms/step - loss: 307.9024\n", + "Epoch 20/20\n", + "957/957 [==============================] - 4s 5ms/step - loss: 543.7620\n", + "8/8 [==============================] - 1s 3ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "1787/1787 [==============================] - 12s 5ms/step - loss: 4335958.5000\n", + "Epoch 2/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 73788.4609\n", + "Epoch 3/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 64318.1914\n", + "Epoch 4/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 86597.0781\n", + "Epoch 5/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 62073.1602\n", + "Epoch 6/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 45211.1484\n", + "Epoch 7/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 17098.7031\n", + "Epoch 8/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 37722.8945\n", + "Epoch 9/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 29009.3945\n", + "Epoch 10/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 34464.8086\n", + "Epoch 11/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 24827.5801\n", + "Epoch 12/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 43283.7461\n", + "Epoch 13/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 31423.5820\n", + "Epoch 14/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 23738.5898\n", + "Epoch 15/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 14324.9287\n", + "Epoch 16/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 30600.6836\n", + "Epoch 17/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 22841.7656\n", + "Epoch 18/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 15109.8311\n", + "Epoch 19/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 23573.4902\n", + "Epoch 20/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 27365.9414\n", + "14/14 [==============================] - 1s 3ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "1787/1787 [==============================] - 12s 5ms/step - loss: 468.7559\n", + "Epoch 2/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 295.0444\n", + "Epoch 3/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 133.5947\n", + "Epoch 4/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0891\n", + "Epoch 5/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 0.0282\n", + "Epoch 6/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0703\n", + "Epoch 7/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0520\n", + "Epoch 8/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 219.7085\n", + "Epoch 9/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.1900\n", + "Epoch 10/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 228.5038\n", + "Epoch 11/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 9.4334\n", + "Epoch 12/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0191\n", + "Epoch 13/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 83.8394\n", + "Epoch 14/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 1.8987\n", + "Epoch 15/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 1.4519\n", + "Epoch 16/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 15.8433\n", + "Epoch 17/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0036\n", + "Epoch 18/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.0051\n", + "Epoch 19/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 0.2769\n", + "Epoch 20/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 0.1029\n", + "14/14 [==============================] - 1s 2ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "1340/1340 [==============================] - 11s 5ms/step - loss: 4.7117\n", + "Epoch 2/20\n", + "1340/1340 [==============================] - 6s 5ms/step - loss: 2.3157\n", + "Epoch 3/20\n", + "1340/1340 [==============================] - 7s 5ms/step - loss: 1.7574\n", + "Epoch 4/20\n", + "1340/1340 [==============================] - 6s 5ms/step - loss: 0.8496\n", + "Epoch 5/20\n", + "1340/1340 [==============================] - 7s 5ms/step - loss: 1.6642\n", + "Epoch 6/20\n", + "1340/1340 [==============================] - 6s 4ms/step - loss: 0.0584\n", + "Epoch 7/20\n", + "1340/1340 [==============================] - 7s 5ms/step - loss: 0.0853\n", + "Epoch 8/20\n", + "1340/1340 [==============================] - 6s 4ms/step - loss: 2.1111\n", + "Epoch 9/20\n", + "1340/1340 [==============================] - 7s 5ms/step - loss: 11.0311\n", + "Epoch 10/20\n", + "1340/1340 [==============================] - 6s 5ms/step - loss: 0.6943\n", + "Epoch 11/20\n", + "1340/1340 [==============================] - 6s 5ms/step - loss: 0.0340\n", + "Epoch 12/20\n", + "1340/1340 [==============================] - 7s 5ms/step - loss: 0.0400\n", + "Epoch 13/20\n", + "1340/1340 [==============================] - 6s 5ms/step - loss: 0.0744\n", + "Epoch 14/20\n", + "1340/1340 [==============================] - 7s 5ms/step - loss: 0.1006\n", + "Epoch 15/20\n", + "1340/1340 [==============================] - 6s 5ms/step - loss: 0.0848\n", + "Epoch 16/20\n", + "1340/1340 [==============================] - 7s 5ms/step - loss: 0.1341\n", + "Epoch 17/20\n", + "1340/1340 [==============================] - 6s 4ms/step - loss: 0.1547\n", + "Epoch 18/20\n", + "1340/1340 [==============================] - 7s 5ms/step - loss: 0.2311\n", + "Epoch 19/20\n", + "1340/1340 [==============================] - 6s 5ms/step - loss: 0.0985\n", + "Epoch 20/20\n", + "1340/1340 [==============================] - 6s 5ms/step - loss: 0.1186\n", + "11/11 [==============================] - 1s 3ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "950/950 [==============================] - 8s 4ms/step - loss: 3343.2886\n", + "Epoch 2/20\n", + "950/950 [==============================] - 4s 5ms/step - loss: 576.7405\n", + "Epoch 3/20\n", + "950/950 [==============================] - 5s 6ms/step - loss: 85.2426\n", + "Epoch 4/20\n", + "950/950 [==============================] - 4s 4ms/step - loss: 433.2572\n", + "Epoch 5/20\n", + "950/950 [==============================] - 4s 4ms/step - loss: 142.9957\n", + "Epoch 6/20\n", + "950/950 [==============================] - 5s 6ms/step - loss: 106.3037\n", + "Epoch 7/20\n", + "950/950 [==============================] - 4s 4ms/step - loss: 100.2846\n", + "Epoch 8/20\n", + "950/950 [==============================] - 4s 4ms/step - loss: 132.8107\n", + "Epoch 9/20\n", + "950/950 [==============================] - 5s 6ms/step - loss: 114.6796\n", + "Epoch 10/20\n", + "950/950 [==============================] - 4s 5ms/step - loss: 50.9183\n", + "Epoch 11/20\n", + "950/950 [==============================] - 4s 4ms/step - loss: 206.7650\n", + "Epoch 12/20\n", + "950/950 [==============================] - 5s 5ms/step - loss: 226.7179\n", + "Epoch 13/20\n", + "950/950 [==============================] - 5s 5ms/step - loss: 32.8381\n", + "Epoch 14/20\n", + "950/950 [==============================] - 4s 4ms/step - loss: 153.9625\n", + "Epoch 15/20\n", + "950/950 [==============================] - 5s 5ms/step - loss: 46.5100\n", + "Epoch 16/20\n", + "950/950 [==============================] - 5s 5ms/step - loss: 28.1083\n", + "Epoch 17/20\n", + "950/950 [==============================] - 4s 4ms/step - loss: 69.4302\n", + "Epoch 18/20\n", + "950/950 [==============================] - 5s 5ms/step - loss: 73.0361\n", + "Epoch 19/20\n", + "950/950 [==============================] - 5s 5ms/step - loss: 241.8242\n", + "Epoch 20/20\n", + "950/950 [==============================] - 4s 4ms/step - loss: 37.8984\n", + "8/8 [==============================] - 1s 3ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "1787/1787 [==============================] - 12s 5ms/step - loss: 5.2036\n", + "Epoch 2/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 3.2617\n", + "Epoch 3/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 3.7946\n", + "Epoch 4/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 3.3587\n", + "Epoch 5/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 2.7498\n", + "Epoch 6/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 2.9537\n", + "Epoch 7/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 3.8335\n", + "Epoch 8/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 2.6072\n", + "Epoch 9/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 3.8192\n", + "Epoch 10/20\n", + "1787/1787 [==============================] - 11s 6ms/step - loss: 3.3862\n", + "Epoch 11/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 3.0701\n", + "Epoch 12/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 6.7764\n", + "Epoch 13/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 2.9057\n", + "Epoch 14/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 3.1872\n", + "Epoch 15/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 2.4443\n", + "Epoch 16/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 2.9291\n", + "Epoch 17/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 2.5423\n", + "Epoch 18/20\n", + "1787/1787 [==============================] - 8s 5ms/step - loss: 2.9393\n", + "Epoch 19/20\n", + "1787/1787 [==============================] - 9s 5ms/step - loss: 2.2423\n", + "Epoch 20/20\n", + "1787/1787 [==============================] - 8s 4ms/step - loss: 2.7458\n", + "14/14 [==============================] - 2s 4ms/step\n", + "Epoch 1/20\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "1693/1693 [==============================] - 12s 4ms/step - loss: 0.0056\n", + "Epoch 2/20\n", + "1693/1693 [==============================] - 9s 5ms/step - loss: 0.0025\n", + "Epoch 3/20\n", + "1693/1693 [==============================] - 8s 5ms/step - loss: 0.0027\n", + "Epoch 4/20\n", + "1693/1693 [==============================] - 9s 5ms/step - loss: 0.0031\n", + "Epoch 5/20\n", + "1693/1693 [==============================] - 8s 5ms/step - loss: 0.0026\n", + "Epoch 6/20\n", + "1693/1693 [==============================] - 8s 5ms/step - loss: 0.0027\n", + "Epoch 7/20\n", + "1693/1693 [==============================] - 9s 5ms/step - loss: 0.0027\n", + "Epoch 8/20\n", + "1693/1693 [==============================] - 8s 4ms/step - loss: 0.0021\n", + "Epoch 9/20\n", + "1693/1693 [==============================] - 9s 5ms/step - loss: 0.0022\n", + "Epoch 10/20\n", + "1693/1693 [==============================] - 8s 5ms/step - loss: 0.0027\n", + "Epoch 11/20\n", + "1693/1693 [==============================] - 9s 5ms/step - loss: 0.0019\n", + "Epoch 12/20\n", + "1693/1693 [==============================] - 8s 5ms/step - loss: 0.0027\n", + "Epoch 13/20\n", + "1693/1693 [==============================] - 8s 5ms/step - loss: 0.0021\n", + "Epoch 14/20\n", + "1693/1693 [==============================] - 9s 5ms/step - loss: 0.0029\n", + "Epoch 15/20\n", + "1693/1693 [==============================] - 8s 5ms/step - loss: 0.0022\n", + "Epoch 16/20\n", + "1693/1693 [==============================] - 9s 5ms/step - loss: 0.0024\n", + "Epoch 17/20\n", + "1693/1693 [==============================] - 8s 4ms/step - loss: 0.0023\n", + "Epoch 18/20\n", + "1693/1693 [==============================] - 9s 5ms/step - loss: 0.0022\n", + "Epoch 19/20\n", + "1693/1693 [==============================] - 8s 5ms/step - loss: 0.0027\n", + "Epoch 20/20\n", + "1693/1693 [==============================] - 9s 5ms/step - loss: 0.0025\n", + "14/14 [==============================] - 1s 5ms/step\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":24: FutureWarning:\n", + "\n", + "The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + "\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "### Save accuracies of the whole training results into a single csv file named `LSTM_results.csv`" + ], + "metadata": { + "id": "rN8D2IV_WmMb" + } + }, + { + "cell_type": "code", + "source": [ + "accuracies.to_csv('LSTM_results.csv', index=False)" + ], + "metadata": { + "id": "GgY2tGPNWmMb" + }, + "execution_count": 21, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "### Let us see the saved dataset `LSTM_results.csv`" + ], + "metadata": { + "id": "C5iShjPlWmMc" + } + }, + { + "cell_type": "code", + "source": [ + "resultsData = pd.read_csv('LSTM_results.csv')\n", + "print(\"Accuracies of Different models on different datasets!\")\n", + "resultsData" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 850 + }, + "outputId": "5acc8267-2767-407b-f0c5-9b420f83e473", + "id": "X5KVxY1HWmMc" + }, + "execution_count": 22, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Accuracies of Different models on different datasets!\n" + ] + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + " Dataset MSE R2\n", + "0 BTC-SGD 4.874616e+08 -2.967174e-03\n", + "1 ETH-SGD 4.178541e+05 8.166412e-01\n", + "2 USDT-SGD 9.260454e-03 -1.327946e+01\n", + "3 BNB-SGD 1.206636e+03 9.780038e-01\n", + "4 USDC-SGD 3.359622e-03 -3.264993e+00\n", + "5 XRP-SGD 9.766995e-03 9.486673e-01\n", + "6 STETH-SGD 1.526732e+06 -1.275546e-04\n", + "7 ADA-SGD 1.603251e-02 9.681617e-01\n", + "8 DOGE-SGD 1.651918e-04 9.867902e-01\n", + "9 WTRX-SGD 4.497436e+00 -1.339005e+04\n", + "10 SOL-SGD 3.572016e+01 9.941831e-01\n", + "11 TRX-SGD 8.185882e-05 9.484200e-01\n", + "12 TON11419-SGD 2.037028e-01 7.976267e-01\n", + "13 DAI-SGD 3.348528e-03 -2.914893e+00\n", + "14 DOT-SGD 1.914015e+00 9.930964e-01\n", + "15 MATIC-SGD 1.430557e-02 9.805211e-01\n", + "16 LTC-SGD 3.159578e+01 9.956645e-01\n", + "17 WBTC-SGD 4.120300e+08 -5.060852e-03\n", + "18 SHIB-SGD 5.596118e+01 -1.915391e+11\n", + "19 BCH-SGD 8.338073e+03 9.750366e-01\n", + "20 XLM-SGD 9.369997e-04 9.683078e-01\n", + "21 LEO-SGD 6.229320e-02 9.858775e-01\n", + "22 AVAX-SGD 8.377987e+00 9.945632e-01\n", + "23 LINK-SGD 9.121696e-01 9.942063e-01\n", + "24 TUSD-SGD 9.360150e-03 -1.270343e+01" + ], + "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", + "
DatasetMSER2
0BTC-SGD4.874616e+08-2.967174e-03
1ETH-SGD4.178541e+058.166412e-01
2USDT-SGD9.260454e-03-1.327946e+01
3BNB-SGD1.206636e+039.780038e-01
4USDC-SGD3.359622e-03-3.264993e+00
5XRP-SGD9.766995e-039.486673e-01
6STETH-SGD1.526732e+06-1.275546e-04
7ADA-SGD1.603251e-029.681617e-01
8DOGE-SGD1.651918e-049.867902e-01
9WTRX-SGD4.497436e+00-1.339005e+04
10SOL-SGD3.572016e+019.941831e-01
11TRX-SGD8.185882e-059.484200e-01
12TON11419-SGD2.037028e-017.976267e-01
13DAI-SGD3.348528e-03-2.914893e+00
14DOT-SGD1.914015e+009.930964e-01
15MATIC-SGD1.430557e-029.805211e-01
16LTC-SGD3.159578e+019.956645e-01
17WBTC-SGD4.120300e+08-5.060852e-03
18SHIB-SGD5.596118e+01-1.915391e+11
19BCH-SGD8.338073e+039.750366e-01
20XLM-SGD9.369997e-049.683078e-01
21LEO-SGD6.229320e-029.858775e-01
22AVAX-SGD8.377987e+009.945632e-01
23LINK-SGD9.121696e-019.942063e-01
24TUSD-SGD9.360150e-03-1.270343e+01
\n", + "
\n", + "
\n", + "\n", + "
\n", + " \n", + "\n", + " \n", + "\n", + " \n", + "
\n", + "\n", + "\n", + "
\n", + " \n", + "\n", + "\n", + "\n", + " \n", + "
\n", + "\n", + "
\n", + " \n", + " \n", + " \n", + "
\n", + "\n", + "
\n", + "
\n" + ] + }, + "metadata": {}, + "execution_count": 22 + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "#### Model Building and LSTM Analysis Completed!" + ], + "metadata": { + "id": "GBAWZjw97eQH" + } + }, + { + "cell_type": "markdown", + "source": [ + "---" + ], + "metadata": { + "id": "V86M4UyLQ_9R" + } + } + ] +} \ No newline at end of file diff --git a/Singaporean Cryptocurrency Analysis/requirements.txt b/Singaporean Cryptocurrency Analysis/requirements.txt new file mode 100644 index 000000000..7e7c38be0 --- /dev/null +++ b/Singaporean Cryptocurrency Analysis/requirements.txt @@ -0,0 +1,8 @@ +numpy==1.19.2 +pandas==1.4.3 +xgboost~=1.5.2 +scikit-learn~=1.0.2 +plotly==5.16.1 +plotly-express==0.4.1 +tensorflow==2.4.1 +keras==2.4.0