MCP Tools
ochreml_compare
Lightweight AutoML that cross-validates top OchreML estimators and optionally saves the winner to .dit.
ochreml_compare runs deterministic K-Fold cross-validation (seed=42) across OchreML's top candidate estimators for the detected task, ranks them in a leaderboard, and optionally refits the winning model on the full dataset and saves it to .dit.
It is backed by ochreml._ops.op_compare().
Input Schema
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data_path | string | Yes | — | Path to dataset (CSV, TSV, or Parquet). |
target | string | Yes | — | Target column name. |
task | string | No | "auto" | Enum: "auto", "classification", or "regression". |
device | string | No | "auto" | Target device (auto, cpu, cuda:0, cuda:all, wgpu, tpu). |
cv | integer | No | 3 | Number of K-Fold splits (must be >= 2 and <= n_samples). |
out_path | string | No | null | Optional .dit path to refit and save the winning model (.dit extension enforced). |
Candidate Estimators
- Classification (ranked by
accuracy):LogisticRegressionRidgeClassifierDecisionTreeClassifier(max_depth=8)RandomForestClassifier(n_estimators=20, max_depth=8)ExtraTreesClassifier(n_estimators=20, max_depth=8)HistGradientBoostingClassifier(max_iter=30)GaussianNB
- Regression (ranked by
r2):LinearRegressionRidge(alpha=1.0)DecisionTreeRegressor(max_depth=8)RandomForestRegressor(n_estimators=20, max_depth=8)ExtraTreesRegressor(n_estimators=20, max_depth=8)HistGradientBoostingRegressor(max_iter=30)
Example JSON-RPC Call
{
"jsonrpc": "2.0",
"id": 9,
"method": "tools/call",
"params": {
"name": "ochreml_compare",
"arguments": {
"data_path": "data/housing.csv",
"target": "price",
"cv": 3,
"device": "auto",
"out_path": "models/housing_winner.dit"
}
}
}Response Fields
| Field | Type | Description |
|---|---|---|
task | string | Resolved task ("classification" or "regression"). |
metric | string | Ranking metric ("accuracy" or "r2"). |
cv | integer | Number of CV folds used. |
device | string | Requested device. |
n_samples | integer | Dataset row count. |
n_features | integer | Feature column count. |
best_model | string | null | Winning estimator class name. |
best_score | number | null | Mean CV score of the winner. |
out_path | string | null | Saved .dit path if out_path was provided. |
leaderboard | object[] | Sorted entries with model, mean_score, std_score, cv_time_sec, status ("ok" or "error"), and optional error. |