getModels: Retrieves prior estimated models.

Description Usage Arguments Details Value Examples

Description

Retrieve various models trained on GameDayPlays data.

Usage

1
2
3
4
getModels(data, ...)

## S3 method for class 'GameDayPlays'
getModels(data, ...)

Arguments

data

a GameDayPlays dataset

...

currently ignored

Details

This function will retrieve various models based on the MLBAM data set and the openWAR framework. Currently this only returns the Run Expectancy Model.

Value

A list of model objects

Examples

1
2
3
4
5
6
data(May)
re.mod = getModels(May, type = 'run-expectancy')

# Generate the Run Expectancy Matrix
states = expand.grid(startCode = 0:7, startOuts = 0:2)
matrix(predict(re.mod[["run-expectancy"]], newdata=states), ncol=3)

beanumber/openWAR documentation built on May 12, 2019, 9:43 a.m.