Question: Write the necessary python code (spyder python) to read the dataset file in the photo and perform classification using 5 supervised learning models Bagging, boosting,
Write the necessary python code (spyder python) to read the dataset file in the photo and perform classification using 5 supervised learning models Bagging, boosting, stacking ,decision tree, K-Neighbors). Note that for each model draw the confusion matrix and compute the Accuracy, Recall, Precision and F1-Measure
show the output in python code
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline Person 10 & Gender & Age & Oecupation & Sleep Duration & Quality of Sleep & Physical Activity Level & Streis Levet & BMI Category & Biood Pressure & Heart Rate & Daily Steps & Sleep Diserder \\ \hline 1 & Male & 27 & Software Engineer & 6.1 & 6 & 42 & 6 & Overweight & 126/83 & 77 & 4200 & None \\ \hline 2 & Male & 28 & Dectar & 6.2 & 6 & 60 & 8 & Normal & 125/80 & 75 & 10000 & None \\ \hline 3 & Male & 28 & Dector & 6.2 & 6 & 60 & 8 & Normal & 125/80 & 75 & 10000 & None \\ \hline 4 & Male & 28 & Sales Representative & 5.9 & 4 & 30 & 8 & Obese & 140/90 & 85 & 3000 & Sieed Apned \\ \hline 5 & Male & 28 & Sales Representative & 5.9 & 4 & 30 & 8 & Obese & 140/90 & 85 & 3000 & Sieep Apnea \\ \hline 6 & Male & 28 & Software Engineer & 5.9 & 4 & 30 & 8 & Obese & 140/90 & 85 & 3000 & Insomnia \\ \hline 7 & Male & 29 & Teacher & 6.3 & 6 & 40 & 7 & Obese & 140/90 & 82 & 3500 & Insomnia \\ \hline 8 & Maie & 29 & Dectar & 7.8 & 7 & 75 & 6 & Normal & 120/80 & 70 & 8000 & None \\ \hline 9 & Male & 29 & Dector & 7.8 & 7 & 75 & 6 & Normal & 120/80 & 70 & 8000 & None \\ \hline 10 & Male & 29 & Doctor & 7.8 & 7 & 75 & 6 & Normal & 120/80 & 70 & 8000 & None \\ \hline 11 & Male & 29 & Dector & 6.1 & 6 & 30 & 8 & Normal & 120/80 & 70 & 8000 & None \\ \hline 12 & Male & 29 & Dector & 7.8 & 7 & 75 & 6 & Normal & 120/80 & 70 & 8000 & None \\ \hline 13 & Male & 29 & Doctor & 6.1 & 6 & 30 & 8 & Normal & 120/80 & 70 & 8000 & None \\ \hline 14 & Male & 29 & Dector & 6 & 6 & 30 & 8 & Normal & 120/80 & 70 & 8000 & None \\ \hline \end{tabular}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
