C# Класс ImsInformed.Statistics.FitLine

The fit FitLine.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
CalculatedRSquaredVanilla ( ) : double

Описание методов

AddPoint() публичный Метод

public AddPoint ( ContinuousXYPoint point ) : void
point ContinuousXYPoint
Результат void

AddPoints() публичный Метод

public AddPoints ( IEnumerable points ) : void
points IEnumerable
Результат void

CalculateMSE() защищенный Метод

protected CalculateMSE ( ) : double
Результат double

CalculateRSquared() защищенный Метод

Calculate R-square(Coefficient of determination)
protected CalculateRSquared ( ) : double
Результат double

ComputeResidual() защищенный Метод

Compute the residual of a fit point.
///
protected ComputeResidual ( ContinuousXYPoint point ) : double
point ContinuousXYPoint /// The point. ///
Результат double

CooksDistance() защищенный Метод

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
Результат double

DiagnosePoints() защищенный Метод

Calculate Cook's distance for all points
A delegate callback throws an exception.
protected DiagnosePoints ( double>.Func weightFunc ) : void
weightFunc double>.Func
Результат void

DiagnoseRegression() публичный Метод

A delegate callback throws an exception.
public DiagnoseRegression ( double>.Func weightFunc = null ) : void
weightFunc double>.Func
Результат void

FitLine() публичный Метод

Initializes a new instance of the FitLine class.
public FitLine ( ) : System
Результат System

FitLine() публичный Метод

public FitLine ( IEnumerable initialPoints ) : System
initialPoints IEnumerable
Результат System

LeastSquaresFitLinear() защищенный абстрактный Метод

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
Результат void

LeastSquaresFitdLinear() защищенный Метод

wrapper for updating gain and offset using LeastSquaresFitLinear
protected LeastSquaresFitdLinear ( IEnumerable xyPoints ) : void
xyPoints IEnumerable
Результат void

ModelPredictX2Y() публичный Метод

Return the predicted Y at given X
public ModelPredictX2Y ( double x ) : double
x double /// The X. ///
Результат double

ModelPredictY2X() публичный Метод

Return the predicted Y at given X
Cannot predict value with model, please run linear regression first.
public ModelPredictY2X ( double y ) : double
y double
Результат double

PerformRegression() публичный Метод

Using current fits points stored in the fitline to initiate regression
public PerformRegression ( ) : void
Результат void

PerformRegression() публичный Метод

Refit a group of points to the fit line.
public PerformRegression ( IEnumerable xyPoints ) : void
xyPoints IEnumerable /// The xy points. ///
Результат void

RemoveOutlierWithHighestCookDistance() публичный Метод

The remove outlier with highest cook distance.
public RemoveOutlierWithHighestCookDistance ( int minFitPoints ) : int
minFitPoints int
Результат int

RemoveOutliersAboveThreshold() публичный Метод

The remove outliers above threshold.
///
public RemoveOutliersAboveThreshold ( double CooksDThreshold, int minFitPoints ) : int
CooksDThreshold double /// The cooks d threshold. ///
minFitPoints int /// The min fit points. ///
Результат int

RemovePoint() публичный Метод

public RemovePoint ( ContinuousXYPoint point ) : void
point ContinuousXYPoint
Результат void

ResetPoints() публичный Метод

public ResetPoints ( IEnumerable points ) : void
points IEnumerable
Результат void