Cap Outliers
cap_outliersCaps numerical outliers by setting values beyond IQR bounds to the bound instead of removing them, while skipping columns with zero IQR. Returns capped counts, bounds, and skipped columns.
Instructions
Winsorize extreme values: values beyond the IQR bounds are set to the bound instead of being removed. Columns where IQR is 0 (flags, one-hot columns) are skipped. Capped columns become float. Args: dataset_id (str): ID of the dataset. columns (list[str], optional): Numerical columns to cap. Default is all numerical columns (consider excluding the target column). Returns: dict: how many values were capped in each column, the bounds used and the skipped columns.
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": {
"dataset_id": "<dataset_id>"
},
"name": "cap_outliers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| columns | No | ||
| dataset_id | Yes |