Periodic Kernel R6 class
Periodic Kernel R6 class
Object of R6Class with methods for fitting GP model.
R6Class object.
GauPro::GauPro_kernel -> GauPro_kernel_Periodic
pParameter for correlation
p_estShould p be estimated?
logpLog of p
logp_lowerLower bound of logp
logp_upperUpper bound of logp
p_lengthlength of p
alphaParameter for correlation
alpha_estShould alpha be estimated?
logalphaLog of alpha
logalpha_lowerLower bound of logalpha
logalpha_upperUpper bound of logalpha
s2variance
s2_estIs s2 estimated?
logs2Log of s2
logs2_lowerLower bound of logs2
logs2_upperUpper bound of logs2
new()Initialize kernel object
Periodic$new( p, alpha = 1, s2 = 1, D, p_lower = 0, p_upper = 100, p_est = TRUE, alpha_lower = 0, alpha_upper = 100, alpha_est = TRUE, s2_lower = 1e-08, s2_upper = 1e+08, s2_est = TRUE )
pPeriodic parameter
alphaPeriodic parameter
s2Initial variance
DNumber of input dimensions of data
p_lowerLower bound for p
p_upperUpper bound for p
p_estShould p be estimated?
alpha_lowerLower bound for alpha
alpha_upperUpper bound for alpha
alpha_estShould alpha be estimated?
s2_lowerLower bound for s2
s2_upperUpper bound for s2
s2_estShould s2 be estimated?
k()Calculate covariance between two points
Periodic$k( x, y = NULL, logp = self$logp, logalpha = self$logalpha, s2 = self$s2, params = NULL )
xvector.
yvector, optional. If excluded, find correlation of x with itself.
logpCorrelation parameters.
logalphaCorrelation parameters.
s2Variance parameter.
paramsparameters to use instead of beta and s2.
kone()Find covariance of two points
Periodic$kone(x, y, logp, p, alpha, s2)
xvector
yvector
logpcorrelation parameters on log scale
pcorrelation parameters on regular scale
alphacorrelation parameter
s2Variance parameter
dC_dparams()Derivative of covariance with respect to parameters
Periodic$dC_dparams(params = NULL, X, C_nonug, C, nug)
paramsKernel parameters
Xmatrix of points in rows
C_nonugCovariance without nugget added to diagonal
CCovariance with nugget
nugValue of nugget
C_dC_dparams()Calculate covariance matrix and its derivative with respect to parameters
Periodic$C_dC_dparams(params = NULL, X, nug)
paramsKernel parameters
Xmatrix of points in rows
nugValue of nugget
dC_dx()Derivative of covariance with respect to X
Periodic$dC_dx(XX, X, logp = self$logp, logalpha = self$logalpha, s2 = self$s2)
XXmatrix of points
Xmatrix of points to take derivative with respect to
logplog of p
logalphalog of alpha
s2Variance parameter
param_optim_start()Starting point for parameters for optimization
Periodic$param_optim_start( jitter = F, y, p_est = self$p_est, alpha_est = self$alpha_est, s2_est = self$s2_est )
jitterShould there be a jitter?
yOutput
p_estIs p being estimated?
alpha_estIs alpha being estimated?
s2_estIs s2 being estimated?
param_optim_start0()Starting point for parameters for optimization
Periodic$param_optim_start0( jitter = F, y, p_est = self$p_est, alpha_est = self$alpha_est, s2_est = self$s2_est )
jitterShould there be a jitter?
yOutput
p_estIs p being estimated?
alpha_estIs alpha being estimated?
s2_estIs s2 being estimated?
param_optim_lower()Lower bounds of parameters for optimization
Periodic$param_optim_lower( p_est = self$p_est, alpha_est = self$alpha_est, s2_est = self$s2_est )
p_estIs p being estimated?
alpha_estIs alpha being estimated?
s2_estIs s2 being estimated?
param_optim_upper()Upper bounds of parameters for optimization
Periodic$param_optim_upper( p_est = self$p_est, alpha_est = self$alpha_est, s2_est = self$s2_est )
p_estIs p being estimated?
alpha_estIs alpha being estimated?
s2_estIs s2 being estimated?
set_params_from_optim()Set parameters from optimization output
Periodic$set_params_from_optim( optim_out, p_est = self$p_est, alpha_est = self$alpha_est, s2_est = self$s2_est )
optim_outOutput from optimization
p_estIs p being estimated?
alpha_estIs alpha being estimated?
s2_estIs s2 being estimated?
s2_from_params()Get s2 from params vector
Periodic$s2_from_params(params, s2_est = self$s2_est)
paramsparameter vector
s2_estIs s2 being estimated?
clone()The objects of this class are cloneable with this method.
Periodic$clone(deep = FALSE)
deepWhether to make a deep clone.
p is the period for each dimension, a is a single number for scaling
# NOT RUN {
k1 <- Periodic$new(p=1, alpha=1)
# }
Run the code above in your browser using DataLab