C# Class ImsInformed.Statistics.FitLine

The fit FitLine.
Afficher le fichier Open project: PNNL-Comp-Mass-Spec/IMS-Informed-Library Class Usage Examples

Méthodes publiques

Méthode Description
AddPoint ( ContinuousXYPoint point ) : void
AddPoints ( IEnumerable points ) : void
DiagnoseRegression ( double>.Func weightFunc = null ) : void
FitLine ( ) : System

Initializes a new instance of the FitLine class.

FitLine ( IEnumerable initialPoints ) : System
ModelPredictX2Y ( double x ) : double

Return the predicted Y at given X

ModelPredictY2X ( double y ) : double

Return the predicted Y at given X

PerformRegression ( ) : void

Using current fits points stored in the fitline to initiate regression

PerformRegression ( IEnumerable xyPoints ) : void

Refit a group of points to the fit line.

RemoveOutlierWithHighestCookDistance ( int minFitPoints ) : int

The remove outlier with highest cook distance.

RemoveOutliersAboveThreshold ( double CooksDThreshold, int minFitPoints ) : int

The remove outliers above threshold.

RemovePoint ( ContinuousXYPoint point ) : void
ResetPoints ( IEnumerable points ) : void

Méthodes protégées

Méthode Description
CalculateMSE ( ) : double
CalculateRSquared ( ) : double

Calculate R-square(Coefficient of determination)

ComputeResidual ( ContinuousXYPoint point ) : double

Compute the residual of a fit point.

CooksDistance ( ContinuousXYPoint point, double ssh, double meanX, int pointsCount, double &leverage ) : double

The cooks distance.

DiagnosePoints ( double>.Func weightFunc ) : void

Calculate Cook's distance for all points

LeastSquaresFitLinear ( IEnumerable xyPoints, double &gain, double &offset ) : void

Computes fit FitLine for potential voltage group and writes

LeastSquaresFitdLinear ( IEnumerable xyPoints ) : void

wrapper for updating gain and offset using LeastSquaresFitLinear

Private Methods

Méthode Description
CalculatedRSquaredVanilla ( ) : double

Method Details

AddPoint() public méthode

public AddPoint ( ContinuousXYPoint point ) : void
point ContinuousXYPoint
Résultat void

AddPoints() public méthode

public AddPoints ( IEnumerable points ) : void
points IEnumerable
Résultat void

CalculateMSE() protected méthode

protected CalculateMSE ( ) : double
Résultat double

CalculateRSquared() protected méthode

Calculate R-square(Coefficient of determination)
protected CalculateRSquared ( ) : double
Résultat double

ComputeResidual() protected méthode

Compute the residual of a fit point.
///
protected ComputeResidual ( ContinuousXYPoint point ) : double
point ContinuousXYPoint /// The point. ///
Résultat double

CooksDistance() protected méthode

The cooks distance.
protected CooksDistance ( ContinuousXYPoint point, double ssh, double meanX, int pointsCount, double &leverage ) : double
point ContinuousXYPoint /// The point. ///
ssh double /// The ssh. ///
meanX double /// The mean X. ///
pointsCount int /// The points count. ///
leverage double
Résultat double

DiagnosePoints() protected méthode

Calculate Cook's distance for all points
A delegate callback throws an exception.
protected DiagnosePoints ( double>.Func weightFunc ) : void
weightFunc double>.Func
Résultat void

DiagnoseRegression() public méthode

A delegate callback throws an exception.
public DiagnoseRegression ( double>.Func weightFunc = null ) : void
weightFunc double>.Func
Résultat void

FitLine() public méthode

Initializes a new instance of the FitLine class.
public FitLine ( ) : System
Résultat System

FitLine() public méthode

public FitLine ( IEnumerable initialPoints ) : System
initialPoints IEnumerable
Résultat System

LeastSquaresFitLinear() protected abstract méthode

Computes fit FitLine for potential voltage group and writes
protected abstract LeastSquaresFitLinear ( IEnumerable xyPoints, double &gain, double &offset ) : void
xyPoints IEnumerable /// The xy points. ///
gain double
offset double
Résultat void

LeastSquaresFitdLinear() protected méthode

wrapper for updating gain and offset using LeastSquaresFitLinear
protected LeastSquaresFitdLinear ( IEnumerable xyPoints ) : void
xyPoints IEnumerable
Résultat void

ModelPredictX2Y() public méthode

Return the predicted Y at given X
public ModelPredictX2Y ( double x ) : double
x double /// The X. ///
Résultat double

ModelPredictY2X() public méthode

Return the predicted Y at given X
Cannot predict value with model, please run linear regression first.
public ModelPredictY2X ( double y ) : double
y double
Résultat double

PerformRegression() public méthode

Using current fits points stored in the fitline to initiate regression
public PerformRegression ( ) : void
Résultat void

PerformRegression() public méthode

Refit a group of points to the fit line.
public PerformRegression ( IEnumerable xyPoints ) : void
xyPoints IEnumerable /// The xy points. ///
Résultat void

RemoveOutlierWithHighestCookDistance() public méthode

The remove outlier with highest cook distance.
public RemoveOutlierWithHighestCookDistance ( int minFitPoints ) : int
minFitPoints int
Résultat int

RemoveOutliersAboveThreshold() public méthode

The remove outliers above threshold.
///
public RemoveOutliersAboveThreshold ( double CooksDThreshold, int minFitPoints ) : int
CooksDThreshold double /// The cooks d threshold. ///
minFitPoints int /// The min fit points. ///
Résultat int

RemovePoint() public méthode

public RemovePoint ( ContinuousXYPoint point ) : void
point ContinuousXYPoint
Résultat void

ResetPoints() public méthode

public ResetPoints ( IEnumerable points ) : void
points IEnumerable
Résultat void