Skip to content

feat: Introduce Task-Aware Execution Tools for Classification and Regression#75

Merged
Shashankss1205 merged 5 commits into
sktime:mainfrom
amruth6002:feature/classification-regression-tools
May 30, 2026
Merged

feat: Introduce Task-Aware Execution Tools for Classification and Regression#75
Shashankss1205 merged 5 commits into
sktime:mainfrom
amruth6002:feature/classification-regression-tools

Conversation

@amruth6002
Copy link
Copy Markdown
Contributor

Description

fixes #46

Addresses the limitation discussed in #46 where fit_predict was severely constrained by hardcoding a forecasting horizon parameter. This prevented LLMs from utilizing sktime's rich collection of Time Series Classification (e.g., Rocket, HIVECOTEV2) and Regression models.

This PR introduces two dedicated, task-aware execution tools that allow the MCP to smoothly interact with supervised panel data out-of-the-box.

Key Changes

  1. New Tools: Added fit_predict_classification and fit_predict_regression to the existing toolset via src/sktime_mcp/tools/classify.py.
  2. Runtime Execution Details:
    • Created _resolve_supervised_data() in executor.py to seamlessly route execution either through new built-in demo datasets or via custom data handles passed through load_data_source.
    • Implemented evaluation metrics: the tools will automatically compute and return accuracy (for classifiers) or RMSE/MSE (for regressors) if test labels (y_test) are present in the dataset.
  3. Expanded Demo Data: Added dedicated classification variants (arrow_head, gunpoint, basic_motions, italy_power_demand) and regression variants (covid_3month, cardano_sentiment) to the dataset registries.
  4. Discoverability Fix: Refactored list_available_data and the underlying executor.list_datasets() to logically group demo datasets by analytical task (forecasting, classification, regression) so LLMs can easily discover what's available contextually.

Testing

  • Extended tests/test_core.py to ensure unit tests pass with the refactored categorized layout of list_datasets().
  • All 15 existing tests pass.

- New tools for time series classification and regression
- Support both demo datasets and custom data handles
- Classification demos: arrow_head, gunpoint, basic_motions, italy_power_demand
- Regression demos: covid_3month, cardano_sentiment
- Returns accuracy/RMSE metrics when ground truth is available
@Shashankss1205 Shashankss1205 merged commit 4f18fb4 into sktime:main May 30, 2026
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH] Implement dedicated execution tools for Classification and Regression

2 participants