mars_domain_score {viraldomain} | R Documentation |
Calculate the MARS model domain applicability score
Description
This function fits a MARS (Multivariate Adaptive Regression Splines) model to the provided data and computes a domain applicability score based on PCA distances.
Usage
mars_domain_score(
featured_col,
train_data,
mars_hyperparameters,
test_data,
threshold_value
)
Arguments
featured_col |
The name of the featured column. |
train_data |
A data frame containing the training data. |
mars_hyperparameters |
A list of hyperparameters for the MARS model, including:
|
test_data |
A data frame containing the test data. |
threshold_value |
The threshold value for the domain score. |
Value
A tibble with the domain applicability scores.
Examples
set.seed(123)
library(dplyr)
featured_col <- "cd_2022"
# Specifying features for training and testing procedures
train_data = viral %>%
dplyr::select(cd_2022, vl_2022)
test_data = sero
mars_hyperparameters <- list(num_terms = 3, prod_degree = 1, prune_method = "none")
threshold_value <- 0.99
# Call the function
[Package viraldomain version 0.0.7 Index]