**Abstract:**

This is a technical blog post of **both** an HTML file *and* [.qmd file](src/wine_features.qmd) hosted on GitHub pages.

# Setup

1.  Change the author of this RMD file to be yourself and delete this line.
2.  Modify if necessary the below code so that you can successfully load `wine.rds` then delete this line.
3.  In the space provided after the R chunk, explain what thecode is doing (line by line) then delete this line.
4.  Get your [GitHub Pages](https://docs.github.com/en/pages/quickstart) ready.

**Step Up Code:**
```{r}
library(tidyverse)
library(caret)
library(fastDummies)
wine <- readRDS(gzcon(url("https://github.com/cd-public/D505/raw/master/dat/wine.rds")))
```

**Explanataion:**

> <span style="color:red;font-weight:bold">TODO</span>: *write your line-by-line explanation of the code here*

# Feature Engineering

We begin by engineering an number of features.

1. Create a total of 10 features (including points). 
2. Remove all rows with a missing value. 
3. Ensure only log(price) and engineering features are the only columns that remain in the `wino` dataframe.

```{r}
wino <- wine %>% 
  mutate(lprice=log(price))
  # engineer features here
```

# Caret

We now use a train/test split to evaluate the features.

1. Use the Caret library to partition the wino dataframe into an 80/20 split. 
2. Run a linear regression with bootstrap resampling. 
3. Report RMSE on the test partition of the data.

```{r}
# TODO: hint: Check the slides.
```

# Variable selection

We now graph the importance of your 10 features.

```{r}
# TODO: hint: Check the slides.
```