Question
Using the eBay auction data (file eBayAuctions.csv ) with variable Competitive as the outcome variable, partition the data into training (60%) and validation (40%). Set
Using the eBay auction data (file eBayAuctions.csv) with variable Competitive as the outcome variable, partition the data into training (60%) and validation (40%).
Set the seed for the random number generator for reproducing the partitions as random_state=1.
Question 1 (5 points) Run a classification tree, using the default settings of DecisionTreeClassifier. Looking at the validation set, what is the overall accuracy? What is the lift on the first decile?
Question 2 (5 points) Run a boosted tree with the same predictors (use function AdaBoostingClassifier with DecisionTreeClassifier as the base estimator). For the validation set, what is the overall accuracy? What is the lift on the first decile?
Question 3 (5 points) Run a bagged tree with the same predictors (use function BaggingClassifier). For the validation set, what is the overall accuracy? What is the lift on the first decile?
Question 4 (5 points) Run a random forest (using RandomForestClassifier). Compare the bagged tree to the random forest in terms of validation accuracy and lift on first decile. How are the two methods conceptually different?
eBayAuctions.csv Data File Example:
Category | currency | sellerRating | Duration | endDay | ClosePrice | OpenPrice | Competitive? |
Music/Movie/Game | US | 3249 | 5 | Mon | 0.01 | 0.01 | 0 |
Music/Movie/Game | US | 3249 | 5 | Mon | 0.01 | 0.01 | 0 |
Music/Movie/Game | US | 3249 | 5 | Mon | 0.01 | 0.01 | 0 |
Music/Movie/Game | US | 3249 | 5 | Mon | 0.01 | 0.01 | 0 |
Music/Movie/Game | US | 3249 | 5 | Mon | 0.01 | 0.01 | 0 |
Music/Movie/Game | US | 3249 | 5 | Mon | 0.01 | 0.01 | 0 |
Music/Movie/Game | US | 3249 | 5 | Mon | 0.01 | 0.01 | 0 |
Music/Movie/Game | US | 3249 | 5 | Mon | 0.01 | 0.01 | 0 |
Music/Movie/Game | US | 3249 | 5 | Mon | 0.01 | 0.01 | 0 |
Music/Movie/Game | US | 3249 | 5 | Mon | 0.01 | 0.01 | 0 |
Music/Movie/Game | US | 3249 | 5 | Mon | 0.01 | 0.01 | 0 |
Music/Movie/Game | US | 3249 | 5 | Mon | 0.01 | 0.01 | 0 |
Music/Movie/Game | US | 3249 | 5 | Mon | 0.01 | 0.01 | 0 |
Music/Movie/Game | US | 3249 | 5 | Mon | 0.01 | 0.01 | 0 |
Music/Movie/Game | US | 3249 | 5 | Mon | 0.01 | 0.01 | 0 |
Music/Movie/Game | US | 3249 | 5 | Mon | 0.01 | 0.01 | 0 |
Automotive | US | 3115 | 7 | Tue | 0.01 | 0.01 | 0 |
Automotive | US | 3115 | 7 | Tue | 0.01 | 0.01 | 0 |
Automotive | US | 3115 | 7 | Tue | 0.01 | 0.01 | 0 |
Automotive | US | 3115 | 7 | Tue | 0.01 | 0.01 | 0 |
Automotive | US | 3115 | 7 | Tue | 0.01 | 0.01 | 1 |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started