register_model_dia | R Documentation |
Registers a user-defined or pre-defined diagnostic model function with the internal model registry. This allows the function to be called later by its registered name, facilitating a modular model management system.
register_model_dia(name, func)
name |
A character string, the unique name to register the model under. |
func |
A function, the R function implementing the diagnostic model.
This function should typically accept |
NULL. The function registers the model function invisibly.
get_registered_models_dia
, initialize_modeling_system_dia
# Example of a dummy model function for registration
my_dummy_rf_model <- function(X, y, tune = FALSE, cv_folds = 5) {
message("Training dummy RF model...")
# This is a placeholder and doesn't train a real model.
# It returns a list with a structure similar to a caret train object.
list(method = "dummy_rf")
}
# Initialize the system before registering
initialize_modeling_system_dia()
# Register the new model
register_model_dia("dummy_rf", my_dummy_rf_model)
# Verify that the model is now in the list of registered models
"dummy_rf" %in% names(get_registered_models_dia())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.