regimetry
regimetry copied to clipboard
Unsupervised regime detection for financial time series using embeddings and clustering.
### 📌 Context Edit: Have decided on `ForecastReportService` instead of `ForecastEvaluationService` so will edit instances of it in the description We’ve completed the numerical evaluation pipeline in `ForecastReportService`. Now we...
**Goal**: Provide diagnostic evaluation of both forecast model and classifier. #### 📈 Outputs: * Forecast loss plot (loss vs epoch) * KNN accuracy (on val or held-out) * Per-cluster confusion...
**📌 Goal** Ensure that each forecast model training run preserves the exact `training_profile.yaml` used by copying it to the `output_dir` as `training_profile_used.yaml`. --- **🛠️ Implementation Steps** 1. After training completes,...
#### 🎯 Goal: Enable saving the best-performing model (by validation loss or another metric) via a `ModelCheckpoint` callback — alongside the standard final model. #### 📦 Deliverables: * [ ]...
**Goal**: Train a KNN model to map forecasted embeddings to cluster IDs. #### 🔧 Implementation: * Create `ClassifierTrainerService` * Accepts normalized `Y`, `Y_cluster` * Trains `KNeighborsClassifier(n_neighbors=5)` * Saves model to...
Goal: Improve mapping persistence logic to avoid writing unnecessary regime_label_mapping.json files when the cluster mapping is a 1:1 identity (i.e., no remapping actually occurred). 🔧 Changes Required: In ClusterLabelAlignerService, add...
This flag enables optional cleanup of the baseline metadata directory (e.g., artifacts/baseline_metadata/...) prior to analysis runs. The existing `--clean` flag continues to control removal of embedding and clustering output directories,...
1️⃣ part A train — Train the Forecasting Pipeline Builds a forecaster model to predict Cluster_ID[t+1] from [E_{t−(W−1)}, ..., E_t] KNN classifier moved to Part B Steps: Load embeddings.npy and...
### 🧭 Task: Implement `RegimeProjectionService` for Post-Remap Projections #### 📌 Description Create a centralized projection service that generates **t-SNE and UMAP projections using the final remapped `Cluster_IDs`** after regime assignment....
The Cluster_ID assignments in projection files (e.g. tsne_projection.csv) appear spatially incorrect and inconsistent with the t-SNE coordinate structure. This leads to incorrect regime coloring in plots and misinterpretation of clustering...