Choosing modelfun in fitnlm

2 views (last 30 days)
Maurice Afiakinye
Maurice Afiakinye on 12 May 2021
Answered: Walter Roberson on 21 Jun 2021
Must a model function be supplied for all nonlinear regression problems? I have data with 8 predictors and 1 response that has no relationship (atleast none has been established at the moment) between the predictors and the response. How do I model this using fitnlm or nlinfit?

Answers (1)

Walter Roberson
Walter Roberson on 21 Jun 2021
Yes, a model function is absolutely required.
It can be proven (I have posted constructed proofs in the past) that every finite dataset of finite precision has an uncountable infinity of models that fit it exactly (to within round-off error.)
With there being an uncountable infinity of models, the probability that any one of the models is the "right" model, is zero. There is no way for any kind of automated fitting system to tell the difference between the models... unless you have a model function that you can fit the parameters to.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!