jsat.math
Class SimpleLinearRegression
- java.lang.Object
-
- jsat.math.SimpleLinearRegression
-
public class SimpleLinearRegression extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description SimpleLinearRegression()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static double[]regres(Vec xData, Vec yData)Performs a Simple Linear Regression on the data set, calculating the best fit a and b such that y = a + b * x
-
-
-
Method Detail
-
regres
public static double[] regres(Vec xData, Vec yData)
Performs a Simple Linear Regression on the data set, calculating the best fit a and b such that y = a + b * x- Parameters:
yData- the Y data set (to be predicted)xData- the X data set (the predictor)- Returns:
- an array containing the a and b, such that index 0 contains a and index 1 contains b
-
-
DataMelt 3.0 © DataMelt by jWork.ORG