normalized_domain_plot {viraldomain}R Documentation

Create a Normalized Domain Plot

Description

This function generates a domain plot for a normalized model based on PCA distances of the provided data.

Usage

normalized_domain_plot(
  features,
  train_data,
  test_data,
  treshold_value,
  impute_hyperparameters
)

Arguments

features

A list containing the following elements:

  • featured_col: The name of the featured column.

  • features_vl: A character vector of feature names related to viral load.

  • features_cd: A character vector of feature names related to cluster of differentiation.

train_data

A data frame containing the training data.

test_data

A data frame containing the test data.

treshold_value

The threshold value for the domain plot.

impute_hyperparameters

A list of hyperparameters for imputation, including:

  • indetect: The undetectable viral load level.

  • tasa_exp: The exponential distribution rate of undetectable values.

  • semi: The seed for random number generation (for reproducibility).

Value

A domain plot visualizing the distances of imputed values.

Examples

data(viral)
data(sero)
 # Adding "jitter_" prefix to original variable
features <- list(
  featured_col = "jittered_cd_2022",
  features_vl = "vl_2022",
  features_cd = "cd_2022"
  )
train_data = viral |>
dplyr::select("cd_2022", "vl_2022")
test_data = sero
treshold_value = 0.99
impute_hyperparameters = list(indetect = 40, tasa_exp = 1/13, semi = 123)
normalized_domain_plot(features, train_data, test_data, treshold_value, impute_hyperparameters)

[Package viraldomain version 0.0.3 Index]