Logistic Regression
logistic_regressionTrain a binary or multiclass logistic regression classifier on a prepared numerical split to get a baseline model, evaluation metrics, and top features for interpretation.
Instructions
Train a logistic regression classifier (binary or multiclass). A fast, interpretable baseline. 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 (stratify=True is advisable for classes). C (float): Inverse regularisation strength, greater than 0. Smaller values regularise more. Default is 1.0. max_iter (int): Maximum solver iterations. Default is 1000. fit_intercept (bool): Learn an intercept. Default is True. class_weight (str, optional): "balanced" re-weights classes inversely to their size (helps with imbalance). Default is None. scale (bool): Standardise the features first (recommended; makes coefficients comparable). Default is True. Returns: dict: model_id (use it in plots such as roc_curve), train/test metrics (accuracy, precision, recall, F1, ROC-AUC), top features and warnings (imbalance, overfitting, no better than the majority class).
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": "logistic_regression"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| C | No | ||
| scale | No | ||
| max_iter | No | ||
| split_id | Yes | ||
| class_weight | No | ||
| fit_intercept | No |