TMtxMultiNonLinReg Class

Header: Dew.Stats/StatTools.h · Cross-compiler
tObjectTMtxComponentTMtxMultiNonLinReg

class TMtxMultiNonLinReg : public TMtxComponent;

Performs multiple-nonlinear regression.

How to use TMtxMultiNonLinReg component?
1. Drop a TMtxMultiNonLinReg component on the form. 2. Define TMtxMultiNonLinReg::X the vector of independent variables. 3. Define TMtxMultiNonLinReg::Y the vector of dependent variables. Make sure that X and Y have the same length. 4. Define initial estimates for TMtxMultiNonLinReg::B regression parameters. 5. (Optionaly) define TMtxMultiNonLinReg::Weights. If you'll use weights, set TMtxMultiNonLinReg::UseWeights property to true. 6. Define regression function. 7. (Optionally) define the derivative procedure. If you don't define derivative procedure then the numeric approximation will be used to calculate the derivative at specific point. 8. Define the optimization method. Depending on your function different methods will give better/worse results. 9. (Optionally) define desired tolerance for result. 10. Define the maximum number of steps for optimization method. Internal optimization method will stop when number of iterations exceeds MaxIter or internal minimum precision is within Tolerance. 11. Verbose property, if assigned, stores Fun, evaluated at each iteration step. Optionally, you can also assign TOptControl object to the Verbose property. This allows the optimization procedure to be interrupted from another thread and optionally also allows logging and iteration count monitoring.

Results:
1. TMtxMultiNonLinReg::B : Regression coefficients estimates. 2. TMtxMultiNonLinReg::YCalc : Fitted Y values.

The component internally performs vectorized optimization process. It can also be used to speed-up nonlinear regression with only one independent variable by 10-20x.

Constructors

NameDescription
TMtxMultiNonLinReg (2)

Destructors

NameDescription
~TMtxMultiNonLinReg

Properties

NameTypeDescription
AutoUpdateboolIf true then changing any of the TMtxMultiNonLinReg properties will trigger the TMtxMultiNonLinReg::Recalc method.
BTVec*Stores the regression coefficients.
BlockAssignboolBlock streaming of specific properties when storing only a "template".
DeriveProcedureTMultiDeriveProcDefines derivatives of regression function.
DirtyboolWhen any of the TMtxNonLinReg properties changes, this property is automatically set to true.
EditorActiveboolReturns True, if the component editor is displayed.
GradTolerancedoubleDefines minimal allowed gradient C-Norm.
MaxIterationintDefines one of the conditions for terminating the regression coefficient calculation.
NameDewString
OptMethodTOptMethodOptimization method used.
ReferenceTReferenceList*Stores a list of components that have to be notified, when this component is destroyed.
RegressFunctionTMultiRegressFunDefines the regression function of several regression parameters.
SoftSearchboolDefines line search algorithm for Quasi-Newton and Conjugate methods.
StopReasonTOptStopReasonReturns the reason why regression parameters calculation stopped.
TolerancedoubleDefines one of the conditions for terminating the regression coefficient calculation.
UseWeightsboolWeighted non-linear regression.
VerbosetStrings*If not nil then the optimization method uses it for logging each optimization step.
WeightsTVec*Weights.
XTVecList*Vector of independant variables.
YTVec*Vector of dependant variables.
YCalcTVec*Vector of calculated values.

Methods

NameDescription
AllowStreamingReturns the negatated value of BlockAssign.
AssignAssign values of all published properties from Source.
AssignTemplateAssign values of "template-like" published properties from Source.
EditorClassTo be overriden in descendanr classses.
LoadFromStreamLoad the component from Src stream.
LoadTemplateFromFileLoad a template from file.
LoadTemplateFromStreamLoad a template from stream.
RecalcTriggers non-linear regression recalculation.
ReferenceRemoved
ResetReset is called after loading the data from stream or file.
SaveTemplateToFileSave template to file.
SaveTemplateToStreamSave template to stream.
SaveToStreamSave the component to Dst stream.

Fields

NameTypeDescription
IterationsintNumber of iterations needed to converge to solution.
Tagintptr_t