Data Science Qustion Refrence:…
Question Answered step-by-step Data Science Qustion Refrence:… Data Science QustionRefrence: https://github.com/ShmilyJxu/Shared/blob/main/20220501%20(2).ipynbSetup Code:# We’ll import that tools you’ll need.# You may import additional tools if you wish to.import numpy as npfrom sklearn.tree import DecisionTreeClassifierfrom sklearn.ensemble import RandomForestClassifierfrom sklearn.model_selection import train_test_splitfrom sklearn import datasetsimport matplotlib.pyplot as plt%matplotlib inlineTrain several random forest modelsAdd code to the cell below and run it, to help you answer the following questions.Model 1: Using the same training and test sets you created above, construct, train, and test a random forest classifier with the following parameters_n_estimators=10bootstrap=Truemax_features=’sqrt’random_state=0This creates a model that is a traditional RF model, including sample bagging (bootstrap=True) and feature subset randomization (max_features=’sqrt’).Q8: What is the RF Model 1 accuracy score for the test set?Model 2: Using the same training and test sets you created above, construct, train, and test a random forest classifier with the following parameters_n_estimators=10bootstrap=Falsemax_features=64random_state=0This creates a model that does not randomly select subsets of samples and features. All the trees in the forest are nearly identical (the only difference being the random selection amongst feature that give equal reductions in Gini Impurity).Q9: What is the RF Model 2 accuracy score for the test set?Model 3: Using the same training and test sets you created above, construct, train, and test a random forest classifier with the following parameters_n_estimators=100bootstrap=Truemax_features=’sqrt’random_state=0This is the same as Model 1 (a traditional RF model), except you’ll use 100 trees rather than 10 trees. More trees often results in a better model.Q10: What is the RF Model 3 accuracy score for the test set?#Your code goes here Computer Science Engineering & Technology Python Programming CSCI 403 Share QuestionEmailCopy link Comments (0)


