1
0
mirror of https://github.com/mmaithani/data-science.git synced 2022-04-24 02:56:41 +03:00
Files
gluonts-forecasting-noteboo…/informers_for_LSTF.ipynb
2020-12-24 15:19:58 +05:30

204 lines
4.3 KiB
Plaintext

{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "informers for LSTF.ipynb",
"private_outputs": true,
"provenance": [],
"authorship_tag": "ABX9TyN7NEAsj4c9475ydcDzdUKe",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"accelerator": "GPU"
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/mmaithani/data-science/blob/main/informers_for_LSTF.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "hlt4oBEDC4BT"
},
"source": [
"#Clone the repo"
]
},
{
"cell_type": "code",
"metadata": {
"id": "KS6sPDs8CT5w"
},
"source": [
"!git clone https://github.com/zhouhaoyi/Informer2020.git"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "HcPzEXANEFOt"
},
"source": [
"% cd Informer2020"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "lqgl4w_TCsM0"
},
"source": [
"!ls"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "SCLr21RCC8Dm"
},
"source": [
"# install dependency"
]
},
{
"cell_type": "code",
"metadata": {
"id": "xXLMnXh2Cf3q"
},
"source": [
"! pip install -r requirements.txt"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "ygopd7BWCmLu"
},
"source": [
"import pandas as pd"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "AHZzCgSSHrTD"
},
"source": [
"f=pd.read_csv(\"/content/Informer2020/data/ETT/ETTh1.csv\")"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "EZ-MpTIYHzH9"
},
"source": [
"f.head()"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "RNaGPMlhH0We"
},
"source": [
"m1=pd.read_csv(\"/content/Informer2020/data/ETT/ETTm1.csv\")\r\n",
"m1.head()"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "odttUSOCJjxL"
},
"source": [
"# run code in local machine as it takes time and colab doesnt support full requirements"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "U16koLR1IT6g"
},
"source": [
"# ETTh1\r\n",
"!python -u main_informer.py --model informer --data ETTh1 --attn prob"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "aniLMuB1IpFZ"
},
"source": [
"# ETTh2\r\n",
"!python -u main_informer.py --model informer --data ETTh2 --attn prob"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "PuP3OmZTIugW"
},
"source": [
"# ETTm1\r\n",
"python -u main_informer.py --model informer --data ETTm1 --attn prob"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "sXXHK1xcJMas"
},
"source": [
"![result](https://github.com/zhouhaoyi/Informer2020/raw/main/img/result_univariate.png)\r\n"
]
},
{
"cell_type": "code",
"metadata": {
"id": "-buU5XSCJBOj"
},
"source": [
""
],
"execution_count": null,
"outputs": []
}
]
}