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

nlinfit version issue #57

Open
RobHolman opened this issue Jul 23, 2019 · 1 comment
Open

nlinfit version issue #57

RobHolman opened this issue Jul 23, 2019 · 1 comment

Comments

@RobHolman
Copy link
Member

@KateBrodie @mpalmsten @jstanleyx @bergsmaE - I've been doing a lot of work on cBathy and will send out a summary in a while. But I stumbled on a small item that slows the code a ton. If you don't have the stats toolbox, the code should opt for using the alternate LMFit routine. It knows this by asking for ver('stats'). The bad news is that it asks this for every tile while doing bathyFromKAlpha.m and again in bathyCI.m (but strangely enough, not in csmInvertKAlpha.m. When I did a run time profile I found just these 'ver' calls add about 90 s to a typical cBathy analysis. As an alternate, I suggest adding
if isempty(ver('stats'))
bathy.params.nlinfit = 0;
end
at the beginning of analyzeBathyCollect.m so it is only called once. Then change the previous checks in bathyFromKAlpha.m and bathyCI.m to just check for the params.nlinfit flag.
I would do this change but my code is so different from this version that I will do it as V1.3 when I tidy things up. And I haven't seriously tested this fix.

@mpalmsten
Copy link
Member

Thanks for catching that. We also need to find a better open source Levenburg-Marquardt solver. See issue 47 about that:

#47

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