executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
representationGuides PyPOTS time-series representation learning with TS2Vec, including embedding outputs, encoding windows, downstream use, and validation checks.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when the user wants embeddings or vector representations of partially-observed time series rather than direct labels, forecasts, or imputed values.
represent()"predict()[\"representation\"]"../../references/data-formats.md#representation for X, labels, and
HDF5 input shape.../../references/api-reference.md for result keys and helper methods.../../references/model-overview.md#representation for the supported
representation model family.../../references/troubleshooting.md for data, checkpoint, and backend
failures.../classification/ if the user wants the TS2Vec classifier wrapper.This route covers:
pypots.representation.TS2Vec.X.predict()["representation"] versus represent().Route elsewhere:
../classification/.../clustering/.../imputation/.../cli/.X with shape [n_samples, n_steps, n_features].y can be included in train/validation data when following the native
test-style setup, but the core goal is representation learning.TS2Vec with:
n_stepsn_featuresn_output_dimsd_hiddenn_layersmask_modeepochs, batch_size, optimizer,
device, and saving_pathfit(train_set, val_set).predict(test_set) for per-timestep representations or represent()
for direct embedding extraction.from pypots.representation import TS2Vec
model = TS2Vec(
n_steps=n_steps,
n_features=n_features,
n_output_dims=2,
d_hidden=64,
n_layers=2,
epochs=1,
device="cpu",
)
model.fit({"X": train_X, "y": train_y}, {"X": val_X, "y": val_y})
results = model.predict({"X": test_X})
sequence_rep = results["representation"]
series_rep = model.represent({"X": test_X}, encoding_window="full_series")
Native tests expect predict() to return a 3D representation and
represent(..., encoding_window="full_series") to return a 2D matrix whose last
dimension is n_output_dims.
n_output_dims, d_hidden, and epochs for smoke checks.A successful representation workflow returns finite embedding arrays. Native
style checks assert that predict() returns a 3D array and full-series
represent() returns a 2D array with the configured embedding dimension.