| T O P I C R E V I E W |
| binowizu |
Posted - 01/26/2026 : 1:16:54 PM Hi everyone, I am using the NLFit tool in OriginPro and I would like to better understand the underlying mechanics of the Levenberg-Marquardt algorithm implementation, specifically regarding the Jacobian matrix. I have two questions concerning the calculation of derivatives: - Built-in Functions: How does Origin handle the Jacobian for its library of built-in functions? Does it use analytical Jacobians (exact formulas) or is it based on a numerical approximation approach? - User-Defined Functions (UDF): When a user creates a new fitting function, how is the Jacobian determined by the engine? I am interested to know if there is a default method (such as finite differences) and if there are options for the user to specify or influence how these derivatives are calculated to ensure better convergence. |
| 1 L A T E S T R E P L I E S (Newest First) |
| Sam Fang |
Posted - 01/27/2026 : 12:27:11 AM Hi binowizu,
1) For most built-in functions, Origin provides analytical Jacobians. For a few complex built-in functions, it uses a numerical approximation method.
2) For user-defined functions, if you want to provide analytical Jacobians, in Fitting Function Organizer dialog, you can choose Origin C Function Type, check Derivatives check box, in Function edit box, click Edit button on the right to open Code Builder, it will have more variables to define, e.g. dy_A0, dy_xc,... where dy_A0, dy_xc, ... are derivatives of y with respect to parameters A0 and xc. If you don't check Derivatives check box, Origin will use finite differences to calculate derivatives.
Thanks. Sam
Sam OriginLab Technical Services |
|
|