Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different result for exponential and power compare to excel #89

Open
ektadesai22 opened this issue Apr 2, 2019 · 4 comments
Open

Different result for exponential and power compare to excel #89

ektadesai22 opened this issue Apr 2, 2019 · 4 comments

Comments

@ektadesai22
Copy link

How to reproduce,

  1. Have this data set
    [1, 2],
    [1, 3],
    [4, 4],
    [4, 5]
    [3, 6]
    [3, 7]
    [5, 8]
    [5, 9]
    [1, 10]

  2. Excel results are
    image

  3. Whereas library give us below result
    image

@kapil1201
Copy link

I faced the same issue, apparently there are two different method to find non linear regression coefficients. One is by converting the equation to linear and then minimizing it, and other one is minimizing the non linear function.
Σi(ln(yi)−(A+B xi))2
Σi(yi−a exp(b xi))2
Excel uses the former one, whereas this library uses the latter one. There is no mean involved in this method, but the linear way includes means.
I had to update the exponential code to meet this expectation.

@ektadesai22
Copy link
Author

I faced the same issue, apparently there are two different method to find non linear regression coefficients. One is by converting the equation to linear and then minimizing it, and other one is minimizing the non linear function.
Σi(ln(yi)−(A+B xi))2
Σi(yi−a exp(b xi))2
Excel uses the former one, whereas this library uses the latter one. There is no mean involved in this method, but the linear way includes means.
I had to update the exponential code to meet this expectation.

@kapil1201 - Thank you for the reply.

Did you get similar issue for Power and Polynomial regression also?
Would you be kind to help us by sharing your algorithm changes or make a pull request?

@ektadesai22
Copy link
Author

@kapil1201 - Could you please respond to this?

@kapil1201
Copy link

We have used MLjs library for this purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants