Skip to main content

Module polynomial_features

Module polynomial_features 

Source
Expand description

Polynomial features: generate polynomial and interaction features.

Given input features [a, b] and degree 2, this transformer generates:

  • [1, a, b, a², a·b, b²] (default — interaction_only = false)
  • [1, a, b, a·b] (with interaction_only = true)

With include_bias = false, the constant column 1 is omitted.

This transformer is stateless — no fitting is needed. Call Transform::transform directly.

Structs§

PolynomialFeatures
A stateless polynomial feature generator.