MathRoutinesPolynomialRegression Method (Double, Double, Double, Int32) |
LightningChart .NET Help
Calculate polymial line fit. Calculates polynomial factors, and uses these factors to solve Y values based on given X value array.
Namespace:
Arction.Wpf.Charting
Assembly:
Arction.Wpf.Charting.LightningChart (in Arction.Wpf.Charting.LightningChart.dll) Version: 10.3.1
Syntaxpublic static double[] PolynomialRegression(
double[] xInFactorization,
double[] yInFactorization,
double[] xValuesToFit,
int order
)
Public Shared Function PolynomialRegression (
xInFactorization As Double(),
yInFactorization As Double(),
xValuesToFit As Double(),
order As Integer
) As Double()
public:
static array<double>^ PolynomialRegression(
array<double>^ xInFactorization,
array<double>^ yInFactorization,
array<double>^ xValuesToFit,
int order
)
Parameters
- xInFactorization
- Type: SystemDouble
X values that are used to calculate the factors. This is the point set where the regression line is fitted to. - yInFactorization
- Type: SystemDouble
Y values that are used to calculate the factors. Length must be equal to xInFactorization length. - xValuesToFit
- Type: SystemDouble
X values whose Y values are to be solved, using the factors - order
- Type: SystemInt32
Order of polynomial. Usually more than 3 shouldn't be used
Return Value
Type:
DoubleFitted Y values, the length equals to xValuesToFit length. Returns null if failed.
See Also