Skip to content

PyAF 5.0 Final Touch 2: Disable alpha in ridge regressions #231

@antoinecarme

Description

@antoinecarme

To improve explainability, it is better to perform a real linear regression when estimating linear trends, polynomial and AR models.

PyAF uses sklearn.linear_model.Ridge model which uses a ridge parameter alpha = 1.0 by default which produces a non-zero residue mean error. Force alpha to be zero. This improves the detected cycles which are based on trend residues.

https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.Ridge.html

image

The impact on the model equation is not always noticeable. Exact models are improved (when the signal is an almost linear trend).

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions