Pareto Optimization¶
Determine the optimal combination of segments and periods for time series aggregation.
Author: Leander Kotzur
In [1]:
Copied!
from pathlib import Path
import numpy as np
import pandas as pd
import plotly.express as px
import plotly.io as pio
import tsam
from tsam import ClusterConfig
from tsam.tuning import find_pareto_front
pio.renderers.default = "notebook_connected"
# Ensure results directory exists
RESULTS_DIR = Path("results")
RESULTS_DIR.mkdir(exist_ok=True)
from pathlib import Path
import numpy as np
import pandas as pd
import plotly.express as px
import plotly.io as pio
import tsam
from tsam import ClusterConfig
from tsam.tuning import find_pareto_front
pio.renderers.default = "notebook_connected"
# Ensure results directory exists
RESULTS_DIR = Path("results")
RESULTS_DIR.mkdir(exist_ok=True)
Input data¶
Read in time series from testdata.csv with pandas
In [2]:
Copied!
raw = pd.read_csv("testdata.csv", index_col=0)
raw = raw.rename(
columns={"T": "Temperature", "Load": "Demand", "Wind": "Wind", "GHI": "Solar"}
)
period_duration = 24
raw = pd.read_csv("testdata.csv", index_col=0)
raw = raw.rename(
columns={"T": "Temperature", "Load": "Demand", "Wind": "Wind", "GHI": "Solar"}
)
period_duration = 24
Plot the original data
In [3]:
Copied!
# Original data heatmaps using tsam.unstack_to_periods() with plotly
unstacked = tsam.unstack_to_periods(raw, period_duration=period_duration)
for col in raw.columns:
px.imshow(
unstacked[col].values.T,
labels={"x": "Day", "y": "Hour", "color": col},
title=f"Original {col}",
aspect="auto",
).show()
# Original data heatmaps using tsam.unstack_to_periods() with plotly
unstacked = tsam.unstack_to_periods(raw, period_duration=period_duration)
for col in raw.columns:
px.imshow(
unstacked[col].values.T,
labels={"x": "Day", "y": "Hour", "color": col},
title=f"Original {col}",
aspect="auto",
).show()
Find Pareto-optimal aggregations¶
Use find_pareto_front() to explore the Pareto-optimal combinations of periods and segments.
In [4]:
Copied!
pareto_results = find_pareto_front(
raw,
period_duration=period_duration,
timesteps=np.geomspace(5, 8760, 50).astype(int).tolist(),
cluster=ClusterConfig(method="hierarchical", representation="distribution"),
n_jobs=-1,
)
pareto_results = find_pareto_front(
raw,
period_duration=period_duration,
timesteps=np.geomspace(5, 8760, 50).astype(int).tolist(),
cluster=ClusterConfig(method="hierarchical", representation="distribution"),
n_jobs=-1,
)
Testing configurations (2 workers): 0%| | 0/141 [00:00<?, ?it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 1%| | 1/141 [00:00<01:11, 1.96it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 3%|▎ | 4/141 [00:00<00:17, 7.95it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 5%|▍ | 7/141 [00:00<00:12, 10.60it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 6%|▋ | 9/141 [00:01<00:14, 9.38it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 9%|▊ | 12/141 [00:01<00:10, 12.42it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 11%|█▏ | 16/141 [00:01<00:08, 14.35it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 13%|█▎ | 18/141 [00:01<00:08, 15.03it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 16%|█▌ | 22/141 [00:01<00:07, 15.91it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 18%|█▊ | 26/141 [00:02<00:07, 16.07it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 20%|█▉ | 28/141 [00:02<00:06, 16.57it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 22%|██▏ | 31/141 [00:02<00:06, 17.02it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 23%|██▎ | 33/141 [00:02<00:07, 15.01it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 26%|██▌ | 37/141 [00:02<00:07, 14.73it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 28%|██▊ | 40/141 [00:02<00:06, 14.57it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 30%|██▉ | 42/141 [00:03<00:07, 13.41it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 31%|███ | 44/141 [00:03<00:07, 13.59it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 33%|███▎ | 46/141 [00:03<00:06, 14.39it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 35%|███▍ | 49/141 [00:03<00:07, 11.88it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 36%|███▌ | 51/141 [00:03<00:07, 12.07it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 38%|███▊ | 54/141 [00:04<00:05, 14.87it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 40%|███▉ | 56/141 [00:04<00:07, 11.64it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 41%|████ | 58/141 [00:04<00:07, 10.49it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 43%|████▎ | 61/141 [00:04<00:08, 9.64it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 45%|████▍ | 63/141 [00:05<00:08, 9.59it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 47%|████▋ | 66/141 [00:05<00:06, 12.36it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 48%|████▊ | 68/141 [00:05<00:07, 9.38it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 50%|████▉ | 70/141 [00:05<00:09, 7.83it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 51%|█████ | 72/141 [00:06<00:08, 7.98it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 52%|█████▏ | 74/141 [00:06<00:07, 9.07it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 54%|█████▍ | 76/141 [00:06<00:06, 9.89it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 55%|█████▌ | 78/141 [00:06<00:05, 11.29it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 57%|█████▋ | 80/141 [00:07<00:07, 8.37it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 58%|█████▊ | 82/141 [00:07<00:06, 9.04it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 60%|█████▉ | 84/141 [00:07<00:05, 10.38it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 61%|██████ | 86/141 [00:07<00:08, 6.75it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 62%|██████▏ | 87/141 [00:08<00:11, 4.59it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 63%|██████▎ | 89/141 [00:09<00:13, 3.73it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 65%|██████▍ | 91/141 [00:09<00:14, 3.40it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 65%|██████▌ | 92/141 [00:10<00:14, 3.42it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 66%|██████▌ | 93/141 [00:10<00:13, 3.54it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 67%|██████▋ | 94/141 [00:10<00:11, 4.09it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 67%|██████▋ | 95/141 [00:10<00:09, 4.65it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 69%|██████▉ | 97/141 [00:11<00:15, 2.81it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 70%|██████▉ | 98/141 [00:12<00:15, 2.70it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 70%|███████ | 99/141 [00:12<00:18, 2.23it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 72%|███████▏ | 101/141 [00:13<00:13, 2.98it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 73%|███████▎ | 103/141 [00:13<00:09, 4.20it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 74%|███████▍ | 105/141 [00:14<00:14, 2.41it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 76%|███████▌ | 107/141 [00:15<00:11, 3.04it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 77%|███████▋ | 108/141 [00:15<00:10, 3.13it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 77%|███████▋ | 109/141 [00:16<00:13, 2.43it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 79%|███████▉ | 112/141 [00:16<00:07, 4.01it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 80%|████████ | 113/141 [00:18<00:14, 1.90it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 82%|████████▏ | 116/141 [00:18<00:08, 3.04it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 83%|████████▎ | 117/141 [00:19<00:10, 2.27it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 84%|████████▎ | 118/141 [00:19<00:08, 2.59it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 84%|████████▍ | 119/141 [00:19<00:08, 2.47it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 86%|████████▌ | 121/141 [00:20<00:06, 2.89it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 87%|████████▋ | 123/141 [00:22<00:09, 1.82it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 89%|████████▊ | 125/141 [00:23<00:08, 1.89it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 90%|█████████ | 127/141 [00:23<00:06, 2.12it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 91%|█████████▏| 129/141 [00:24<00:04, 2.43it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 92%|█████████▏| 130/141 [00:25<00:05, 2.11it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 94%|█████████▎| 132/141 [00:26<00:04, 1.87it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 95%|█████████▌| 134/141 [00:28<00:04, 1.52it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 96%|█████████▋| 136/141 [00:29<00:03, 1.49it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 98%|█████████▊| 138/141 [00:31<00:02, 1.27it/s]
/home/docs/checkouts/readthedocs.org/user_builds/tsam/checkouts/latest/src/tsam/tuning.py:86: FutureWarning: aggregate() result columns are sorted alphabetically in v3 but will follow the input DataFrame's order in v4; your columns are not alphabetical, so this output will change. To keep the v3 order, sort before (aggregate(data.sort_index(axis=1), ...)) or after (result.cluster_representatives.sort_index(axis=1)); to adopt v4 now, index results by column name, not position. To silence this warning: warnings.filterwarnings('ignore', category=FutureWarning, message='.*sorted alphabetically.*').
result = aggregate(
Testing configurations (2 workers): 99%|█████████▉| 140/141 [00:33<00:00, 1.28it/s]
Testing configurations (2 workers): 100%|██████████| 141/141 [00:33<00:00, 1.37it/s]
Testing configurations (2 workers): 100%|██████████| 141/141 [00:33<00:00, 4.15it/s]
Visualize the Pareto front - the trade-off between compression and accuracy.
In [5]:
Copied!
pareto_df = pd.DataFrame(
[
{
"timesteps": r.n_clusters * r.n_segments,
"periods": r.n_clusters,
"segments": r.n_segments,
"rmse": r.accuracy.rmse.mean(),
}
for r in pareto_results
]
)
fig = px.line(
pareto_df,
x="timesteps",
y="rmse",
markers=True,
labels={"timesteps": "Timesteps (periods x segments)", "rmse": "RMSE"},
title="Pareto Front: Compression vs Accuracy",
hover_data=["periods", "segments"],
range_y=(0, None),
)
fig.show()
pareto_df = pd.DataFrame(
[
{
"timesteps": r.n_clusters * r.n_segments,
"periods": r.n_clusters,
"segments": r.n_segments,
"rmse": r.accuracy.rmse.mean(),
}
for r in pareto_results
]
)
fig = px.line(
pareto_df,
x="timesteps",
y="rmse",
markers=True,
labels={"timesteps": "Timesteps (periods x segments)", "rmse": "RMSE"},
title="Pareto Front: Compression vs Accuracy",
hover_data=["periods", "segments"],
range_y=(0, None),
)
fig.show()
Show the final result
In [6]:
Copied!
last_result = pareto_results[-1]
print(
f"Final: {last_result.n_clusters} periods, {last_result.n_segments} segments, RMSE: {last_result.accuracy.rmse.mean():.4f}"
)
last_result = pareto_results[-1]
print(
f"Final: {last_result.n_clusters} periods, {last_result.n_segments} segments, RMSE: {last_result.accuracy.rmse.mean():.4f}"
)
Final: 365 periods, 24 segments, RMSE: 0.0000
In [7]:
Copied!
# Reconstructed data heatmaps
reconstructed = last_result.reconstructed
unstacked_recon = tsam.unstack_to_periods(
reconstructed, period_duration=period_duration
)
for col in reconstructed.columns:
px.imshow(
unstacked_recon[col].values.T,
labels={"x": "Day", "y": "Hour", "color": col},
title=f"Reconstructed {col}",
aspect="auto",
).show()
# Reconstructed data heatmaps
reconstructed = last_result.reconstructed
unstacked_recon = tsam.unstack_to_periods(
reconstructed, period_duration=period_duration
)
for col in reconstructed.columns:
px.imshow(
unstacked_recon[col].values.T,
labels={"x": "Day", "y": "Hour", "color": col},
title=f"Reconstructed {col}",
aspect="auto",
).show()
Animated visualization¶
Animate through all Pareto-optimal aggregations to visualize the trade-off between compression and accuracy.
In [8]:
Copied!
n_days = len(raw) // period_duration
n_vars = len(raw.columns)
# Get normalization parameters from original data
raw_min = raw.min()
raw_range = raw.max() - raw.min()
frames_data, labels = [], []
for result in reversed(pareto_results):
p, s = result.n_clusters, result.n_segments
labels.append(f"{round((1 - s * p / len(raw)) * 100, 1)}% ({p}p x {s}s)")
# Normalize at DataFrame level, then reshape
reconstructed = result.reconstructed
normalized = (reconstructed - raw_min) / raw_range
data = normalized.values.reshape(n_days, period_duration, n_vars).transpose(2, 1, 0)
frames_data.append(data.reshape(-1, n_days))
img_stack = np.stack(frames_data)
n_days = len(raw) // period_duration
n_vars = len(raw.columns)
# Get normalization parameters from original data
raw_min = raw.min()
raw_range = raw.max() - raw.min()
frames_data, labels = [], []
for result in reversed(pareto_results):
p, s = result.n_clusters, result.n_segments
labels.append(f"{round((1 - s * p / len(raw)) * 100, 1)}% ({p}p x {s}s)")
# Normalize at DataFrame level, then reshape
reconstructed = result.reconstructed
normalized = (reconstructed - raw_min) / raw_range
data = normalized.values.reshape(n_days, period_duration, n_vars).transpose(2, 1, 0)
frames_data.append(data.reshape(-1, n_days))
img_stack = np.stack(frames_data)
In [9]:
Copied!
fig = px.imshow(
img_stack,
animation_frame=0,
color_continuous_scale="RdYlBu_r",
aspect="auto",
labels={"x": "Day", "y": "Hour"},
title="Time Series Aggregation",
)
for i, step in enumerate(fig.layout.sliders[0].steps):
step["label"] = labels[i]
tickvals = [period_duration * i + period_duration // 2 for i in range(n_vars)]
fig.update_yaxes(tickvals=tickvals, ticktext=list(raw.columns))
fig.update_layout(height=600, coloraxis_showscale=False)
fig.show()
fig = px.imshow(
img_stack,
animation_frame=0,
color_continuous_scale="RdYlBu_r",
aspect="auto",
labels={"x": "Day", "y": "Hour"},
title="Time Series Aggregation",
)
for i, step in enumerate(fig.layout.sliders[0].steps):
step["label"] = labels[i]
tickvals = [period_duration * i + period_duration // 2 for i in range(n_vars)]
fig.update_yaxes(tickvals=tickvals, ticktext=list(raw.columns))
fig.update_layout(height=600, coloraxis_showscale=False)
fig.show()