AUTOMATICALLY SELECT THE OPTIMAL POLYNOMIAL ORDER USING R2

Automatically selects the lowest-order polynomial that achieves a target R² goodness-of-fit for a given curve, using binary search up to a configurable maximum order. Use this worker to determine the most parsimonious polynomial representation of a raw curve before downstream fitting or surrogate-model steps.

When to use

Classification: process.

Tagged: binary_search, curve_fitting, goodness_of_fit, model_selection, optimal_order, polynomial, r2, regression.

Inputs

Label ID Type Default Required Description
Base Curve base_curve vector   The reference or raw XY curve to be fitted; supplied as a vector of coordinate pairs — required in practice even though marked optional, as it is the curve against which all polynomial orders are evaluated.
Target R2 target_r2 string 0.999   R² threshold (dimensionless, 0–1) that the fitted polynomial must meet or exceed; the worker selects the lowest order satisfying this threshold, defaulting to 0.999 when omitted.
Max Order max_order string 10   Upper bound (positive integer) on the polynomial degree to consider during binary search; orders from 1 to this value are evaluated, defaulting to 10 when omitted.

Outputs

Label ID Type Description
Selected Polynomial Order selected_order keyvalue Key-value record containing the chosen polynomial degree — the lowest order whose R² meets the target, or the best-found order if the target was never reached.
R2 At Selected Order selected_r2 keyvalue Key-value record reporting the R² score (dimensionless, 0–1) of the polynomial fit at the selected order.
Fitted Polynomial Curve fitted_curve vector XY vector of the polynomial curve evaluated at the original abscissa points of the base curve, using the selected optimal order.
Order vs R2 Evaluation Table evaluation_table dataset Tabular dataset listing each candidate polynomial order alongside its corresponding R² value, enabling inspection of the full order-vs-fit-quality trade-off.

Disciplines

  • ai_ml.model_selection
  • ai_ml.supervised.regression
  • data.curve.transform

Auto-generated from transformation schema. Worker id: curve_get_optimal_polynomial_order. Schema hash: b0e25959df34. Hand-curated docs in workerexamples/ override this page when present.