vega / vegafusion

Serverside scaling for Vega and Altair visualizations
https://vegafusion.io
BSD 3-Clause "New" or "Revised" License
303 stars 15 forks source link

Support linear regression transform #401

Open jonmmease opened 9 months ago

jonmmease commented 9 months ago

DataFusion recently got support for linear regression aggregate functions (https://github.com/apache/arrow-datafusion/pull/7211). Postgres and DuckDB also support these functions (I haven't looked into other dialects).

We can use these to implement the vega regression transform for type == "linear".

With a bit of manipulation, we should also be able to implement log(x) regression. I don't think the other regression types are expressible in terms of linear regression though.