Table of Contents

Class FittingInfo

Namespace
TimeSeriesAnalysis.Dynamic
Assembly
TimeSeriesAnalysis.dll

FittingInfo

Be careful as the objective function is different for the static estimation that considers the absolute values, while dynamic estimation considers "diffs"- for this reason it is best to use RsqDiff and RsqAbs when comparing different model runs which can be a combination fo static and dynamic

public class FittingInfo
Inheritance
FittingInfo
Inherited Members

Fields

NumSimulatorRestarts

Counter of how many times the simulator has re-started over the course of the dataset due to periods of bad data

public int NumSimulatorRestarts

Field Value

int

SolverOutput

A string containting detailed output of the solver, may include line-breaks

public string SolverOutput

Field Value

string

TimeBase_s

The time base of the fitting dataset (model can still be run on other timebases)

public double TimeBase_s

Field Value

double

Umax

The maximum value of u seen in the data set

public double[] Umax

Field Value

double[]

Umin

The minimum value of u seen in the data set

public double[] Umin

Field Value

double[]

Properties

EndTime

End time of fitting data set

public DateTime EndTime { get; set; }

Property Value

DateTime

FitScorePrc

A score that is 100% if model describes all variations and 0% if model is no better at describing variation than the flat average line. Negative if the model is worse than a flat average line.

public double FitScorePrc { get; set; }

Property Value

double

NFittingBadDataPoints

Number of bad data points ignored during fitting

public double NFittingBadDataPoints { get; set; }

Property Value

double

NFittingTotalDataPoints

Number of total data points (good and bad) available for fitting

public double NFittingTotalDataPoints { get; set; }

Property Value

double

ObjFunValDiff

The value of the objective function during fitting, lower is better(used to choose among models)

This is the R-squared of the "differences" sum(ymeas[k]-ymeas[k-1] -(ymod[k]-ymod[k-1]) )

>
public double ObjFunValDiff { get; set; }

Property Value

double

RsqDiff

The value of the R2 or root mean square of fitting,higher is better (used to choose among models)

This is the R-squared of the "differences" sum(ymeas[k]-ymeas[k-1] -(ymod[k]-ymod[k-1]) )

>
public double RsqDiff { get; set; }

Property Value

double

SolverID

A string that identifies the solver that was used to find the model

public string SolverID { get; set; }

Property Value

string

StartTime

Start time of fitting data set

public DateTime StartTime { get; set; }

Property Value

DateTime

WasAbleToIdentify

True if identification was able to identify, otherwise false. Note that this flag is not an indication that the model is good, i.e. that the data had sufficient information to determine unique paramters that describe the dataset well. This flag only indicates that regression did not crash during identification.

public bool WasAbleToIdentify { get; set; }

Property Value

bool

Methods

CalcCommonFitMetricsFromYmeasDataset(UnitDataSet, List<int>)

NB! this code seems to have an error with negative rsqdiff for cases when there yIndicesToIgnore is not empty. It may be preferable to use the output of the regression, as this avoids duplicating logic.

public void CalcCommonFitMetricsFromYmeasDataset(UnitDataSet dataSet, List<int> yIndicesToIgnore = null)

Parameters

dataSet UnitDataSet
yIndicesToIgnore List<int>