Deleting a Predictor
The db.models.deleteOne()
Method
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
Listing All the Predictors
Before deleting a predictor, let’s list all the available predictors using the
db.models.find()
method.
On execution, we get:
Dropping a Predictor
The db.models.deleteOne()
method drops the model collection called
home_rentals_model
.
On execution, we get:
Validating the Deletion
You can validate that the model was removed by listing all the predictors.
On execution, we get: