Linear Regression
linear_regressionTrain an ordinary least squares regression model on a prepared numerical split, then evaluate train/test metrics and return model details for prediction and comparison.
Instructions
Train an ordinary least squares linear regression on a split and evaluate it on train and test. The split must have only numerical, complete features (run encode_categorical / impute_missing first). Args: split_id (str): ID of a split made by train_test_split. fit_intercept (bool): Learn an intercept. Default is True. positive (bool): Force all coefficients to be non-negative. Default is False. scale (bool): Standardise the features first (same predictions, but coefficients become comparable between features). Default is True. Returns: dict: model_id (use it in plots and other model tools), train/test metrics (R2, MAE, MSE, RMSE, MAPE), top features and warnings such as possible overfitting.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"split_id": "<split_id>"
},
"name": "linear_regression"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | ||
| positive | No | ||
| split_id | Yes | ||
| fit_intercept | No |