Reference > Methods > GetCoefficients Method

SharpPlot.GetCoefficients Method

Coefficients from regression model.

public double[] GetCoefficients();

Example

double[] coeff = sp.GetCoefficients();
double intercept = coeff[0];
double slope = coeff[1];

These are returned in order of increasing power, so for a linear model the returned array will have 2 elements giving intercept and slope. They could be used to compute Y-values for a specific set of ‘benchmark’ X-values and draw some guidelines on the chart or just to add a note describing the model.

See also ...

SharpPlot Members


Send comments on this topic
© Dyalog Ltd 2013