WebCab Probability and Statistics for .NET v3.6

FactorModel Class

Allows a basis of functions (i.e. power term, sine term etc) to be selected for which the span of these elements will be considered for the purpose of curve fitting using GeneralLinear.

For a list of all members of this type, see FactorModel Members.

System.Object
   FactorModel

public class FactorModel

Remarks

A Factor Model

A Factor Model is an ordered collection of functions who span forms a function vector space. That is, an example of a Factor model a collection of (ordered) basis of functions (known as Basis Elements) f1(x), f2(x),..., fn(x). Note that the Factor Model itself is a collection of order basis elements and it is the span of these (ordered) elements which will form the regression model which can be applied with the class GeneralLinear.

Remark: The advantage of the Factor model over using the interface FunctionBasis when working with the regression modeling functionality provided within GeneralLinear is that the Factor model approach can be easily integrated and presented through a GUI. In particular, the 'add....' functions listed below can correspond to buttons within a GUI where once clicked can request the appropriate parameters.

Using the Factor Model in Regression Analysis

Using this class the factor model can be iteratively built from calls to any one of the following methods:

  1. AddConstantTerm - Adds a constant term basis element to the factor model.
  2. AddSumOfPowerTerms - Adds a linear combination of power terms basis element to the factor model.
  3. AddPowerTerm - Adds a power term basis element to the factor model.
  4. AddRationalSumOfPowerTerms - Adds a term which is a rational function basis element to the factor model (where the numerator and denominator are themselves linear combination of power terms).
  5. AddCosineSum - Adds a linear combination of Cosine functions basis element to the factor model.
  6. AddSineSum - Adds a linear combination of Sine functions basis element to the factor model.
  7. AddTanSum - Adds a linear combination of Tangent functions basis element to the factor model.
  8. AddLogSum - Adds a linear combination of Logarithm functions basis element to the factor model.
  9. AddExpSum - Adds a linear combination of exponential functions basis element to the factor model
  10. AddAbsoluteSum - Adds a linear combination of absolute functions basis element to the factor model.
  11. AddStepSum - Adds a linear combination of step functions basis element to the factor model.
  12. AddTabulatedFunction - Adds a tabulated function to the factor model basis element to the factor model.

and then this factor model can be set as the function basis using GeneralLinear.setFunctionBasis which defines a regression model which can then be modeled against the experimental data considered.

In particular, for a client application of the GeneralLinear class if you:

  1. Instantiate this class
  2. Call the method AddPowerTerm
  3. Call the method AddSineSum
  4. Call the method AddTabulatedFunction
where the appropriate parameters for the Power, Sine and Tabulated Function basis elements you wish to add to the factor model are used. Then this instance of this FactorModel class at this point will consist of three ordered elements in the sense that calling GetNumberOfBasisFunctions will equal 3, and the calling GetValueAt will return an array of length 3 where the first term is equal to the Power term at the point considered, the second term equal to the Sine term at the point considered and the third term equal to the interpolation of the Tabulated function at the point considered.

Now the important point with regard to the use of the Factor Model within GeneralLinear, is that you are able to set this instance on the Factor Model to the function basis used in GeneralLinear using GeneralLinear.setFunctionBasis. Then once the function basis has been set which in turn defines a regression model which you are able to analyze once it has been fitted against the experimental data using GeneralLinear.setGeneralFit.

In the example considered above this will mean that the Factor model will represent a regression model of the form:

a1 * f1(x) + a2 * f2(x) + ... + an * fn(x),

where f1(x) corresponds to the terms defined by the method call of AddPowerTerm, f2(x) corresponds to the call of AddSineSum, and f3(x) to the call of AddTabulatedFunction.

Requirements

Namespace: WebCab.Libraries.Statistics.CurveFitting

Assembly: WebCab.Libraries.Statistics (in WebCab.Libraries.Statistics.dll)

See Also

FactorModel Members | WebCab.Libraries.Statistics.CurveFitting Namespace