The db.models.deleteOne()
Method
Description
Thedb.models.deleteOne()
method deletes an ML model specified in its argument.
Syntax
Here is the syntax: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 thedb.models.find()
method.
Dropping a Predictor
Thedb.models.deleteOne()
method drops the model collection called
home_rentals_model
.