Spline Smoothing Expr
Spline Smoothing
Iteration related helper expressions
Functions:
| Name | Description |
|---|---|
smooth_spline |
Fits a smoothing cubic spline f and returns f(x). The user must make sure |
smooth_spline(x, y, lambda_)
Fits a smoothing cubic spline f and returns f(x). The user must make sure that x is sorted and strictly increasing.
For more details, see the maths/ folder in the repo.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
str | Expr
|
The x values of the points |
required |
y
|
str | Expr
|
The y values of the points |
required |
lambda_
|
float
|
The regularization factor. The larger, the smoother and less kinks the curve will have. |
required |
Source code in python/polars_ds/exprs/expr_spline.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |