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

Issue with NonlinearRegression #53

Open
valebezma opened this issue Nov 28, 2018 · 1 comment
Open

Issue with NonlinearRegression #53

valebezma opened this issue Nov 28, 2018 · 1 comment

Comments

@valebezma
Copy link

Hi, I'm getting issues with calculating nonlinear regression with my data.
Data in attached file (which is csv file with "," decimal delimiter and ";" column separator) contains 2 variables: age (x) and length (y). What i'm tried is to build nonlinear regression expressed as
y = p[0] * (1.0 - Math.Exp(-p[1] * (x - p[2])))
using NonlinearRegression() function of BivariateSample class and getting Nonconvergence exception. Is there a way to find out a reason and/or give the parameters for result occuracy to that function (if it is a reason why it does not converge).

Code is:
NonlinearRegressionResult fit = data.NonlinearRegression(
(x, p) => { return p[0] * (1.0 - Math.Exp(-p[1] * (x - p[2])))},
new double[] { 1, 1, 0 }
)

P.S.: r nls function eats that data and gives all 3 parameters
esox.txt

@dcwuser
Copy link
Owner

dcwuser commented Aug 4, 2020

When metric value hits infinity, termination criteria is triggered, even though it was a mis-step. This is a bug.

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