Namespaces

Types in MathNet.Numerics

Type GoodnessOfFit

Namespace MathNet.Numerics

Static Functions

Public Static Functions

double CoefficientOfDetermination(IEnumerable<double> modelledValues, IEnumerable<double> observedValues)

Calculates the R-Squared value, also known as coefficient of determination, given some modelled and observed values.
Parameters
IEnumerable<double> modelledValues

The values expected from the model.

IEnumerable<double> observedValues

The actual values obtained.

Return
double

Coefficient of determination.

double PopulationStandardError(IEnumerable<double> modelledValues, IEnumerable<double> observedValues)

Calculates the Standard Error of the regression, given a sequence of modeled/predicted values, and a sequence of actual/observed values
Parameters
IEnumerable<double> modelledValues

The modelled/predicted values

IEnumerable<double> observedValues

The observed/actual values

Return
double

The Standard Error of the regression

double R(IEnumerable<double> modelledValues, IEnumerable<double> observedValues)

Calculates r, the sample correlation coefficient between the observed outcomes and the observed predictor values.
Parameters
IEnumerable<double> modelledValues

The modelled/predicted values

IEnumerable<double> observedValues

The observed/actual values

Return
double

Person product-momentum correlation coefficient.

double RSquared(IEnumerable<double> modelledValues, IEnumerable<double> observedValues)

Calculates r^2, the square of the sample correlation coefficient between the observed outcomes and the observed predictor values. Not to be confused with R^2, the coefficient of determination, see CoefficientOfDetermination.
Parameters
IEnumerable<double> modelledValues

The modelled/predicted values

IEnumerable<double> observedValues

The observed/actual values

Return
double

Squared Person product-momentum correlation coefficient.

double StandardError(IEnumerable<double> modelledValues, IEnumerable<double> observedValues, int degreesOfFreedom)

Calculates the Standard Error of the regression, given a sequence of modeled/predicted values, and a sequence of actual/observed values
Parameters
IEnumerable<double> modelledValues

The modelled/predicted values

IEnumerable<double> observedValues

The observed/actual values

int degreesOfFreedom

The degrees of freedom by which the number of samples is reduced for performing the Standard Error calculation

Return
double

The Standard Error of the regression