Bagging Mission: Write Python3 code to implement the bagging algorithm. Data set: Wine Data Set Read the data set description. Use the data set to implement the bagging algorithm. Randomly select 20 instances as the test data and the rest as training data (Keep these 20 test instances so that TA can reproduce your results). • Approaches: Base learner (required): decision trees. Please use scikit learn library: sklearn.tree. Decision Tree Classifier. Bagging (required): Please use scikit-learn library: sklearn.ensemble. BaggingClassifier Other data pre-processing or feature engineering methods (optional): You can apply any technique you prefer. • Performance metric: Successfully built the bagging algorithm using the training data and tell us the accuracy for the test data.

icon
Related questions
Question

Please write code in .ipynb and take screenshot of your results.

1 Programming Assignment
1.
Bagging
Mission: Write Python3 code to implement the bagging algorithm.
Data set: Wine Data Set
Read the data set description. Use the data set to implement the bagging
algorithm. Randomly select 20 instances as the test data and the rest as training
data (Keep these 20 test instances so that TA can reproduce your results).
• Approaches:
Base learner (required): decision trees. Please use scikit learn library:
sklearn.tree. Decision Tree Classifier.
- Bagging (required): Please use scikit-learn library: sklearn.ensemble.BaggingClassifier
Other data pre-processing or feature engineering methods (optional): You can
apply any technique you prefer.
• Performance metric: Successfully built the bagging algorithm using the training data
and tell us the accuracy for the test data.
Transcribed Image Text:1 Programming Assignment 1. Bagging Mission: Write Python3 code to implement the bagging algorithm. Data set: Wine Data Set Read the data set description. Use the data set to implement the bagging algorithm. Randomly select 20 instances as the test data and the rest as training data (Keep these 20 test instances so that TA can reproduce your results). • Approaches: Base learner (required): decision trees. Please use scikit learn library: sklearn.tree. Decision Tree Classifier. - Bagging (required): Please use scikit-learn library: sklearn.ensemble.BaggingClassifier Other data pre-processing or feature engineering methods (optional): You can apply any technique you prefer. • Performance metric: Successfully built the bagging algorithm using the training data and tell us the accuracy for the test data.
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

What about the 20 instances? How do i run the code?

Solution
Bartleby Expert
SEE SOLUTION