Polynomial Features
polynomial_featuresCreates polynomial and interaction features (x², x*y) from numerical columns for model training. Replaces selected columns with the expanded set, keeping originals; impute missing values first.
Instructions
Create polynomial and interaction features (e.g. x^2 and x*y) from numerical columns. The selected columns are replaced by the expanded set, which still contains the originals. Missing values must be imputed first. Args: dataset_id (str): ID of a dataset or of a split. columns (list[str], optional): Numerical columns to expand (max 8). If omitted, all numerical columns. degree (int): Polynomial degree, 2 to 4. Default is 2. interaction_only (bool): Only create interactions between columns (no squares). Default is False. include_bias (bool): Add a constant column of ones named "bias". Default is False. Returns: dict: Columns used and the new feature names.
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": "polynomial_features"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| degree | No | ||
| columns | No | ||
| dataset_id | Yes | ||
| include_bias | No | ||
| interaction_only | No |