Sklearn Polynomial Features icon

Sklearn Polynomial Features

Generate polynomial and interaction features using scikit-learn

Transform

AI-generated

Summary

Transform polynomial features using a fitted sklearn transformer

Inputs

  • transformerData (required) — JSON string containing the fitted transformer
  • transformFeatureColumns (required) — Comma-separated list of feature column names
  • pythonPath — Path to Python executable with scikit-learn installed

Output shape

a list of items, each containing the original record plus new fields for each generated polynomial feature

The number of new features is determined by the fitted transformer; the operation appends transformed values to each input row.

Examples

Example 1: Fit new data and generate polynomial features

operation=fitTransform, featureColumns='age,income', degree=2, includeBias=true, interactionOnly=false, pythonPath='python3'

Example 2: Transform existing data with a saved transformer

operation=transform, transformerData='{"degree":2,"include_bias":true,"interaction_only":false,"input_columns":["age","income"]}', transformFeatureColumns='age,income', pythonPath='python3'

Discussion