polynomial_features
Generate polynomial and interaction features from numeric columns to capture non-linear relationships when linear models underfit. Use degree and interaction_only to control terms.
Instructions
Create polynomial and interaction features from numeric columns. degree=2 creates x^2 and x1*x2 terms. interaction_only=True skips powers (x^2). Use when linear models underfit: polynomial features capture non-linear relationships. Example: polynomial_features(columns=["Revenue","Weight"], degree=2)
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": {
"columns": "<columns>"
},
"name": "polynomial_features"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| degree | No | ||
| columns | Yes | ||
| df_name | No | ||
| interaction_only | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |