From 7b6bf5737698ab560ba401ded6eeb8ecfaabbacb Mon Sep 17 00:00:00 2001 From: JustGlowing Date: Thu, 1 Feb 2024 17:51:04 +0100 Subject: [PATCH] time series notebook download data --- examples/TimeSeries.ipynb | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/examples/TimeSeries.ipynb b/examples/TimeSeries.ipynb index 97c18a5..66f1495 100644 --- a/examples/TimeSeries.ipynb +++ b/examples/TimeSeries.ipynb @@ -1,12 +1,5 @@ { "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Requirements: data from https://archive.ics.uci.edu/ml/machine-learning-databases/00396/Sales_Transactions_Dataset_Weekly.csv" - ] - }, { "cell_type": "code", "execution_count": 1, @@ -28,7 +21,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 5, "metadata": {}, "outputs": [ { @@ -54,9 +47,9 @@ "source": [ "%autoreload 2\n", "import pandas as pd\n", - "# data from\n", - "# https://archive.ics.uci.edu/ml/datasets/Sales_Transactions_Dataset_Weekly\n", - "sales_transaction = pd.read_csv('Sales_Transactions_Dataset_Weekly.csv')\n", + "\n", + "data_url = 'https://archive.ics.uci.edu/ml/machine-learning-databases/00396/Sales_Transactions_Dataset_Weekly.csv'\n", + "sales_transaction = pd.read_csv(data_url)\n", "data = sales_transaction[[f'Normalized {i}' for i in range(52)]].values\n", "som = MiniSom(8, 8, data.shape[1], sigma=2., learning_rate=0.5, \n", " neighborhood_function='gaussian', random_seed=10)\n", @@ -68,7 +61,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 6, "metadata": {}, "outputs": [ {