-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathREADME.Rmd
47 lines (31 loc) · 2.37 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
output:
md_document:
variant: markdown_github
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
options(width = 110)
```
## Predicting March Madness
Kaggle's [March Madness prediction competition](https://www.kaggle.com/c/mens-machine-learning-competition-2018/) is an accessible introduction to machine learning. If you happen to like college basketball, you'll like that in this competition you can't bust your bracket, since you make a prediction for every game. Plus this year there's a big prize pool, and luck plays a big enough role that you can be a legit contender fairly easily.
In 2016, my simple process using tidyverse functions in R placed in the top 10%. I refined it a bit for 2017 and finished in the top 25%.
I'm sharing my code and process here for others to use as a starting point. My approach is similar to that of the 2014 winners, Gregory Matthews and Michael Lopez. They published [a paper about the role that luck plays in this competition](https://arxiv.org/abs/1412.0248), putting their model in perspective. A takeaway: take my model, tweak it a bit to generate some distance from the field, and you are competitive to win!
## What's here
In the Kaggle competition, you estimate how likely it is that Team A beats Team B, for each of the 2,278 possible matchups in the tournament. **[My guide](march_madness_how_to.md)** documents a set of scripts for each step of:
* Deciding on possible input parameters
* Scraping the input data with the `rvest` package
* Cleaning and joining data sources to get tidy, prediction-ready data
* Training and evaluating machine learning models on the data
* Making and submitting predictions
## Licensing/usage
This code is public, please reuse it. It's under an [MIT license](License.md). Please acknowledge its role in any write-up or discussion of work that relies on it. And if you win a cash prize from Kaggle using this, congratulations! I wouldn't turn down a thank-you gift ;)
## Thanks
Thanks to contributors **@MHenderson** and **@BillPetti**.
## Contact me
Let me know what you think, either on twitter @samfirke or compose a friendly e-mail to: <img src = "http://samfirke.com/wp-content/uploads/2016/07/email_address_whitespace_top.png" alt = "samuel.firke AT gmail" width = "210"/>