Skip to content

Issue with NonlinearRegression #53

@valebezma

Description

@valebezma

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions