Namespace List
The namespaces specified in this document are:
Namespace : Net.Kniaz.LMA.Tests
Net.Kniaz.LMA.Tests Type List
Classes
Net.Kniaz.LMA.Tests Classes
GaussianFunction Class
Summary
public class GaussianFunction : LMAFunction
Implements Gauss Bell Shape function
Constructor Members
| Name | Access | Summary |
|---|
| GaussianFunction() | public | Initializes a new instance of the class. |
Method Members
| Name | Access | Summary |
|---|
| GenerateData() : Double[][] | public | (from Net.Kniaz.LMA.LMAFunction) Returns array of x,y values, given x and fitting parameters used by all tests to generate test data for exact fits |
| GetPartialDerivative() : Double | public | Derivative value |
| GetY() : Double | public | Returns Gaussian values |
GaussianFit Class
Summary
public class GaussianFit
Tests Gaussian Fit
Constructor Members
| Name | Access | Summary |
|---|
| GaussianFit() | public | Initializes a new instance of the class. |
Method Members
| Name | Access | Summary |
|---|
| RunGaussian() : Void | public | |
LineFunction Class
Summary
public class LineFunction : LMAFunction
Constructor Members
| Name | Access | Summary |
|---|
| LineFunction() | public | Initializes a new instance of the class. |
Method Members
| Name | Access | Summary |
|---|
| GenerateData() : Double[][] | public | (from Net.Kniaz.LMA.LMAFunction) Returns array of x,y values, given x and fitting parameters used by all tests to generate test data for exact fits |
| GetPartialDerivative() : Double | public | |
| GetY() : Double | public | |
LineFit Class
Summary
public class LineFit
Summary description for LineFit.
Constructor Members
| Name | Access | Summary |
|---|
| LineFit() | public | Initializes a new instance of the class. |
Method Members
| Name | Access | Summary |
|---|
| RunLine() : Void | public | |
LorenzianFunction Class
Summary
public class LorenzianFunction : LMAFunction
Represents Lorenzian function. Derivative is calculated using a default f(x+dx)/dx method in the base class
Constructor Members
| Name | Access | Summary |
|---|
| LorenzianFunction() | public | Initializes a new instance of the class. |
Method Members
| Name | Access | Summary |
|---|
| GenerateData() : Double[][] | public | (from Net.Kniaz.LMA.LMAFunction) Returns array of x,y values, given x and fitting parameters used by all tests to generate test data for exact fits |
| GetPartialDerivative() : Double | public | (from Net.Kniaz.LMA.LMAFunction) The method which gives the partial derivates used in the LMA fit. If you can't provide the functional derivative, use a small a-step (e.g., da = 1e-20) and return dy/da at the given x for each fit parameter. This is provided in the method below as a default implementation |
| GetY() : Double | public | Returns value ofthe Lorenzian |
LorenzianFit Class
Summary
public class LorenzianFit
Constructor Members
| Name | Access | Summary |
|---|
| LorenzianFit() | public | Initializes a new instance of the class. |
Method Members
| Name | Access | Summary |
|---|
| RunLorenzian() : Void | public | |
SinFunction Class
Summary
public class SinFunction : LMAFunction
function represents sinusoidal aplitude
Constructor Members
| Name | Access | Summary |
|---|
| SinFunction() | public | Initializes a new instance of the class. |
Method Members
| Name | Access | Summary |
|---|
| GenerateData() : Double[][] | public | (from Net.Kniaz.LMA.LMAFunction) Returns array of x,y values, given x and fitting parameters used by all tests to generate test data for exact fits |
| GetPartialDerivative() : Double | public | Returns derivative |
| GetY() : Double | public | Returns value of the function |
SinFit Class
Summary
public class SinFit
NUnit test function.
Constructor Members
| Name | Access | Summary |
|---|
| SinFit() | public | Initializes a new instance of the class. |
Method Members
| Name | Access | Summary |
|---|
| RunSin() : Void | public | Test method |
Namespace : Net.Kniaz.LMA
Net.Kniaz.LMA Type List
Classes
| Type | Summary |
|---|
| Constants | Summary description for Constants. |
| LMA | Ctor. In the LMA fit N is the number of data points, M is the number of fit parameters. Call fit() to start the actual fitting. |
| LMAFunction | Abstract class implementing the LMAFunction interface |
Net.Kniaz.LMA Classes
LMAFunction Class
Summary
public abstract class LMAFunction
Abstract class implementing the LMAFunction interface
Constructor Members
| Name | Access | Summary |
|---|
| LMAFunction() | protected | Initializes a new instance of the class. |
Method Members
| Name | Access | Summary |
|---|
| GenerateData() : Double[][] | public | Returns array of x,y values, given x and fitting parameters used by all tests to generate test data for exact fits |
| GetPartialDerivative() : Double | public | The method which gives the partial derivates used in the LMA fit. If you can't provide the functional derivative, use a small a-step (e.g., da = 1e-20) and return dy/da at the given x for each fit parameter. This is provided in the method below as a default implementation |
| GetY() : Double | public | Returns the y value of the function for the given x and vector of parameters |
Constants Class
Summary
public class Constants
Summary description for Constants.
Constructor Members
| Name | Access | Summary |
|---|
| Constants() | public | Initializes a new instance of the class. |
Field Members
| Name | Access | Summary |
|---|
| lambda : Double | public | |
Method Members
LMA Class
Summary
public class LMA
Constructor Members
| Name | Access | Summary |
|---|
| LMA() | public | Ctor. In the LMA fit N is the number of data points, M is the number of fit parameters. Call fit() to start the actual fitting. |
Property Members
| Name | Access | Summary |
|---|
| Chi2 : Double | public | |
| Iterations : Int32 | public | |
| Parameters : Double[] | public | |
Method Members
| Name | Access | Summary |
|---|
| CalculateAlphaElement() : Double | protected | Calculates lambda weighted element for the alpha-matrix. NOTE: Does not change the value of alpha-matrix. |
| CalculateBetaElement() : Double | protected | Calculates element of the beta (gradient) matrix NOTE: Does not change the value of beta-matrix. |
| CalculateChi2() : Double | protected | Calculates function value for the current fit parameters Does not change the value of chi2 |
| CalculateChi2() : Double | protected | Calculates value of the function for given parameter array |
| CalculateIncrementedChi2() : Double | protected | Calculates function value for the incremented parameters (da + a). Does not change the value of chi2. |
| CheckWeights() : Double[] | protected | Checks if the matrix of weights for each point is a matrix of positive elements. Otherwise it initializes a new matrix and sets each value to 1 |
| Fit() : Void | public | The default fit. If used after calling fit(lambda, minDeltaChi2, maxIterations), uses those values. The stop condition is fetched from this.stop(). Override this.stop() if you want to use another stop condition. |
| Fit() : Void | public | Initializes and starts the fit. The stop condition is fetched from this.stop(). Override this.stop() if you want to use another stop condition. |
| SolveIncrements() : Void | protected | Solves the increments array (this.da) using alpha and beta. Then updates the this.incrementedParameters array. NOTE: Inverts alpha. Call at least updateAlpha() before calling this. |
| Stop() : Boolean | public | The stop condition for the fit. Override this if you want to use another stop condition. |
| UpdateAlpha() : Void | protected | Calculates all elements for this.alpha. |
| UpdateBeta() : Void | protected | Calculates all elements for this.beta. |
| UpdateParameters() : Void | protected | Updates parameters from incrementedParameters. |