
---
output: 
  html_document:
  pdf_document: default
  word_document: default
title: "Assignment 11: Predictive Modeling - Universal Framework"
---

***How to do it?***: 

- Open the Rmarkdown file of this assignment ([link](assignment11.Rmd)) in Rstudio. 

- Right under each **question**, insert  a code chunk (you can use the hotkey `Ctrl + Alt + I` to add a code chunk) and code the solution for the question. 

- `Knit` the rmarkdown file (hotkey: `Ctrl + Alt + K`) to export an html.  

-  Publish the html file to your Githiub Page. 

***Submission***: Submit the link on Github of the assignment to Blackboard.

```{r setup, include=FALSE}
knitr::opts_chunk$set(message = FALSE, warning = FALSE)
```


-------

1. Install the package mlbench and use the follows to import the data

```{r}
library(mlbench)
library(tidyverse)
data(PimaIndiansDiabetes)
df <- tibble(PimaIndiansDiabetes)
```

Train and Test a decision tree and a random forest with caret. Plot the variable importance of these models. 

2. Train and Test a `glmnet` model. Plot the variable importance of the model. 

3. Train and test two models that are not `ranger`, `glmnet` or `rpart`  with caret. If possible, plot the variable importance of the model. 