Elastic Net
elastic_netTrain a regularized regression model that blends L1 and L2 penalties on a numeric, complete train-test split, then return evaluation metrics and top features.
Instructions
Train an Elastic Net regression, a mix of L1 (Lasso) and L2 (Ridge) regularisation. The split must have only numerical, complete features. Args: split_id (str): ID of a split made by train_test_split. alpha (float): Overall regularisation strength, greater than 0. Default is 1.0. l1_ratio (float): Mix between 0 (pure Ridge) and 1 (pure Lasso). Default is 0.5. fit_intercept (bool): Learn an intercept. Default is True. max_iter (int): Maximum solver iterations. Default is 10000. scale (bool): Standardise the features first. Strongly recommended. Default is True. Returns: dict: model_id, train/test metrics (R2, MAE, MSE, RMSE, MAPE), top features and warnings.
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": "elastic_net"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alpha | No | ||
| scale | No | ||
| l1_ratio | No | ||
| max_iter | No | ||
| split_id | Yes | ||
| fit_intercept | No |