diff --git a/R/bart.R b/R/bart.R index e70cbdda..1c814dd3 100644 --- a/R/bart.R +++ b/R/bart.R @@ -1230,7 +1230,7 @@ saveBARTModelToJson <- function(object){ #' @param object Object of type `bartmodel` containing draws of a BART model and associated sampling outputs. #' @param filename String of filepath, must end in ".json" #' -#' @return NULL +#' @return None #' @export #' #' @examples diff --git a/R/data.R b/R/data.R index d90265ae..4f35efc0 100644 --- a/R/data.R +++ b/R/data.R @@ -111,7 +111,7 @@ Outcome <- R6::R6Class( #' @description #' Update the current state of the outcome (i.e. partial residual) data by adding the values of `update_vector` #' @param update_vector Vector to be added to outcome - #' @return NULL + #' @return None add_vector = function(update_vector) { if (!is.numeric(update_vector)) { stop("update_vector must be a numeric vector or 2d matrix") @@ -128,7 +128,7 @@ Outcome <- R6::R6Class( #' @description #' Update the current state of the outcome (i.e. partial residual) data by subtracting the values of `update_vector` #' @param update_vector Vector to be subtracted from outcome - #' @return NULL + #' @return None subtract_vector = function(update_vector) { if (!is.numeric(update_vector)) { stop("update_vector must be a numeric vector or 2d matrix") @@ -145,7 +145,7 @@ Outcome <- R6::R6Class( #' @description #' Update the current state of the outcome (i.e. partial residual) data by replacing each element with the elements of `new_vector` #' @param new_vector Vector from which to overwrite the current data - #' @return NULL + #' @return None update_data = function(new_vector) { if (!is.numeric(new_vector)) { stop("update_vector must be a numeric vector or 2d matrix") diff --git a/R/forest.R b/R/forest.R index 4a0680cb..224e8c7c 100644 --- a/R/forest.R +++ b/R/forest.R @@ -35,7 +35,7 @@ ForestSamples <- R6::R6Class( #' Append to a `ForestContainer` object from a json object #' @param json_object Object of class `CppJson` #' @param json_forest_label Label referring to a particular forest (i.e. "forest_0") in the overall json hierarchy - #' @return NULL + #' @return None append_from_json = function(json_object, json_forest_label) { forest_container_append_from_json_cpp(self$forest_container_ptr, json_object$json_ptr, json_forest_label) }, @@ -53,7 +53,7 @@ ForestSamples <- R6::R6Class( #' Append to a `ForestContainer` object from a json object #' @param json_string JSON string which parses into object of class `CppJson` #' @param json_forest_label Label referring to a particular forest (i.e. "forest_0") in the overall json hierarchy - #' @return NULL + #' @return None append_from_json_string = function(json_string, json_forest_label) { forest_container_append_from_json_string_cpp(self$forest_container_ptr, json_string, json_forest_label) }, @@ -799,6 +799,7 @@ createForest <- function(num_trees, leaf_dimension=1, is_leaf_constant=F, is_exp #' @param active_forest Current active forest #' @param forest_samples (Optional) Container of forest samples from which to re-initialize active forest. If not provided, active forest will be reset to an ensemble of single-node (i.e. root) trees. #' @param forest_num (Optional) Index of forest samples from which to initialize active forest. If not provided, active forest will be reset to an ensemble of single-node (i.e. root) trees. +#' @return None #' @export #' #' @examples @@ -832,6 +833,7 @@ resetActiveForest <- function(active_forest, forest_samples=NULL, forest_num=NUL #' @param dataset Training dataset object #' @param residual Residual which will also be updated #' @param is_mean_model Whether the model being updated is a conditional mean model +#' @return None #' @export #' #' @examples diff --git a/R/model.R b/R/model.R index 534cf7bc..5dc1de69 100644 --- a/R/model.R +++ b/R/model.R @@ -125,7 +125,7 @@ ForestModel <- R6::R6Class( #' Update the current state of the outcome (i.e. partial residual) data by subtracting the current predictions of each tree. #' This function is run after the `Outcome` class's `update_data` method, which overwrites the partial residual with an entirely new stream of outcome data. #' @param residual Outcome used to sample the forest - #' @return NULL + #' @return None propagate_residual_update = function(residual) { propagate_trees_column_vector_cpp(self$tracker_ptr, residual$data_ptr) }, @@ -133,7 +133,7 @@ ForestModel <- R6::R6Class( #' @description #' Update alpha in the tree prior #' @param alpha New value of alpha to be used - #' @return NULL + #' @return None update_alpha = function(alpha) { update_alpha_tree_prior_cpp(self$tree_prior_ptr, alpha) }, @@ -141,7 +141,7 @@ ForestModel <- R6::R6Class( #' @description #' Update beta in the tree prior #' @param beta New value of beta to be used - #' @return NULL + #' @return None update_beta = function(beta) { update_beta_tree_prior_cpp(self$tree_prior_ptr, beta) }, @@ -149,7 +149,7 @@ ForestModel <- R6::R6Class( #' @description #' Update min_samples_leaf in the tree prior #' @param min_samples_leaf New value of min_samples_leaf to be used - #' @return NULL + #' @return None update_min_samples_leaf = function(min_samples_leaf) { update_min_samples_leaf_tree_prior_cpp(self$tree_prior_ptr, min_samples_leaf) }, @@ -157,7 +157,7 @@ ForestModel <- R6::R6Class( #' @description #' Update max_depth in the tree prior #' @param max_depth New value of max_depth to be used - #' @return NULL + #' @return None update_max_depth = function(max_depth) { update_max_depth_tree_prior_cpp(self$tree_prior_ptr, max_depth) } diff --git a/R/random_effects.R b/R/random_effects.R index 38c47166..f9d0b70c 100644 --- a/R/random_effects.R +++ b/R/random_effects.R @@ -32,7 +32,7 @@ RandomEffectSamples <- R6::R6Class( #' @param num_components Number of "components" or bases defining the random effects regression #' @param num_groups Number of random effects groups #' @param random_effects_tracker Object of type `RandomEffectsTracker` - #' @return NULL + #' @return None load_in_session = function(num_components, num_groups, random_effects_tracker) { # Initialize self$rfx_container_ptr <- rfx_container_cpp(num_components, num_groups) @@ -59,7 +59,7 @@ RandomEffectSamples <- R6::R6Class( #' @param json_rfx_container_label Label referring to a particular rfx sample container (i.e. "random_effect_container_0") in the overall json hierarchy #' @param json_rfx_mapper_label Label referring to a particular rfx label mapper (i.e. "random_effect_label_mapper_0") in the overall json hierarchy #' @param json_rfx_groupids_label Label referring to a particular set of rfx group IDs (i.e. "random_effect_groupids_0") in the overall json hierarchy - #' @return NULL (updates object in-place) + #' @return None append_from_json = function(json_object, json_rfx_container_label, json_rfx_mapper_label, json_rfx_groupids_label) { rfx_container_append_from_json_cpp(self$rfx_container_ptr, json_object$json_ptr, json_rfx_container_label) }, @@ -83,7 +83,7 @@ RandomEffectSamples <- R6::R6Class( #' @param json_rfx_container_label Label referring to a particular rfx sample container (i.e. "random_effect_container_0") in the overall json hierarchy #' @param json_rfx_mapper_label Label referring to a particular rfx label mapper (i.e. "random_effect_label_mapper_0") in the overall json hierarchy #' @param json_rfx_groupids_label Label referring to a particular set of rfx group IDs (i.e. "random_effect_groupids_0") in the overall json hierarchy - #' @return NULL (updates object in-place) + #' @return None append_from_json_string = function(json_string, json_rfx_container_label, json_rfx_mapper_label, json_rfx_groupids_label) { # Append RFX objects rfx_container_append_from_json_string_cpp(self$rfx_container_ptr, json_string, json_rfx_container_label) @@ -398,6 +398,7 @@ createRandomEffectsModel <- function(num_components, num_groups) { #' @param rfx_samples Object of type `RandomEffectSamples`. #' @param sample_num Index of sample stored in `rfx_samples` from which to reset the state of a random effects model. Zero-indexed, so resetting based on the first sample would require setting `sample_num = 0`. #' @param sigma_alpha_init Initial value of the "working parameter" scale parameter. +#' @return None #' @export #' #' @examples @@ -439,6 +440,7 @@ resetRandomEffectsModel <- function(rfx_model, rfx_samples, sample_num, sigma_al #' @param rfx_dataset Object of type `RandomEffectsDataset`. #' @param residual Object of type `Outcome`. #' @param rfx_samples Object of type `RandomEffectSamples`. +#' @return None #' @export #' #' @examples @@ -476,6 +478,7 @@ resetRandomEffectsTracker <- function(rfx_tracker, rfx_model, rfx_dataset, resid #' @param sigma_xi_init Initial value of the "group parameters" scale parameter. #' @param sigma_xi_shape Shape parameter for the inverse gamma variance model on the group parameters. #' @param sigma_xi_scale Scale parameter for the inverse gamma variance model on the group parameters. +#' @return None #' @export #' #' @examples @@ -522,6 +525,7 @@ rootResetRandomEffectsModel <- function(rfx_model, alpha_init, xi_init, sigma_al #' @param rfx_model Object of type `RandomEffectsModel`. #' @param rfx_dataset Object of type `RandomEffectsDataset`. #' @param residual Object of type `Outcome`. +#' @return None #' @export #' #' @examples diff --git a/R/serialization.R b/R/serialization.R index 14463c52..d5d4e046 100644 --- a/R/serialization.R +++ b/R/serialization.R @@ -45,7 +45,7 @@ CppJson <- R6::R6Class( #' @description #' Convert a forest container to json and add to the current `CppJson` object #' @param forest_samples `ForestSamples` R class - #' @return NULL + #' @return None add_forest = function(forest_samples) { forest_label <- json_add_forest_cpp(self$json_ptr, forest_samples$forest_container_ptr) self$num_forests <- self$num_forests + 1 @@ -55,7 +55,7 @@ CppJson <- R6::R6Class( #' @description #' Convert a random effects container to json and add to the current `CppJson` object #' @param rfx_samples `RandomEffectSamples` R class - #' @return NULL + #' @return None add_random_effects = function(rfx_samples) { rfx_container_label <- json_add_rfx_container_cpp(self$json_ptr, rfx_samples$rfx_container_ptr) self$rfx_container_labels <- c(self$rfx_container_labels, rfx_container_label) @@ -72,7 +72,7 @@ CppJson <- R6::R6Class( #' @param field_name The name of the field to be added to json #' @param field_value Numeric value of the field to be added to json #' @param subfolder_name (Optional) Name of the subfolder / hierarchy under which to place the value - #' @return NULL + #' @return None add_scalar = function(field_name, field_value, subfolder_name = NULL) { if (is.null(subfolder_name)) { json_add_double_cpp(self$json_ptr, field_name, field_value) @@ -86,7 +86,7 @@ CppJson <- R6::R6Class( #' @param field_name The name of the field to be added to json #' @param field_value Integer value of the field to be added to json #' @param subfolder_name (Optional) Name of the subfolder / hierarchy under which to place the value - #' @return NULL + #' @return None add_integer = function(field_name, field_value, subfolder_name = NULL) { if (is.null(subfolder_name)) { json_add_integer_cpp(self$json_ptr, field_name, field_value) @@ -100,7 +100,7 @@ CppJson <- R6::R6Class( #' @param field_name The name of the field to be added to json #' @param field_value Numeric value of the field to be added to json #' @param subfolder_name (Optional) Name of the subfolder / hierarchy under which to place the value - #' @return NULL + #' @return None add_boolean = function(field_name, field_value, subfolder_name = NULL) { if (is.null(subfolder_name)) { json_add_bool_cpp(self$json_ptr, field_name, field_value) @@ -114,7 +114,7 @@ CppJson <- R6::R6Class( #' @param field_name The name of the field to be added to json #' @param field_value Numeric value of the field to be added to json #' @param subfolder_name (Optional) Name of the subfolder / hierarchy under which to place the value - #' @return NULL + #' @return None add_string = function(field_name, field_value, subfolder_name = NULL) { if (is.null(subfolder_name)) { json_add_string_cpp(self$json_ptr, field_name, field_value) @@ -128,7 +128,7 @@ CppJson <- R6::R6Class( #' @param field_name The name of the field to be added to json #' @param field_vector Vector to be stored in json #' @param subfolder_name (Optional) Name of the subfolder / hierarchy under which to place the value - #' @return NULL + #' @return None add_vector = function(field_name, field_vector, subfolder_name = NULL) { field_vector <- as.numeric(field_vector) if (is.null(subfolder_name)) { @@ -143,7 +143,7 @@ CppJson <- R6::R6Class( #' @param field_name The name of the field to be added to json #' @param field_vector Vector to be stored in json #' @param subfolder_name (Optional) Name of the subfolder / hierarchy under which to place the value - #' @return NULL + #' @return None add_integer_vector = function(field_name, field_vector, subfolder_name = NULL) { field_vector <- as.numeric(field_vector) if (is.null(subfolder_name)) { @@ -158,7 +158,7 @@ CppJson <- R6::R6Class( #' @param field_name The name of the field to be added to json #' @param field_vector Character vector to be stored in json #' @param subfolder_name (Optional) Name of the subfolder / hierarchy under which to place the value - #' @return NULL + #' @return None add_string_vector = function(field_name, field_vector, subfolder_name = NULL) { if (is.null(subfolder_name)) { json_add_string_vector_cpp(self$json_ptr, field_name, field_vector) @@ -171,7 +171,7 @@ CppJson <- R6::R6Class( #' Add a list of vectors (as an object map of arrays) to the json object under the name "field_name" #' @param field_name The name of the field to be added to json #' @param field_list List to be stored in json - #' @return NULL + #' @return None add_list = function(field_name, field_list) { stopifnot(sum(!sapply(field_list, is.vector))==0) list_names <- names(field_list) @@ -186,7 +186,7 @@ CppJson <- R6::R6Class( #' Add a list of vectors (as an object map of arrays) to the json object under the name "field_name" #' @param field_name The name of the field to be added to json #' @param field_list List to be stored in json - #' @return NULL + #' @return None add_string_list = function(field_name, field_list) { stopifnot(sum(!sapply(field_list, is.vector))==0) list_names <- names(field_list) @@ -201,7 +201,7 @@ CppJson <- R6::R6Class( #' Retrieve a scalar value from the json object under the name "field_name" (with optional subfolder "subfolder_name") #' @param field_name The name of the field to be accessed from json #' @param subfolder_name (Optional) Name of the subfolder / hierarchy under which the field is stored - #' @return NULL + #' @return None get_scalar = function(field_name, subfolder_name = NULL) { if (is.null(subfolder_name)) { stopifnot(json_contains_field_cpp(self$json_ptr, field_name)) @@ -217,7 +217,7 @@ CppJson <- R6::R6Class( #' Retrieve a integer value from the json object under the name "field_name" (with optional subfolder "subfolder_name") #' @param field_name The name of the field to be accessed from json #' @param subfolder_name (Optional) Name of the subfolder / hierarchy under which the field is stored - #' @return NULL + #' @return None get_integer = function(field_name, subfolder_name = NULL) { if (is.null(subfolder_name)) { stopifnot(json_contains_field_cpp(self$json_ptr, field_name)) @@ -233,7 +233,7 @@ CppJson <- R6::R6Class( #' Retrieve a boolean value from the json object under the name "field_name" (with optional subfolder "subfolder_name") #' @param field_name The name of the field to be accessed from json #' @param subfolder_name (Optional) Name of the subfolder / hierarchy under which the field is stored - #' @return NULL + #' @return None get_boolean = function(field_name, subfolder_name = NULL) { if (is.null(subfolder_name)) { stopifnot(json_contains_field_cpp(self$json_ptr, field_name)) @@ -249,7 +249,7 @@ CppJson <- R6::R6Class( #' Retrieve a string value from the json object under the name "field_name" (with optional subfolder "subfolder_name") #' @param field_name The name of the field to be accessed from json #' @param subfolder_name (Optional) Name of the subfolder / hierarchy under which the field is stored - #' @return NULL + #' @return None get_string = function(field_name, subfolder_name = NULL) { if (is.null(subfolder_name)) { stopifnot(json_contains_field_cpp(self$json_ptr, field_name)) @@ -265,7 +265,7 @@ CppJson <- R6::R6Class( #' Retrieve a vector from the json object under the name "field_name" (with optional subfolder "subfolder_name") #' @param field_name The name of the field to be accessed from json #' @param subfolder_name (Optional) Name of the subfolder / hierarchy under which the field is stored - #' @return NULL + #' @return None get_vector = function(field_name, subfolder_name = NULL) { if (is.null(subfolder_name)) { stopifnot(json_contains_field_cpp(self$json_ptr, field_name)) @@ -281,7 +281,7 @@ CppJson <- R6::R6Class( #' Retrieve an integer vector from the json object under the name "field_name" (with optional subfolder "subfolder_name") #' @param field_name The name of the field to be accessed from json #' @param subfolder_name (Optional) Name of the subfolder / hierarchy under which the field is stored - #' @return NULL + #' @return None get_integer_vector = function(field_name, subfolder_name = NULL) { if (is.null(subfolder_name)) { stopifnot(json_contains_field_cpp(self$json_ptr, field_name)) @@ -297,7 +297,7 @@ CppJson <- R6::R6Class( #' Retrieve a character vector from the json object under the name "field_name" (with optional subfolder "subfolder_name") #' @param field_name The name of the field to be accessed from json #' @param subfolder_name (Optional) Name of the subfolder / hierarchy under which the field is stored - #' @return NULL + #' @return None get_string_vector = function(field_name, subfolder_name = NULL) { if (is.null(subfolder_name)) { stopifnot(json_contains_field_cpp(self$json_ptr, field_name)) @@ -313,7 +313,7 @@ CppJson <- R6::R6Class( #' Reconstruct a list of numeric vectors from the json object stored under "field_name" #' @param field_name The name of the field to be added to json #' @param key_names Vector of names of list elements (each of which is a vector) - #' @return NULL + #' @return None get_numeric_list = function(field_name, key_names) { output <- list() for (i in 1:length(key_names)) { @@ -327,7 +327,7 @@ CppJson <- R6::R6Class( #' Reconstruct a list of string vectors from the json object stored under "field_name" #' @param field_name The name of the field to be added to json #' @param key_names Vector of names of list elements (each of which is a vector) - #' @return NULL + #' @return None get_string_list = function(field_name, key_names) { output <- list() for (i in 1:length(key_names)) { @@ -347,7 +347,7 @@ CppJson <- R6::R6Class( #' @description #' Save a json object to file #' @param filename String of filepath, must end in ".json" - #' @return NULL + #' @return None save_file = function(filename) { json_save_file_cpp(self$json_ptr, filename) }, @@ -355,7 +355,7 @@ CppJson <- R6::R6Class( #' @description #' Load a json object from file #' @param filename String of filepath, must end in ".json" - #' @return NULL + #' @return None load_from_file = function(filename) { json_load_file_cpp(self$json_ptr, filename) }, @@ -363,7 +363,7 @@ CppJson <- R6::R6Class( #' @description #' Load a json object from string #' @param json_string JSON string dump - #' @return NULL + #' @return None load_from_string = function(json_string) { json_load_string_cpp(self$json_ptr, json_string) } diff --git a/R/variance.R b/R/variance.R index f2688b15..32fc9a21 100644 --- a/R/variance.R +++ b/R/variance.R @@ -5,6 +5,7 @@ #' @param rng C++ random number generator #' @param a Global variance shape parameter #' @param b Global variance scale parameter +#' @return None #' @export #' #' @examples @@ -27,7 +28,7 @@ sampleGlobalErrorVarianceOneIteration <- function(residual, dataset, rng, a, b) #' @param rng C++ random number generator #' @param a Leaf variance shape parameter #' @param b Leaf variance scale parameter -#' +#' @return None #' @export #' #' @examples diff --git a/man/CppJson.Rd b/man/CppJson.Rd index 65f1edec..828230f5 100644 --- a/man/CppJson.Rd +++ b/man/CppJson.Rd @@ -85,7 +85,7 @@ Convert a forest container to json and add to the current \code{CppJson} object \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -105,7 +105,7 @@ Convert a random effects container to json and add to the current \code{CppJson} \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -129,7 +129,7 @@ Add a scalar to the json object under the name "field_name" (with optional subfo \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -153,7 +153,7 @@ Add a scalar to the json object under the name "field_name" (with optional subfo \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -177,7 +177,7 @@ Add a boolean value to the json object under the name "field_name" (with optiona \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -201,7 +201,7 @@ Add a string value to the json object under the name "field_name" (with optional \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -225,7 +225,7 @@ Add a vector to the json object under the name "field_name" (with optional subfo \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -249,7 +249,7 @@ Add an integer vector to the json object under the name "field_name" (with optio \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -273,7 +273,7 @@ Add an array to the json object under the name "field_name" (with optional subfo \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -295,7 +295,7 @@ Add a list of vectors (as an object map of arrays) to the json object under the \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -317,7 +317,7 @@ Add a list of vectors (as an object map of arrays) to the json object under the \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -339,7 +339,7 @@ Retrieve a scalar value from the json object under the name "field_name" (with o \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -361,7 +361,7 @@ Retrieve a integer value from the json object under the name "field_name" (with \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -383,7 +383,7 @@ Retrieve a boolean value from the json object under the name "field_name" (with \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -405,7 +405,7 @@ Retrieve a string value from the json object under the name "field_name" (with o \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -427,7 +427,7 @@ Retrieve a vector from the json object under the name "field_name" (with optiona \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -449,7 +449,7 @@ Retrieve an integer vector from the json object under the name "field_name" (wit \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -471,7 +471,7 @@ Retrieve a character vector from the json object under the name "field_name" (wi \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -493,7 +493,7 @@ Reconstruct a list of numeric vectors from the json object stored under "field_n \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -515,7 +515,7 @@ Reconstruct a list of string vectors from the json object stored under "field_na \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -548,7 +548,7 @@ Save a json object to file \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -568,7 +568,7 @@ Load a json object from file \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -588,7 +588,7 @@ Load a json object from string \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } } diff --git a/man/ForestModel.Rd b/man/ForestModel.Rd index f00d7566..61b688a3 100644 --- a/man/ForestModel.Rd +++ b/man/ForestModel.Rd @@ -183,7 +183,7 @@ This function is run after the \code{Outcome} class's \code{update_data} method, \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -203,7 +203,7 @@ Update alpha in the tree prior \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -223,7 +223,7 @@ Update beta in the tree prior \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -243,7 +243,7 @@ Update min_samples_leaf in the tree prior \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -263,7 +263,7 @@ Update max_depth in the tree prior \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } } diff --git a/man/ForestSamples.Rd b/man/ForestSamples.Rd index 111b1bd6..d1f01d03 100644 --- a/man/ForestSamples.Rd +++ b/man/ForestSamples.Rd @@ -139,7 +139,7 @@ Append to a \code{ForestContainer} object from a json object \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -183,7 +183,7 @@ Append to a \code{ForestContainer} object from a json object \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} diff --git a/man/Outcome.Rd b/man/Outcome.Rd index 224b84a0..656c8f81 100644 --- a/man/Outcome.Rd +++ b/man/Outcome.Rd @@ -78,7 +78,7 @@ Update the current state of the outcome (i.e. partial residual) data by adding t \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -98,7 +98,7 @@ Update the current state of the outcome (i.e. partial residual) data by subtract \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -118,7 +118,7 @@ Update the current state of the outcome (i.e. partial residual) data by replacin \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } } diff --git a/man/RandomEffectSamples.Rd b/man/RandomEffectSamples.Rd index 3f0da6b9..ecc6230f 100644 --- a/man/RandomEffectSamples.Rd +++ b/man/RandomEffectSamples.Rd @@ -75,7 +75,7 @@ Construct RandomEffectSamples object from other "in-session" R objects \if{html}{\out{}} } \subsection{Returns}{ -NULL +None } } \if{html}{\out{
}} @@ -137,7 +137,7 @@ Append random effect draws to \code{RandomEffectSamples} object from a json obje \if{html}{\out{}} } \subsection{Returns}{ -NULL (updates object in-place) +None } } \if{html}{\out{
}} @@ -199,7 +199,7 @@ Append random effect draws to \code{RandomEffectSamples} object from a json obje \if{html}{\out{}} } \subsection{Returns}{ -NULL (updates object in-place) +None } } \if{html}{\out{
}} diff --git a/man/resetActiveForest.Rd b/man/resetActiveForest.Rd index 832b6502..3f9b1a5a 100644 --- a/man/resetActiveForest.Rd +++ b/man/resetActiveForest.Rd @@ -14,6 +14,9 @@ resetActiveForest(active_forest, forest_samples = NULL, forest_num = NULL) \item{forest_num}{(Optional) Index of forest samples from which to initialize active forest. If not provided, active forest will be reset to an ensemble of single-node (i.e. root) trees.} } +\value{ +None +} \description{ Reset an active forest, either from a specific forest in a \code{ForestContainer} or to an ensemble of single-node (i.e. root) trees diff --git a/man/resetForestModel.Rd b/man/resetForestModel.Rd index 10633e03..07f3a8fa 100644 --- a/man/resetForestModel.Rd +++ b/man/resetForestModel.Rd @@ -17,6 +17,9 @@ resetForestModel(forest_model, forest, dataset, residual, is_mean_model) \item{is_mean_model}{Whether the model being updated is a conditional mean model} } +\value{ +None +} \description{ Re-initialize a forest model (tracking data structures) from a specific forest in a \code{ForestContainer} } diff --git a/man/resetRandomEffectsModel.Rd b/man/resetRandomEffectsModel.Rd index e42797de..47afb38b 100644 --- a/man/resetRandomEffectsModel.Rd +++ b/man/resetRandomEffectsModel.Rd @@ -15,6 +15,9 @@ resetRandomEffectsModel(rfx_model, rfx_samples, sample_num, sigma_alpha_init) \item{sigma_alpha_init}{Initial value of the "working parameter" scale parameter.} } +\value{ +None +} \description{ Reset a \code{RandomEffectsModel} object based on the parameters indexed by \code{sample_num} in a \code{RandomEffectsSamples} object } diff --git a/man/resetRandomEffectsTracker.Rd b/man/resetRandomEffectsTracker.Rd index bae73a66..743978e1 100644 --- a/man/resetRandomEffectsTracker.Rd +++ b/man/resetRandomEffectsTracker.Rd @@ -23,6 +23,9 @@ resetRandomEffectsTracker( \item{rfx_samples}{Object of type \code{RandomEffectSamples}.} } +\value{ +None +} \description{ Reset a \code{RandomEffectsTracker} object based on the parameters indexed by \code{sample_num} in a \code{RandomEffectsSamples} object } diff --git a/man/rootResetRandomEffectsModel.Rd b/man/rootResetRandomEffectsModel.Rd index de1b3448..03043fa4 100644 --- a/man/rootResetRandomEffectsModel.Rd +++ b/man/rootResetRandomEffectsModel.Rd @@ -29,6 +29,9 @@ rootResetRandomEffectsModel( \item{sigma_xi_scale}{Scale parameter for the inverse gamma variance model on the group parameters.} } +\value{ +None +} \description{ Reset a \code{RandomEffectsModel} object to its "default" state } diff --git a/man/rootResetRandomEffectsTracker.Rd b/man/rootResetRandomEffectsTracker.Rd index 1f3c5461..82893d0e 100644 --- a/man/rootResetRandomEffectsTracker.Rd +++ b/man/rootResetRandomEffectsTracker.Rd @@ -15,6 +15,9 @@ rootResetRandomEffectsTracker(rfx_tracker, rfx_model, rfx_dataset, residual) \item{residual}{Object of type \code{Outcome}.} } +\value{ +None +} \description{ Reset a \code{RandomEffectsTracker} object to its "default" state } diff --git a/man/sampleGlobalErrorVarianceOneIteration.Rd b/man/sampleGlobalErrorVarianceOneIteration.Rd index cd8eda75..f2068a13 100644 --- a/man/sampleGlobalErrorVarianceOneIteration.Rd +++ b/man/sampleGlobalErrorVarianceOneIteration.Rd @@ -17,6 +17,9 @@ sampleGlobalErrorVarianceOneIteration(residual, dataset, rng, a, b) \item{b}{Global variance scale parameter} } +\value{ +None +} \description{ Sample one iteration of the (inverse gamma) global variance model } diff --git a/man/sampleLeafVarianceOneIteration.Rd b/man/sampleLeafVarianceOneIteration.Rd index b444a726..b79ee84a 100644 --- a/man/sampleLeafVarianceOneIteration.Rd +++ b/man/sampleLeafVarianceOneIteration.Rd @@ -15,6 +15,9 @@ sampleLeafVarianceOneIteration(forest, rng, a, b) \item{b}{Leaf variance scale parameter} } +\value{ +None +} \description{ Sample one iteration of the leaf parameter variance model (only for univariate basis and constant leaf!) } diff --git a/man/saveBARTModelToJsonFile.Rd b/man/saveBARTModelToJsonFile.Rd index 869caa44..3b24e210 100644 --- a/man/saveBARTModelToJsonFile.Rd +++ b/man/saveBARTModelToJsonFile.Rd @@ -11,6 +11,9 @@ saveBARTModelToJsonFile(object, filename) \item{filename}{String of filepath, must end in ".json"} } +\value{ +None +} \description{ Convert the persistent aspects of a BART model to (in-memory) JSON and save to a file } diff --git a/vignettes/EnsembleKernel.Rmd b/vignettes/EnsembleKernel.Rmd index 2863efe3..9d237db8 100644 --- a/vignettes/EnsembleKernel.Rmd +++ b/vignettes/EnsembleKernel.Rmd @@ -102,9 +102,9 @@ bart_model <- bart(X_train=X_train, y_train=y_train, X_test=X_test, mean_forest_ # Extract kernels needed for kriging leaf_mat_train <- computeForestLeafIndices(bart_model, X_train, forest_type = "mean", - forest_inds = bart_model$model_params$num_samples) + forest_inds = bart_model$model_params$num_samples - 1) leaf_mat_test <- computeForestLeafIndices(bart_model, X_test, forest_type = "mean", - forest_inds = bart_model$model_params$num_samples) + forest_inds = bart_model$model_params$num_samples - 1) W_train <- sparseMatrix(i=rep(1:length(y_train),num_trees), j=leaf_mat_train + 1, x=1) W_test <- sparseMatrix(i=rep(1:length(y_test),num_trees), j=leaf_mat_test + 1, x=1) Sigma_11 <- tcrossprod(W_test) / num_trees @@ -179,9 +179,9 @@ bart_model <- bart(X_train=X_train, y_train=y_train, X_test=X_test, mean_forest_ # Extract kernels needed for kriging leaf_mat_train <- computeForestLeafIndices(bart_model, X_train, forest_type = "mean", - forest_inds = bart_model$model_params$num_samples) + forest_inds = bart_model$model_params$num_samples - 1) leaf_mat_test <- computeForestLeafIndices(bart_model, X_test, forest_type = "mean", - forest_inds = bart_model$model_params$num_samples) + forest_inds = bart_model$model_params$num_samples - 1) W_train <- sparseMatrix(i=rep(1:length(y_train),num_trees), j=leaf_mat_train + 1, x=1) W_test <- sparseMatrix(i=rep(1:length(y_test),num_trees), j=leaf_mat_test + 1, x=1) Sigma_11 <- tcrossprod(W_test) / num_trees