Models
Remove a Model
Description
The db.models.deleteOne()
method deletes an ML model specified in its argument.
Syntax
Here is the syntax:
On execution, we get:
Where:
Name | Description |
---|---|
name | Name of the model to be deleted. |
Example
Before deleting a predictor, let’s list all the available predictors using the db.models.find()
method.
On execution, we get:
The db.models.deleteOne()
method drops the model collection called home_rentals_model
.
On execution, we get:
You can validate that the model was removed by listing all the predictors.
On execution, we get: