ScottPlot
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Properties | List of all members
ScottPlot.Statistics.LinearRegression Struct Reference

Public Member Functions

 LinearRegression (Coordinates[] coordinates)
 Calculate the linear regression from a collection of X/Y coordinates.
 
 LinearRegression (IEnumerable< Coordinates > coordinates)
 Calculate the linear regression from a collection of X/Y coordinates.
 
 LinearRegression (double[] xs, double[] ys)
 Calculate the linear regression a paired collection of X and Y points.
 
 LinearRegression (double[] ys, double firstX=0, double xSpacing=1)
 Calculate the linear regression from a collection of evenly-spaced Y values.
 
double GetValue (double x)
 Return the Y point of the regression line for the given X position.
 
double[] GetValues (double[] xs)
 Return the Y points of the regression line for the given X positions.
 

Public Attributes

readonly double Slope
 
readonly double Offset
 
readonly double Rsquared
 

Properties

string Formula [get]
 
string FormulaWithRSquared [get]
 

Constructor & Destructor Documentation

◆ LinearRegression() [1/4]

ScottPlot.Statistics.LinearRegression.LinearRegression ( Coordinates[]  coordinates)
inline

Calculate the linear regression from a collection of X/Y coordinates.

◆ LinearRegression() [2/4]

ScottPlot.Statistics.LinearRegression.LinearRegression ( IEnumerable< Coordinates coordinates)
inline

Calculate the linear regression from a collection of X/Y coordinates.


◆ LinearRegression() [3/4]

ScottPlot.Statistics.LinearRegression.LinearRegression ( double[]  xs,
double[]  ys 
)
inline

Calculate the linear regression a paired collection of X and Y points.

◆ LinearRegression() [4/4]

ScottPlot.Statistics.LinearRegression.LinearRegression ( double[]  ys,
double  firstX = 0,
double  xSpacing = 1 
)
inline

Calculate the linear regression from a collection of evenly-spaced Y values.

Member Function Documentation

◆ GetValue()

double ScottPlot.Statistics.LinearRegression.GetValue ( double  x)
inline

Return the Y point of the regression line for the given X position.

◆ GetValues()

double[] ScottPlot.Statistics.LinearRegression.GetValues ( double[]  xs)
inline

Return the Y points of the regression line for the given X positions.

Member Data Documentation

◆ Offset

readonly double ScottPlot.Statistics.LinearRegression.Offset

◆ Rsquared

readonly double ScottPlot.Statistics.LinearRegression.Rsquared

◆ Slope

readonly double ScottPlot.Statistics.LinearRegression.Slope

Property Documentation

◆ Formula

string ScottPlot.Statistics.LinearRegression.Formula
get

◆ FormulaWithRSquared

string ScottPlot.Statistics.LinearRegression.FormulaWithRSquared
get

The documentation for this struct was generated from the following file: