.. _auto_curve_segmented_linear_fit: *PERFORM A LINEAR FIT AND RETURN THE SLOPES* ============================================ Fits a curve with one or more piecewise-linear (or secant) segments and returns the resulting slope(s) and fit statistics as a dataset. Use this worker to extract stiffness regions, identify multi-phase behaviour, or characterise yield transitions from any X-Y curve. When to use ----------- Classification: **process**. Tagged: ``curve_fit``, ``linear_regression``, ``piecewise_linear``, ``r2``, ``secant``, ``segmented_linear_fit``, ``segments``, ``slope``. Inputs ------ .. list-table:: :header-rows: 1 :widths: 20 20 20 20 20 20 * - Label - ID - Type - Default - Required - Description * - Curve - curve - vector - — - - Input X-Y curve (vector pair) to be segmented and fitted; accepts any unit-consistent curve, e.g. force-displacement or stress-strain. * - Number Of Segments - numberof_segments - scalar - 1 - - Maximum number of piecewise linear segments to fit; integer ≥ 1, defaults to 1 (single global linear fit). * - R2 Limit - r2limit - scalar - 1 - - R² threshold in the range (0, 1] below which the segmentation algorithm stops adding a new segment; default 1.0 (fits until all segments are used). * - Min Percentage Of Points - minpercentageof_points - scalar - 1 - - Minimum fraction of total curve points (0–1 scale) that must be consumed by the current segment before the R² stopping criterion is evaluated; prevents trivially short segments from terminating the fit prematurely. * - Fit Type - fittype - scalar - linear - - Fitting method: 'linear' uses ordinary least-squares regression (default), 'secant' forces the fit line through the actual data endpoints of each segment. Outputs ------- .. list-table:: :header-rows: 1 :widths: 20 20 20 20 * - Label - ID - Type - Description * - curve_segmented_linear_fit_output_1 - curve_segmented_linear_fit_output_1 - dataset - Dataset table containing one row per fitted segment with columns for segment index, start/end X values, slope, intercept, and R² goodness-of-fit score. Disciplines ----------- - ai_ml.supervised.regression - data.curve.transform - engineering.material.characterization Runnable example ---------------- A runnable example is registered for this worker. Open the example workflow on the d3VIEW canvas: `/api/workflow/example?id=curve_segmented_linear_fit `_ .. raw:: html

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