Question: Random Forest Model: Build a Random Forest model. Tune hyperparameters such as max _ depth, min _ samples _ split, n _ estimators, and min
Random Forest Model:
Build a Random Forest model.
Tune hyperparameters such as maxdepth, minsamplessplit,
nestimators, and minsamplesleaf using Grid Search.
KNearest Neighbors Model:
Build a KNearest Neighbors KNN model.
Tune hyperparameters such as nneighbors, weights, and p dis
tance metric using Grid Search.
Which metric, accuracy or Fscore, would you use to run the Grid
SearchCV?
Select the metric accuracy or Fscore that you believe best suits
your use case.
Below are the grids for GridSearchCV:
paramgriddt
'maxdepth': None
'minsamplessplit':
'minsamplesleaf':
paramgridrf
nestimators':
'maxdepth': None
'minsamplessplit':
'minsamplesleaf':
paramgridknn
nneighbors':
'weights': uniform 'distance'
p:
Decision Tree DT Grid:
maxdepth: Controls the maximum depth of the tree. Options:
or no limit None
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
