td_delete_model
Description
Function to delete a saved model, and optionally the model objects.
A model can be deleted only by its creator.
Usage
td_delete_model(name, delete.objects = FALSE)
Arguments
name |
Required Argument. |
delete.objects |
Required Argument. |
Examples
# Get remote data source connection.
con <- td_get_context()$connection
# Load example data.
loadExampleData("glm_example", "admissions_train")
# Create object of class "tbl_teradata" to use as input.
admissions_train <- tbl(con, "admissions_train")
# Create the GLM model.
td_glm_out1 <- td_glm_mle(formula = (admitted ~ stats + masters + gpa + programming),
family = "LOGISTIC",
linkfunction = "LOGIT",
data = admissions_train,
weights = "1",
threshold = 0.01,
maxit = 25,
step = FALSE,
intercept = TRUE
)
# Save this generated model.
td_save_model(model = td_glm_out1, name = "glm_model", description = "GLM test")
# Example 1 - Only delete model information from the Model Catalog.
td_delete_model('glm_model')
# Example 2 - Delete model information from the Model Catalog
# and drop model objects as well.
# This example does not apply to the model we just saved, as we have already
# deleted it from the catalog in Example 1.
# We save the model again with another name for this example.
td_save_model(model = td_glm_out1, name = "glm_model_2", description = "GLM test 2")
td_delete_model('glm_model_2', TRUE)