Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5 (20 points) Decision Stump In this problem, we will perform a binary classification task on a modified Iris dataset. This modified Iris dataset has

image text in transcribed

5 (20 points) Decision Stump In this problem, we will perform a binary classification task on a modified Iris dataset. This modified Iris dataset has 2 classes and it is split into a training set Straining with 100 data points and a test set Stest with 50 data points. Each data point (x,y) has a feature vector XER4 and its corresponding label y E {0,1}. Here we utilize a decision stump to solve the above binary classification task. The decision stump works as follows (for simplicity, we restrict our attention to uni-directional decision stumps): Given the feature vector x, the feature index j, and a threshold Th, the classification function is defined by y = f(x, j, Th) as: i if x(j) > Th f(x, j, Th) = { 0 otherwise. where x(j) refers to the j-th feature in x. The error e on dataset S = {(xi, yi)} is defined as: =- 1(Yi+ f(xi, j, Th)) n i=1 where n = |S| is the size of the dataset S. Thus, we can obtain training error etraining on training set Straining, and test error etest on test set Stest - Based on the decision stump above, we wish to use an algorithm to find the best feature index j* and the best threshold Th* on training set to create a "best" decision stump, in a sense that such decision stump can achieve the lowest training error e training Please download the notebook decision stump.ipynb from the course website and fill in the missing blanks. Follow the instructions in the skeleton code and report: The best feature index, the best threshold, the lowest training error and its correspond- ing test error. All 4 histograms. 5 (20 points) Decision Stump In this problem, we will perform a binary classification task on a modified Iris dataset. This modified Iris dataset has 2 classes and it is split into a training set Straining with 100 data points and a test set Stest with 50 data points. Each data point (x,y) has a feature vector XER4 and its corresponding label y E {0,1}. Here we utilize a decision stump to solve the above binary classification task. The decision stump works as follows (for simplicity, we restrict our attention to uni-directional decision stumps): Given the feature vector x, the feature index j, and a threshold Th, the classification function is defined by y = f(x, j, Th) as: i if x(j) > Th f(x, j, Th) = { 0 otherwise. where x(j) refers to the j-th feature in x. The error e on dataset S = {(xi, yi)} is defined as: =- 1(Yi+ f(xi, j, Th)) n i=1 where n = |S| is the size of the dataset S. Thus, we can obtain training error etraining on training set Straining, and test error etest on test set Stest - Based on the decision stump above, we wish to use an algorithm to find the best feature index j* and the best threshold Th* on training set to create a "best" decision stump, in a sense that such decision stump can achieve the lowest training error e training Please download the notebook decision stump.ipynb from the course website and fill in the missing blanks. Follow the instructions in the skeleton code and report: The best feature index, the best threshold, the lowest training error and its correspond- ing test error. All 4 histograms

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions

Question

LOQ 3-8: What are sleeps functions?

Answered: 1 week ago