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<00:49, 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(
/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): 4%|▎ | 5/141 [00:00<00:10, 12.79it/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): 6%|▋ | 9/141 [00:00<00:07, 18.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(
/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:00<00:07, 16.48it/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): 12%|█▏ | 17/141 [00:00<00:05, 22.62it/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): 15%|█▍ | 21/141 [00:01<00:04, 25.76it/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): 17%|█▋ | 24/141 [00:01<00:04, 26.62it/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): 20%|█▉ | 28/141 [00:01<00:04, 27.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(
/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): 23%|██▎ | 33/141 [00:01<00:03, 27.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(
/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:01<00:03, 27.00it/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:01<00:03, 27.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(
Testing configurations (2 workers): 30%|███ | 43/141 [00:01<00:03, 25.17it/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): 33%|███▎ | 47/141 [00:02<00:03, 26.79it/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): 35%|███▌ | 50/141 [00:02<00:03, 25.63it/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): 38%|███▊ | 53/141 [00:02<00:03, 24.24it/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): 40%|███▉ | 56/141 [00:02<00:03, 23.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): 42%|████▏ | 59/141 [00:02<00:03, 22.71it/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): 44%|████▍ | 62/141 [00:02<00:03, 20.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(
/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): 46%|████▌ | 65/141 [00:02<00:03, 20.61it/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): 48%|████▊ | 68/141 [00:03<00:03, 19.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(
Testing configurations (2 workers): 50%|████▉ | 70/141 [00:03<00:04, 16.46it/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:03<00:04, 16.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(
/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:03<00:03, 19.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(
/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): 56%|█████▌ | 79/141 [00:03<00:03, 16.74it/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): 59%|█████▉ | 83/141 [00:03<00:03, 19.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(
Testing configurations (2 workers): 60%|██████ | 85/141 [00:04<00:03, 14.79it/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:04<00:04, 12.22it/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:04<00:05, 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): 65%|██████▍ | 91/141 [00:05<00:05, 8.53it/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:05<00:05, 8.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(
Testing configurations (2 workers): 66%|██████▌ | 93/141 [00:05<00:05, 8.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(
/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:05<00:04, 10.00it/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:05<00:06, 6.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:06<00:07, 5.72it/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:06<00:05, 6.68it/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): 73%|███████▎ | 103/141 [00:06<00:04, 8.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(
/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:07<00:07, 4.97it/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): 77%|███████▋ | 108/141 [00:07<00:05, 6.32it/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): 77%|███████▋ | 109/141 [00:08<00:05, 5.69it/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): 79%|███████▉ | 112/141 [00:08<00:03, 8.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(
Testing configurations (2 workers): 81%|████████ | 114/141 [00:09<00:05, 4.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(
/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:09<00:04, 4.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(
/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:09<00:04, 5.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(
Testing configurations (2 workers): 86%|████████▌ | 121/141 [00:10<00:03, 6.15it/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:11<00:04, 4.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(
Testing configurations (2 workers): 89%|████████▊ | 125/141 [00:11<00:04, 3.93it/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): 90%|█████████ | 127/141 [00:11<00:03, 4.62it/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): 91%|█████████▏| 129/141 [00:12<00:02, 5.16it/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:12<00:02, 4.32it/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:13<00:02, 4.08it/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:13<00:02, 3.18it/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): 96%|█████████▋| 136/141 [00:14<00:01, 3.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(
Testing configurations (2 workers): 98%|█████████▊| 138/141 [00:15<00:01, 2.72it/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:16<00:00, 2.68it/s]
Testing configurations (2 workers): 100%|██████████| 141/141 [00:16<00:00, 2.75it/s]
Testing configurations (2 workers): 100%|██████████| 141/141 [00:16<00:00, 8.44it/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()