View source: R/mars_domain_score.R
mars_domain_score | R Documentation |
This function fits a MARS (Multivariate Adaptive Regression Splines) model to the provided data and computes a domain applicability score based on PCA distances.
mars_domain_score(
featured_col,
train_data,
mars_hyperparameters,
test_data,
threshold_value
)
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. |
A tibble with the domain applicability scores.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.