Skip to content

Commit

Permalink
bagging
Browse files Browse the repository at this point in the history
  • Loading branch information
codebasics committed Oct 20, 2021
1 parent 6f604ba commit 6e41dfd
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ML/19_Bagging/bagging_exercise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Download heart disease dataset heart.csv in [Exercise](https://github.com/codebasics/py/tree/master/ML/19_Bagging/Exercise) folder and do following, (credits of dataset: https://www.kaggle.com/fedesoriano/heart-failure-prediction)

1. Load heart disease dataset in pandas dataframe
1. Remove outliers using Z score. Usual guideline is to remove anything that has Z score > 3 formula or Z score < -3
1. Convert text columns to numbers using label encoding and one hot encoding
1. Apply scaling
1. Build a classification model using support vector machine. Use standalone model as well as Bagging model and check if you see any difference in the performance.
1. Now use decision tree classifier. Use standalone model as well as Bagging and check if you notice any difference in performance
1. Comparing performance of svm and decision tree classifier figure out where it makes most sense to use bagging and why. Use internet to figure out in what conditions bagging works the best.


[Solution Link](https://github.com/codebasics/py/blob/master/ML/19_Bagging/Exercise/bagging_heart_disease_prediction.ipynb)




0 comments on commit 6e41dfd

Please sign in to comment.