-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Begin merging Lahman and FanGraphs #4 * Fix discrepancy in OBP calculation #4 The issue was that when I was loading Lahman, saving it, and reloading the same dataset it gave NA for HBP. This meant my calculated OBP was slightly off from what was provided. The solution was to use the Lahman::Bating instead of read_csv(lahman_data.csv) * Create training and test sets #4 * Save player sample mean RMSE #4 * Include OLS model of 5 year lagged OBP #4 * Look at variables selected for each lambda #4 * Create quartiles time series plot #4 * Add PA filtering condition for plots #4 * Set PA minimums for inclusion in training set #4 * Set training set 1975-2017 validation set 2018-2020 #4 * Use LASSO for finding most important variables #4 * Include cur_BB in training #4 * Run spline model #4 * Get RMSE on test set #4 * Calculate NA statistics for provided dataset #4 * Save OLS residual plot #4 * Update NA comment #4 * Remove current OBP from LASSO #4 * Improve spline elbow plot #4 * Comment reference URLs #4 * Make ridge plot for 1970-1999 #4 * Add links to packages in README #4 * Alphabetize packages #4 * Add pacman to README packages #4 * Include code file in README #4 * Adjust filtering condition from OBP to PA for lag plots and ridge plots #4 * Adjust x axis for OBP ridge to facilitate comparision #4
- Loading branch information
Showing
23 changed files
with
639 additions
and
61 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,24 @@ | ||
# OBP | ||
# OBP | ||
|
||
## Goal: Predict OBP with the smallest RMSE possible for 2021 season | ||
|
||
To run: In `code/`, run the scripts 01_* through 09_* in order. If you do not have the `pacman` package you will need to install it, and then `pacman` will handle installing any additional packages you do not have installed | ||
|
||
Additional packages used: | ||
* [broom](https://cran.r-project.org/web/packages/broom/vignettes/broom.html) | ||
* [DataExplorer](https://cran.r-project.org/web/packages/DataExplorer/vignettes/dataexplorer-intro.html) | ||
* [ggridges](https://cran.r-project.org/package=ggridges/vignettes/introduction.html) | ||
* [ggthemes](https://yutannihilation.github.io/allYourFigureAreBelongToUs/ggthemes/) | ||
* [glmnetUtils](https://cran.r-project.org/web/packages/glmnetUtils/vignettes/intro.html) | ||
* [here](https://cran.r-project.org/web/packages/here/vignettes/here.html) | ||
* [Lahman](https://cran.r-project.org/web/packages/Lahman/Lahman.pdf) | ||
* [pacman](https://cran.r-project.org/web/packages/pacman/readme/README.html) | ||
* [skimr](https://cran.r-project.org/web/packages/skimr/vignettes/skimr.html) | ||
* [tictoc](https://cran.r-project.org/package=tictoc) | ||
* [tidylog](https://cran.r-project.org/web/packages/tidylog/readme/README.html) | ||
* [tidymodels](https://www.tidymodels.org/) | ||
* [tidyverse](https://www.tidyverse.org/) | ||
* [tsibble](https://tsibble.tidyverts.org/) | ||
|
||
### Session Information: | ||
* R version 4.0.3 |
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
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
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
Oops, something went wrong.