diff --git a/notebooks/01.0-mc-datasets.ipynb b/notebooks/01.0-mc-datasets.ipynb
index 21e8050..187299a 100644
--- a/notebooks/01.0-mc-datasets.ipynb
+++ b/notebooks/01.0-mc-datasets.ipynb
@@ -1636,28 +1636,6 @@
"datasets"
]
},
- {
- "cell_type": "code",
- "execution_count": 20,
- "metadata": {
- "ExecuteTime": {
- "end_time": "2020-11-01T23:22:14.540113Z",
- "start_time": "2020-11-01T23:22:14.490588Z"
- }
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "columns_forecast ['holiday', 'month', 'day', 'week', 'hour', 'minute', 'dayofweek']\n",
- "columns_past {'rain_1h', 'weather_main', 'clouds_all', 'temp', 'snow_1h', 'weather_description'}\n",
- "columns_target ['traffic_volume']\n"
- ]
- }
- ],
- "source": []
- },
{
"cell_type": "code",
"execution_count": 23,
@@ -3365,6 +3343,7 @@
" d = dataset(datasets_root)\n",
" display(HTML(f\"
{dataset.__name__}
\"))\n",
" print(d.__doc__)\n",
+ " print(f'{len(d)} rows at freq{d.index.freq.freqstr}')\n",
" print('columns_forecast', d.columns_forecast)\n",
" print('columns_past', d.columns_past)\n",
" print('columns_target', d.columns_target)\n",
@@ -3374,307 +3353,14 @@
},
{
"cell_type": "code",
- "execution_count": 7,
+ "execution_count": 25,
"metadata": {
"ExecuteTime": {
- "end_time": "2020-11-01T08:32:56.793986Z",
- "start_time": "2020-11-01T08:32:33.816269Z"
+ "end_time": "2020-11-01T23:37:29.680397Z",
+ "start_time": "2020-11-01T23:37:29.620610Z"
}
},
- "outputs": [
- {
- "data": {},
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.holoviews_exec.v0+json": "",
- "text/html": [
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "
\n",
- "
\n",
- ""
- ],
- "text/plain": [
- ":DynamicMap []\n",
- " :Overlay\n",
- " .RGB.I :RGB [TIME,SPD] (R,G,B,A)\n",
- " .RGB.II :RGB [TIME,SPD] (R,G,B,A)\n",
- " .RGB.III :RGB [TIME,SPD] (R,G,B,A)"
- ]
- },
- "metadata": {
- "application/vnd.holoviews_exec.v0+json": {
- "id": "1001"
- }
- },
- "output_type": "display_data"
- },
- {
- "data": {},
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.holoviews_exec.v0+json": "",
- "text/html": [
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "
\n",
- "
\n",
- ""
- ],
- "text/plain": [
- ":DynamicMap []\n",
- " :Overlay\n",
- " .RGB.I :RGB [index,log_pm2.5] (R,G,B,A)\n",
- " .RGB.II :RGB [index,log_pm2.5] (R,G,B,A)\n",
- " .RGB.III :RGB [index,log_pm2.5] (R,G,B,A)"
- ]
- },
- "metadata": {
- "application/vnd.holoviews_exec.v0+json": {
- "id": "1458"
- }
- },
- "output_type": "display_data"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Using downloaded and verified file: ../data/processed/gas-sensor-array-temperature-modulation.zip\n"
- ]
- },
- {
- "data": {},
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.holoviews_exec.v0+json": "",
- "text/html": [
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "
\n",
- "
\n",
- ""
- ],
- "text/plain": [
- ":DynamicMap []\n",
- " :Overlay\n",
- " .RGB.I :RGB [Time (s),R1 (MOhm)] (R,G,B,A)\n",
- " .RGB.II :RGB [Time (s),R1 (MOhm)] (R,G,B,A)\n",
- " .RGB.III :RGB [Time (s),R1 (MOhm)] (R,G,B,A)"
- ]
- },
- "metadata": {
- "application/vnd.holoviews_exec.v0+json": {
- "id": "1915"
- }
- },
- "output_type": "display_data"
- },
- {
- "data": {},
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.holoviews_exec.v0+json": "",
- "text/html": [
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "
\n",
- "
\n",
- ""
- ],
- "text/plain": [
- ":DynamicMap []\n",
- " :Overlay\n",
- " .RGB.I :RGB [date,log_Appliances] (R,G,B,A)\n",
- " .RGB.II :RGB [date,log_Appliances] (R,G,B,A)\n",
- " .RGB.III :RGB [date,log_Appliances] (R,G,B,A)"
- ]
- },
- "metadata": {
- "application/vnd.holoviews_exec.v0+json": {
- "id": "2372"
- }
- },
- "output_type": "display_data"
- },
- {
- "data": {},
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.holoviews_exec.v0+json": "",
- "text/html": [
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "
\n",
- "
\n",
- ""
- ],
- "text/plain": [
- ":DynamicMap []\n",
- " :Overlay\n",
- " .RGB.I :RGB [date_time,traffic_volume] (R,G,B,A)\n",
- " .RGB.II :RGB [date_time,traffic_volume] (R,G,B,A)\n",
- " .RGB.III :RGB [date_time,traffic_volume] (R,G,B,A)"
- ]
- },
- "metadata": {
- "application/vnd.holoviews_exec.v0+json": {
- "id": "2829"
- }
- },
- "output_type": "display_data"
- }
- ],
+ "outputs": [],
"source": [
"# View train, test, val splits\n",
"l = hv.Layout()\n",
@@ -4293,355 +3979,27 @@
},
{
"cell_type": "code",
- "execution_count": 14,
+ "execution_count": 24,
"metadata": {
"ExecuteTime": {
- "end_time": "2020-11-01T08:33:34.188872Z",
- "start_time": "2020-11-01T08:33:13.520779Z"
+ "end_time": "2020-11-01T23:35:51.007327Z",
+ "start_time": "2020-11-01T23:35:50.946431Z"
}
},
- "outputs": [
- {
- "data": {},
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.holoviews_exec.v0+json": "",
- "text/html": [
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "
\n",
- "
\n",
- ""
- ],
- "text/plain": [
- ":Layout\n",
- " .Overlay.I :Overlay\n",
- " .NdOverlay.I :NdOverlay [column]\n",
- " :Curve [TIME] (tsp_days)\n",
- " .VLine.Now :VLine [x,y]\n",
- " .Overlay.II :Overlay\n",
- " .NdOverlay.I :NdOverlay [column]\n",
- " :Curve [TIME] (tsp_days)\n",
- " .VLine.Now :VLine [x,y]\n",
- " .Overlay.III :Overlay\n",
- " .NdOverlay.I :NdOverlay [column]\n",
- " :Curve [TIME] (tsp_days)\n",
- " .VLine.Now :VLine [x,y]"
- ]
- },
- "metadata": {
- "application/vnd.holoviews_exec.v0+json": {
- "id": "34646"
- }
- },
- "output_type": "display_data"
- },
- {
- "data": {},
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.holoviews_exec.v0+json": "",
- "text/html": [
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "
\n",
- "
\n",
- ""
- ],
- "text/plain": [
- ":Layout\n",
- " .Overlay.I :Overlay\n",
- " .NdOverlay.I :NdOverlay [column]\n",
- " :Curve [index] (week)\n",
- " .VLine.Now :VLine [x,y]\n",
- " .Overlay.II :Overlay\n",
- " .NdOverlay.I :NdOverlay [column]\n",
- " :Curve [index] (week)\n",
- " .VLine.Now :VLine [x,y]\n",
- " .Overlay.III :Overlay\n",
- " .NdOverlay.I :NdOverlay [column]\n",
- " :Curve [index] (week)\n",
- " .VLine.Now :VLine [x,y]"
- ]
- },
- "metadata": {
- "application/vnd.holoviews_exec.v0+json": {
- "id": "43614"
- }
- },
- "output_type": "display_data"
- },
- {
- "data": {},
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.holoviews_exec.v0+json": "",
- "text/html": [
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "
\n",
- "
\n",
- ""
- ],
- "text/plain": [
- ":Layout\n",
- " .Overlay.I :Overlay\n",
- " .NdOverlay.I :NdOverlay [column]\n",
- " :Curve [Time (s)] (tsp_days)\n",
- " .VLine.Now :VLine [x,y]\n",
- " .Overlay.II :Overlay\n",
- " .NdOverlay.I :NdOverlay [column]\n",
- " :Curve [Time (s)] (tsp_days)\n",
- " .VLine.Now :VLine [x,y]\n",
- " .Overlay.III :Overlay\n",
- " .NdOverlay.I :NdOverlay [column]\n",
- " :Curve [Time (s)] (tsp_days)\n",
- " .VLine.Now :VLine [x,y]"
- ]
- },
- "metadata": {
- "application/vnd.holoviews_exec.v0+json": {
- "id": "49957"
- }
- },
- "output_type": "display_data"
- },
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "BokehUserWarning: ColumnDataSource's columns must be of the same length. Current lengths: ('Press_mm_hg', 1), ('RH_1', 1), ('RH_2', 1), ('RH_3', 1), ('RH_4', 1), ('RH_5', 1), ('RH_6', 1), ('RH_7', 1), ('RH_8', 1), ('RH_9', 1), ('RH_out', 1), ('T1', 1), ('T2', 1), ('T3', 1), ('T4', 1), ('T5', 1), ('T6', 1), ('T7', 1), ('T8', 1), ('T9', 1), ('T_out', 1), ('Tdewpoint', 1), ('Visibility', 1), ('Windspeed', 1), ('color', 35), ('column', 35), ('date', 35), ('day', 1), ('dayofweek', 1), ('hour', 1), ('is_past', 1), ('lights', 1), ('line_width', 35), ('minute', 1), ('month', 1), ('muted_alpha', 35), ('rv1', 1), ('rv2', 1), ('tsp_days', 1), ('week', 1)\n",
- "BokehUserWarning: ColumnDataSource's columns must be of the same length. Current lengths: ('Press_mm_hg', 1), ('RH_1', 1), ('RH_2', 1), ('RH_3', 1), ('RH_4', 1), ('RH_5', 1), ('RH_6', 1), ('RH_7', 1), ('RH_8', 1), ('RH_9', 1), ('RH_out', 1), ('T1', 1), ('T2', 1), ('T3', 1), ('T4', 1), ('T5', 1), ('T6', 1), ('T7', 1), ('T8', 1), ('T9', 1), ('T_out', 1), ('Tdewpoint', 1), ('Visibility', 1), ('Windspeed', 1), ('color', 35), ('column', 35), ('date', 35), ('day', 1), ('dayofweek', 1), ('hour', 1), ('is_past', 1), ('lights', 1), ('line_width', 35), ('minute', 1), ('month', 1), ('muted_alpha', 35), ('rv1', 1), ('rv2', 1), ('tsp_days', 1), ('week', 1)\n",
- "BokehUserWarning: ColumnDataSource's columns must be of the same length. Current lengths: ('Press_mm_hg', 1), ('RH_1', 1), ('RH_2', 1), ('RH_3', 1), ('RH_4', 1), ('RH_5', 1), ('RH_6', 1), ('RH_7', 1), ('RH_8', 1), ('RH_9', 1), ('RH_out', 1), ('T1', 1), ('T2', 1), ('T3', 1), ('T4', 1), ('T5', 1), ('T6', 1), ('T7', 1), ('T8', 1), ('T9', 1), ('T_out', 1), ('Tdewpoint', 1), ('Visibility', 1), ('Windspeed', 1), ('color', 35), ('column', 35), ('date', 35), ('day', 1), ('dayofweek', 1), ('hour', 1), ('is_past', 1), ('lights', 1), ('line_width', 35), ('minute', 1), ('month', 1), ('muted_alpha', 35), ('rv1', 1), ('rv2', 1), ('tsp_days', 1), ('week', 1)\n"
- ]
- },
- {
- "data": {},
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.holoviews_exec.v0+json": "",
- "text/html": [
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "
\n",
- "
\n",
- ""
- ],
- "text/plain": [
- ":Layout\n",
- " .Overlay.I :Overlay\n",
- " .NdOverlay.I :NdOverlay [column]\n",
- " :Curve [date] (week)\n",
- " .VLine.Now :VLine [x,y]\n",
- " .Overlay.II :Overlay\n",
- " .NdOverlay.I :NdOverlay [column]\n",
- " :Curve [date] (week)\n",
- " .VLine.Now :VLine [x,y]\n",
- " .Overlay.III :Overlay\n",
- " .NdOverlay.I :NdOverlay [column]\n",
- " :Curve [date] (week)\n",
- " .VLine.Now :VLine [x,y]"
- ]
- },
- "metadata": {
- "application/vnd.holoviews_exec.v0+json": {
- "id": "53660"
- }
- },
- "output_type": "display_data"
- },
- {
- "data": {},
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.holoviews_exec.v0+json": "",
- "text/html": [
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "
\n",
- "
\n",
- ""
- ],
- "text/plain": [
- ":Layout\n",
- " .Overlay.I :Overlay\n",
- " .NdOverlay.I :NdOverlay [column]\n",
- " :Curve [date_time] (week)\n",
- " .VLine.Now :VLine [x,y]\n",
- " .Overlay.II :Overlay\n",
- " .NdOverlay.I :NdOverlay [column]\n",
- " :Curve [date_time] (week)\n",
- " .VLine.Now :VLine [x,y]\n",
- " .Overlay.III :Overlay\n",
- " .NdOverlay.I :NdOverlay [column]\n",
- " :Curve [date_time] (week)\n",
- " .VLine.Now :VLine [x,y]"
- ]
- },
- "metadata": {
- "application/vnd.holoviews_exec.v0+json": {
- "id": "55569"
- }
- },
- "output_type": "display_data"
- }
- ],
+ "outputs": [],
"source": [
"# View input columns\n",
"for dataset in datasets:\n",
" d = dataset(datasets_root)\n",
" display(plot_batches_x(d))"
]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
}
],
"metadata": {
diff --git a/notebooks/01.0-mc-datasets.py b/notebooks/01.0-mc-datasets.py
index af9aec3..c4c309c 100644
--- a/notebooks/01.0-mc-datasets.py
+++ b/notebooks/01.0-mc-datasets.py
@@ -78,12 +78,11 @@ from seq2seq_time.data.data import IMOSCurrentsVel, AppliancesEnergyPrediction,
datasets = [IMOSCurrentsVel, BejingPM25, GasSensor, AppliancesEnergyPrediction, MetroInterstateTraffic, ]
datasets
# -
-
-
for dataset in datasets:
d = dataset(datasets_root)
display(HTML(f"{dataset.__name__}
"))
print(d.__doc__)
+ print(f'{len(d)} rows at freq{d.index.freq.freqstr}')
print('columns_forecast', d.columns_forecast)
print('columns_past', d.columns_past)
print('columns_target', d.columns_target)
@@ -177,3 +176,5 @@ ds_train, ds_val, ds_test = d.to_datasets(window_past=window_past,
for dataset in datasets:
d = dataset(datasets_root)
display(plot_batches_x(d))
+
+