|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ijchart.xychart.util.RegressionUtil
public abstract class RegressionUtil
Title: IJChart
Description: a chart library for the Java(tm) platform.
A utility class for fitting regression curves to data.Copyright: Copyright (c) 2013
Company:
Constructor Summary | |
---|---|
RegressionUtil()
|
Method Summary | |
---|---|
static double[] |
getOLSRegression(double[][] data)
Returns the parameters 'a' and 'b' for an equation y = a + bx, fitted to the data using ordinary least squares regression.The result is returned as a double[], where result[0] is a, and result[1] is b. |
static double[] |
getOLSRegression(IMatrixDataset dataset,
int rowIdx)
Returns the parameters 'a' and 'b' for an equation y = a + bx, fitted to the data using ordinary least squares regression.The result is returned as a double[], where result[0] is a, and result[1] is b. |
static double[] |
getPowerRegression(double[][] data)
Returns the parameters 'a' and 'b' for an equation y=ax^b, fitted to the data using a power regression equation.The result is returned as an array, where double[0] is a, and double[1] is b. |
static double[] |
getPowerRegression(IMatrixDataset dataset,
int rowIdx)
Returns the parameters 'a' and 'b' for an equation y=ax^b, fitted to the data using a power regression equation.The result is returned as an array, where double[0] is a, and double[1] is b. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegressionUtil()
Method Detail |
---|
public static double[] getOLSRegression(double[][] data)
data
- double[][]
The datas.
public static double[] getOLSRegression(IMatrixDataset dataset, int rowIdx)
dataset
- IMatrixDataset
The dataset,and each data is
XYNumberChartData
object in dataset. (null not permitted).rowIdx
- int
The row index,must be greater than or equal to 0.
public static double[] getPowerRegression(double[][] data)
data
- double[][]
The datas.
public static double[] getPowerRegression(IMatrixDataset dataset, int rowIdx)
dataset
- IMatrixDataset
The dataset,and each data is
XYNumberChartData
object in dataset. (null not permitted).rowIdx
- int
The row index,must be greater than or equal to 0.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |