Tom-Alexander/regression-js

Tridimensional regression

developerscysnergy opened this issue · 1 comments

Hi!

I'm strugglin to calculate a tridimensional regression with this library but I have not managed to get it.

The way i'm using the library is:

let reducedData = [ [ 1667, 3.1, 121.85842831433713 ],
                    [ 22718, 5.9, 1122.03863037752414 ],
                    [ 28183, 15.1, 1013.48074921956295 ],
                    [ 23373, 26.4, 1064.5204382638011 ],
                    [ 34321, 12.7, 1035.07278573516516 ],
                    [ 24481, 23.5, 1011.3800886739218 ],
                    [ 23761, 26.7, 1029.49258788648878 ],
                    [ 32158, 29.4, 1017.19981583793738 ],
                    [ 27329, 13.5, 1035.19970685232686 ],
                    [ 29957, 8.2, 1074.35745688197497 ],
                    [ 18026, 9.8, 1092.25629791894852 ] ];
regression('polynomial', reducedData, 2);

I know it's an old version (1.4.0) but I didn't managed to get it with the latest version neither.

The result that I expect is something like: z = 1443.34 - 0.03x - 0.4y + 0.000006x² + 0.01y² - 0.0032 xy

Is there a way to calculate it with this lib? Otherwise it would be a useful feature!

Thanks in advance!

This is not currently supported