Generate trend lines from point data.


  • 2.1.0: Add predictX
  • 2.0.1: Fix error in percentile calculation for robust estimation.
  • 2.0.0: Add robust trendline calculation using Theil-Sen estimators.
  • 1.0.0: Initial release

Help Wanted!

We currently only generate linear trend lines from two-dimensional data, but would welcome PRs for multivariate regressions and nonlinear regressions.

Also if you spot a doc error, please do open a PR! I do not have a strong background in statistics, but I needed these functions so I wrote them. The technical details of the explanations might be sub-par, and I would appreciate your help.

Climate Action

I want my open-source activities to support projects addressing the climate crisis (for example, projects in clean energy, public transit, reforestation, or sustainable agriculture.) If you are working on such a project, and find a bug or missing feature in any of my libraries, please let me know and I will treat your issue as high priority. I'd also be happy to support such projects in other ways. In particular, I've worked with Elm for a long time and would be happy to advise on your implementation.


BSD 3-Clause (see LICENSE)