polynomial_raw_coefficients
polynomial_raw_coefficients(model, feature_names)Returns the coefficients of a fitted polynomial model in terms of the raw inputs.
The polynomial pipeline is PolynomialFeatures -> StandardScaler -> Ridge, so the Ridge coefficients apply to standardised polynomial terms. Undoing the scaling gives y = intercept + sum_k coef_k * term_k(x) in the original units.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| model | Any | A fitted polynomial pipeline from fit_all_robust_mean_models. |
required |
| feature_names | list | Names of the input columns, in training order. | required |
Returns
| Name | Type | Description |
|---|---|---|
| tuple | float | (intercept, coefs, terms), where terms are the polynomial term |
| np.ndarray | names (e.g. 'Length^2', 'Length Angle'), excluding the constant term. |