PowerExp {GauPro} | R Documentation |
Power Exponential Kernel R6 class
Description
Power Exponential Kernel R6 class
Power Exponential Kernel R6 class
Format
R6Class
object.
Value
Object of R6Class
with methods for fitting GP model.
Super classes
GauPro::GauPro_kernel
-> GauPro::GauPro_kernel_beta
-> GauPro_kernel_PowerExp
Public fields
alpha
alpha value (the exponent). Between 0 and 2.
alpha_lower
Lower bound for alpha
alpha_upper
Upper bound for alpha
alpha_est
Should alpha be estimated?
Methods
Public methods
Inherited methods
Method new()
Initialize kernel object
Usage
PowerExp$new( alpha = 1.95, beta, s2 = 1, D, beta_lower = -8, beta_upper = 6, beta_est = TRUE, alpha_lower = 1e-08, alpha_upper = 2, alpha_est = TRUE, s2_lower = 1e-08, s2_upper = 1e+08, s2_est = TRUE, useC = TRUE )
Arguments
alpha
Initial alpha value (the exponent). Between 0 and 2.
beta
Initial beta value
s2
Initial variance
D
Number of input dimensions of data
beta_lower
Lower bound for beta
beta_upper
Upper bound for beta
beta_est
Should beta be estimated?
alpha_lower
Lower bound for alpha
alpha_upper
Upper bound for alpha
alpha_est
Should alpha be estimated?
s2_lower
Lower bound for s2
s2_upper
Upper bound for s2
s2_est
Should s2 be estimated?
useC
Should C code used? Much faster if implemented.
Method k()
Calculate covariance between two points
Usage
PowerExp$k( x, y = NULL, beta = self$beta, alpha = self$alpha, s2 = self$s2, params = NULL )
Arguments
x
vector.
y
vector, optional. If excluded, find correlation of x with itself.
beta
Correlation parameters.
alpha
alpha value (the exponent). Between 0 and 2.
s2
Variance parameter.
params
parameters to use instead of beta and s2.
Method kone()
Find covariance of two points
Usage
PowerExp$kone(x, y, beta, theta, alpha, s2)
Arguments
x
vector
y
vector
beta
correlation parameters on log scale
theta
correlation parameters on regular scale
alpha
alpha value (the exponent). Between 0 and 2.
s2
Variance parameter
Method dC_dparams()
Derivative of covariance with respect to parameters
Usage
PowerExp$dC_dparams(params = NULL, X, C_nonug, C, nug)
Arguments
params
Kernel parameters
X
matrix of points in rows
C_nonug
Covariance without nugget added to diagonal
C
Covariance with nugget
nug
Value of nugget
Method dC_dx()
Derivative of covariance with respect to X
Usage
PowerExp$dC_dx( XX, X, theta, beta = self$beta, alpha = self$alpha, s2 = self$s2 )
Arguments
XX
matrix of points
X
matrix of points to take derivative with respect to
theta
Correlation parameters
beta
log of theta
alpha
alpha value (the exponent). Between 0 and 2.
s2
Variance parameter
Method param_optim_start()
Starting point for parameters for optimization
Usage
PowerExp$param_optim_start( jitter = F, y, beta_est = self$beta_est, alpha_est = self$alpha_est, s2_est = self$s2_est )
Arguments
jitter
Should there be a jitter?
y
Output
beta_est
Is beta being estimated?
alpha_est
Is alpha being estimated?
s2_est
Is s2 being estimated?
Method param_optim_start0()
Starting point for parameters for optimization
Usage
PowerExp$param_optim_start0( jitter = F, y, beta_est = self$beta_est, alpha_est = self$alpha_est, s2_est = self$s2_est )
Arguments
jitter
Should there be a jitter?
y
Output
beta_est
Is beta being estimated?
alpha_est
Is alpha being estimated?
s2_est
Is s2 being estimated?
Method param_optim_lower()
Lower bounds of parameters for optimization
Usage
PowerExp$param_optim_lower( beta_est = self$beta_est, alpha_est = self$alpha_est, s2_est = self$s2_est )
Arguments
beta_est
Is beta being estimated?
alpha_est
Is alpha being estimated?
s2_est
Is s2 being estimated?
Method param_optim_upper()
Upper bounds of parameters for optimization
Usage
PowerExp$param_optim_upper( beta_est = self$beta_est, alpha_est = self$alpha_est, s2_est = self$s2_est )
Arguments
beta_est
Is beta being estimated?
alpha_est
Is alpha being estimated?
s2_est
Is s2 being estimated?
Method set_params_from_optim()
Set parameters from optimization output
Usage
PowerExp$set_params_from_optim( optim_out, beta_est = self$beta_est, alpha_est = self$alpha_est, s2_est = self$s2_est )
Arguments
optim_out
Output from optimization
beta_est
Is beta estimate?
alpha_est
Is alpha estimated?
s2_est
Is s2 estimated?
Method print()
Print this object
Usage
PowerExp$print()
Method clone()
The objects of this class are cloneable with this method.
Usage
PowerExp$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Examples
k1 <- PowerExp$new(beta=0, alpha=0)