Package org.cloudbus.cloudsim.util
Class Regression
java.lang.Object
org.cloudbus.cloudsim.util.Regression
Provides utility methods to compute regressions.
- Since:
- CloudSim Plus 7.0.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncorrelationCoefficients
(double[][] data) Computes correlation coefficients for a set of data.static double[]
getLoessParameterEstimates
(double... y) Gets the Local Regression (LOESS) parameter estimates.static double[]
getRobustLoessParameterEstimates
(double... y) Gets the robust LOESS parameter estimates.static org.apache.commons.math3.stat.regression.OLSMultipleLinearRegression
newLinearRegression
(double[][] x, double[] y) Creates a a multiple linear regression.static org.apache.commons.math3.stat.regression.SimpleRegression
newLinearRegression
(double[] x, double[] y) Creates a simple linear regression.static org.apache.commons.math3.stat.regression.SimpleRegression
newWeightedLinearRegression
(double[] x, double[] y, double[] weights) Creates a weighted linear regression.
-
Method Details
-
newLinearRegression
public static org.apache.commons.math3.stat.regression.SimpleRegression newLinearRegression(double[] x, double[] y) Creates a simple linear regression.- Parameters:
x
- the independent variabley
- the dependent variable- Returns:
-
newLinearRegression
public static org.apache.commons.math3.stat.regression.OLSMultipleLinearRegression newLinearRegression(double[][] x, double[] y) Creates a a multiple linear regression.- Parameters:
x
- the independent variabley
- the dependent variable- Returns:
-
newWeightedLinearRegression
public static org.apache.commons.math3.stat.regression.SimpleRegression newWeightedLinearRegression(double[] x, double[] y, double[] weights) Creates a weighted linear regression.- Parameters:
x
- the independent variabley
- the dependent variableweights
- the weights to apply to x and y- Returns:
-
getLoessParameterEstimates
public static double[] getLoessParameterEstimates(double... y) Gets the Local Regression (LOESS) parameter estimates.- Parameters:
y
- the dependent variable- Returns:
- the Loess parameter estimates
- See Also:
-
getRobustLoessParameterEstimates
public static double[] getRobustLoessParameterEstimates(double... y) Gets the robust LOESS parameter estimates.- Parameters:
y
- the dependent variable- Returns:
- the robust loess parameter estimates
-
correlationCoefficients
Computes correlation coefficients for a set of data.- Parameters:
data
- the data to compute the correlation coefficients- Returns:
- the correlation coefficients
-