jsat.regression
Class OrdinaryKriging
- java.lang.Object
-
- jsat.regression.OrdinaryKriging
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Parameterized, Regressor
public class OrdinaryKriging extends java.lang.Object implements Regressor, Parameterized
An implementation of Ordinary Kriging with support for a uniform error measurement. When anerrorvalue is applied, Kriging becomes equivalent to Gaussian Processes Regression.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classOrdinaryKriging.PowVariogramstatic interfaceOrdinaryKriging.Variogram
-
Field Summary
Fields Modifier and Type Field and Description static doubleDEFAULT_ERRORThe default error value isDEFAULT_ERRORstatic doubleDEFAULT_NUGGETThe default nugget value is 0.1
-
Constructor Summary
Constructors Constructor and Description OrdinaryKriging()Creates a new Ordinary Kriging with a small error value using thepowervariogram.OrdinaryKriging(OrdinaryKriging.Variogram vari)Creates a new Ordinary Kriging with a small error valueOrdinaryKriging(OrdinaryKriging.Variogram vari, double error)Creates a new Ordinary KrigingOrdinaryKriging(OrdinaryKriging.Variogram vari, double error, double nugget)Creates a new Ordinary Kriging.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description OrdinaryKrigingclone()doublegetMeasurementError()Returns the measurement error used for Kriging, which is equivalent to altering the diagonal values of the covariance.doublegetNugget()Returns the nugget value passed to the variogram during training.doubleregress(DataPoint data)voidsetMeasurementError(double error)Sets the measurement error used for Kriging, which is equivalent to altering the diagonal values of the covariance.voidsetNugget(double nugget)Sets the nugget value passed to the variogram during training.booleansupportsWeightedData()voidtrain(RegressionDataSet dataSet, boolean parallel)-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jsat.parameters.Parameterized
getParameter, getParameters
-
-
-
-
Field Detail
-
DEFAULT_NUGGET
public static final double DEFAULT_NUGGET
The default nugget value is 0.1- See Also:
- Constant Field Values
-
DEFAULT_ERROR
public static final double DEFAULT_ERROR
The default error value isDEFAULT_ERROR- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OrdinaryKriging
public OrdinaryKriging(OrdinaryKriging.Variogram vari, double error, double nugget)
Creates a new Ordinary Kriging.- Parameters:
vari- the variogram to fit to the dataerror- the global measurement errornugget- the nugget value to add to the variogram
-
OrdinaryKriging
public OrdinaryKriging(OrdinaryKriging.Variogram vari, double error)
Creates a new Ordinary Kriging- Parameters:
vari- the variogram to fit to the dataerror- the global measurement error
-
OrdinaryKriging
public OrdinaryKriging(OrdinaryKriging.Variogram vari)
Creates a new Ordinary Kriging with a small error value- Parameters:
vari- the variogram to fit to the data
-
OrdinaryKriging
public OrdinaryKriging()
Creates a new Ordinary Kriging with a small error value using thepowervariogram.
-
-
Method Detail
-
train
public void train(RegressionDataSet dataSet, boolean parallel)
-
supportsWeightedData
public boolean supportsWeightedData()
- Specified by:
supportsWeightedDatain interfaceRegressor
-
clone
public OrdinaryKriging clone()
-
setMeasurementError
public void setMeasurementError(double error)
Sets the measurement error used for Kriging, which is equivalent to altering the diagonal values of the covariance. While the measurement errors could be per data point, this implementation provides only a global error. If the error is set to zero, it will perfectly interpolate all data points.
Increasing the error smooths the interpolation, and has a large impact on the regression results.- Parameters:
error- the measurement error for all data points
-
getMeasurementError
public double getMeasurementError()
Returns the measurement error used for Kriging, which is equivalent to altering the diagonal values of the covariance. While the measurement errors could be per data point, this implementation provides only a global error. If the error is set to zero, it will perfectly interpolate all data points.- Returns:
- the global error used for the data
-
setNugget
public void setNugget(double nugget)
Sets the nugget value passed to the variogram during training. The nugget allows the variogram to start from a non-zero value, and is equivalent to alerting the off diagonal values of the covariance.
Altering the nugget value has only a minor impact on the output- Parameters:
nugget- the new nugget value- Throws:
java.lang.ArithmeticException- if a negative nugget value is provided
-
getNugget
public double getNugget()
Returns the nugget value passed to the variogram during training. The nugget allows the variogram to start from a non-zero value, and is equivalent to alerting the off diagonal values of the covariance.- Returns:
- the nugget added to the variogram
-
-
DataMelt 3.0 © DataMelt by jWork.ORG