The main purpose of this project is to provide sophisticated numeric calculation algorithms, namely linear and non-linear (Levenberg-Marquardt) least-squares fitters in the form of easily reusable component. Unlike other popular numeric algorithms (simple statistics, spline interpolation, etc) curve fitting is much more complicated so that developers can save a lot of efforts. If you are not familiar with the basic concepts of the regression analysis, you can get started with DM2003 visual curve fitting tools. Although DMFitter ActiveX control is not a part of Data Master 2003 and can be used independently, in fact both products share the same source code base.
Data Master 2003 software provides almost the same set of features available through interfaces of DMApplication object. However, if your application based on another host platform (e.g. Microsoft Excel), or if you don't intend to use full set of DM2003 features, you may prefer compact in-process ActiveX control instead. This solution has following advantages:
And, of course, DMFitter ActiveX control is freeware like DM2003.
User-defined models: wide set of internal functions and operators and up to 25 fitting parameters for LM fitter. In addition, you can define custom class to calculate your NLSF expression and partial derivatives analytically (see TestFitObject.htm demo) or perform calculations in the event handlers. This feature significantly increases NLSF robustness and performance.
Event support: NLSF operations are extremely processor-intensive and may take a lot of time. DMFitter object fires OnProgress event every time when it finishes LM iteration, providing you with a number of completed iterations and current values of fitting parameters. So that, you can easily create animated visual feedback for your users (see TestAniLMFit.* demos for more details).
Also you can use event handlers to perform analytical calculations of user-defined linear basis functions (see TestLinearEFit.htm demo) and NLSF function and partial derivatives (TestLMFitEvents.htm and TestLMFitEJS.htm).
Additional options allow you to specify Chi2 and parameters convergence thresholds, control parameter step for calculating derivatives, temporarily fix fitting parameters and apply point weighting.
Multidimensional independent variable is supported in the LM fitter:
Installation of DMFitter ActiveX control is very simple and doesn't require special installer software. Unpack the contents of the archive into some folder on your hard drive and run COM registration utility from the command prompt as shown below:
Keep in mind that on Windows NT systems installation folder must have correct security settings, and you also must log in with appropriate access rights. Uninstall is also very straightforward: just type in the command prompt:
regsvr32 /u fitter.dll
and after you will see confirmation message you can delete the whole contents of the installation folder. If you intend to include fitter.dll unit into your setup, don't forget to mark this file for self-registration, or configure your setup so that it will be correctly registered.
DMFitter ActiveX control exposes dual IDMFitter interface and IDMFitterEvents dispinterface. IDMFitter includes 2 main methods: LinearFit and LMFit, and a set of properties instead of numerous parameters in their DM2003 counterparts (the most of properties have the same meaning as in DM2003). Typically you set properties, invoke fitter and read properties to obtain the results of fitting.
Notice that both fitters share the same set of parameters. So that, you have to initialize properties and retrieve results differently. See descriptions of interface elements and demonstration applications included in the installation for more details. In addition, you may refer to the source code of DMFitter control if you would like to know exactly what it does. Also please keep in mind that current version of DMFitter control is not intended for use in multithreaded applications.
Standard parts of documentation for DMFitter control now are merged with DM2003 Programmer's Guide. Click links below to display local copy (included into separate distribution kit) of detailed description of interfaces and interface members:
This new coclass is an ActiveX wrapper for the popular levmar code written by Manolis Lourakis. As well as "native" DMFitter, LMFitter coclass included into the fitter.dll unit allows to use this implementation of famous Levenberg-Marquardt curve fitting algorithm in thousands of ActiveX-enabled applications. Both coclasses implement the same interfaces so that you may easily exchange both versions. LMFitter is just a wrapper, while the LM fitting engine itself is written in C++ and stored in a separate DLL (lmhelper.dll). This DLL may be compiled by MS Visual Studio, a version for BCB also is available. If you want to use MSVC version, you need to install VS2005 C++ runtime which is linked to the lmhelper.dll unit in order to create instances of this coclass. Notice that you may use fitting engine DLL directly from your applications if you program in the language other than C/C++ (such as Delphi). For the header file and function prototypes, look at the source code of this library ([lmhelper] folder in the distribution archive).
Warning: currently LMFitter does not use LAPACK so only
box constraints are implemented. Future versions probably will include other types
of constraints (linear equation and inequality) and
support LAPACK/BLAS libraries. LMFitter was compiled using
All features of COM interfaces (except linear fitting) are implemented in this new component. There are following differences between both versions:
Several new HTML sample applications were created to test this coclass. Copy and paste code snippets from these files, see COM interface documentation and the source code of LMFitter control for more information.
DMFitter ActiveX control created by Alex Pronin aka RRR.
© 1993-2010 RRR. All rights reserved.
This software may be legally used under the terms and conditions of the Mozilla Public License (MPL).
THIS SOFTWARE DISTRIBUTED "AS IS" WITHOUT WARRANTIES AS TO PERFORMANCE OR FITNESS FOR ANY PARTICULAR PURPOSE OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED. YOU USE THIS SOFTWARE AT YOUR OWN RISK. NOBODY WILL BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING OR MISUSING THIS SOFTWARE.
DMFitter ActiveX control is free software.
You may install and use unlimited number of copies of the software. You may distribute this software in its unmodified form as long as each copy that you make and distribute contains this license agreement and the same copyright and other proprietary notices pertaining to this software that appear in the software. There is no charge for any of the above.
If you have suggestions and/or comments, feel free to write me email: email@example.com. Please type "dm2000" in the subject field of your message.
Also you can visit www.datamaster2003.com for more information related to the numeric data analysis.