This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
order_id | fulfillment_time_seconds | |
---|---|---|
0 | 2.9509841658615305e-08 | |
1 | 0.019505169765189057 | |
2 | 7.303478954872057e-16 | |
3 | 1.9101714003472088e-24 | |
4 | 0.0003794473081403896 | |
5 | 1.865537747211439e-33 | |
6 | 0.2553208994364204 | |
7 | 1.5598051802319622e-14 | |
8 | 4.6173232860197476e-10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
order_id | order_value_usd | |
---|---|---|
0 | 0.7395043833099897 | |
1 | 1.0355865556717134 | |
2 | 0.6764152559872895 | |
3 | 0.3446415677127145 | |
4 | 1.1726401061050669 | |
5 | 1.3904307829698468 | |
6 | 0.4426054505368791 | |
7 | 0.6919847590849365 | |
8 | 1.2532877991500495 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```{r first separate data into folds before choosing features} | |
# train the model on training set | |
# Leave out fold | |
accuracy.rates <- c() | |
for (itr in seq_len(folds)){ | |
# Note: since input features are already random, no need to shuffle the data | |
# before creating folds. But ideally, examples need to be shuffled before | |
# creating folds to get rid of recording/data collecting bias |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```{r setup, include=FALSE} | |
rm(list=ls()) | |
knitr::opts_chunk$set(echo = TRUE) | |
library(caret) | |
library(ggplot2) | |
``` | |
# Cross validation Example: The wrong way and the right way |