Using the eBay auction data (file eBayAuctions.csv ) with variable Competitive as the outcome variable, partition the
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 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 |
Essentials of Business Analytics
ISBN: 978-1285187273
1st edition
Authors: Jeffrey Camm, James Cochran, Michael Fry, Jeffrey Ohlmann, David Anderson, Dennis Sweeney, Thomas Williams