public class LinearRegression extends Object
Modifier and Type | Field and Description |
---|---|
protected double |
a |
protected double |
b |
protected boolean |
calculated |
protected int |
count |
protected double |
sx |
protected double |
sxx |
protected double |
sxy |
protected double |
sy |
Constructor and Description |
---|
LinearRegression() |
LinearRegression(double[] x,
double[] y) |
Modifier and Type | Method and Description |
---|---|
void |
add(double x,
double y) |
protected void |
calculate() |
double |
distanceTo(double x,
double y) |
double[][] |
filterOutOutliers(double[] x,
double[] y,
double tolerance)
Filter out outliers.
|
double |
get(double x) |
double[] |
get(double[] x) |
double |
getA() |
double |
getB() |
void |
reset() |
protected boolean calculated
protected double a
protected double b
protected double sx
protected double sxx
protected double sy
protected double sxy
protected int count
public LinearRegression(double[] x, double[] y)
public LinearRegression()
public void add(double x, double y)
public void reset()
protected void calculate()
public double getA()
public double getB()
public double get(double x)
public double[] get(double[] x)
public double[][] filterOutOutliers(double[] x, double[] y, double tolerance)
tolerance
- An outlier is a pair (x, y) deviating more than tolerance * average deviationpublic double distanceTo(double x, double y)
Copyright © 2015–2021 Fiji. All rights reserved.