Skip to content

Commit

Permalink
use random bases directly at locs for calculating smoothness
Browse files Browse the repository at this point in the history
  • Loading branch information
huizezhang-sherry committed Sep 18, 2024
1 parent b2e91b2 commit 9aac90d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions R/calc-squintability.R
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,11 @@ calc_smoothness <- function(basis_df, start_params = c(0.001, 0.5, 2, 2),
# construct gp
cli::cli_inform("Fitting a GP model ...")
if (verbose) {silent <- FALSE} else {silent <- TRUE}
gp_params <- list(y = basis_df[["index"]], locs = basis_df[["dist"]],
X = as.matrix(rep(1,nrow(basis_df))),
start_parms = start_params, covfun_name = "matern_isotropic",
locs <- purrr::map(basis_df[["basis"]], as.vector) |> purrr::reduce(rbind)
gp_params <- list(y = basis_df[["index"]], locs = locs,
X = rep(1,nrow(basis_df)),
start_parms = start_params,
covfun_name = "matern_isotropic",
silent = silent,
other_gp_params
)
Expand Down

0 comments on commit 9aac90d

Please sign in to comment.