Stat. 652 Homework03
- Read: - mdsr2e Chapter 10 - mdsr2e Chapter 11 - Machine Learning with R, Second Edition, Chapter 5. To access the book CSUEB Library Databases A-Z > Safari Books Online, register and access the book
- Problems: - 11.7 Exercises: Problem 6a, Run Models 3. Decision Tree, using c5.0, 4. Random Forest, 6. Naive Bayes, using training and test datasets, as described in part c of the problem.
Hint: For Problems 6a and 6b, explore the dataset before attempting to fit the models. You will need to deal with the missing values before applying some or all of the models. Which models do not work with missing data?
Instructions: Answer all questions in the space below the # headers.
11.7 Exercises: Problem 6a
Run Models 3. Decision Tree, using c5.0, 4. Random Forest, 6. Naive Bayes, using training and test datasets, as described in part c of the problem.
The ability to get a good night’s sleep is correlated with many positive health outcomes. The NHANES data set contains a binary variable SleepTrouble that indicates whether each person has trouble sleeping.
For each of the following models:
- Build a classifier for SleepTrouble
- Report its effectiveness on the NHANES training data
- Make an appropriate visualization of the model
- Interpret the results. What have you learned about people’s sleeping habits?
You may use whatever variables you like, except for SleepHrsNight.
- Decision Tree, using c5.0
- Random Forest
- Naive Bayes
First separate the NHANES data set uniformly at random into 75% training and 25% testing sets.
Model 3. Decision Tree, using c5.0
Answer:
Summarize your answer to the question here. All code and comments should be below and your written answer above.
Code and Comments:
Model 4. Random Forest
Answer:
Summarize your answer to the question here. All code and comments should be below and your written answer above.
Code and Comments:
Model 6. Naive Bayes
Answer:
Summarize your answer to the question here. All code and comments should be below and your written answer above.