beanumber / openWAR

An R package enabling the computation of openWAR using MLBAM data
99 stars 33 forks source link

make shakeWAR faster #42

Open beanumber opened 9 years ago

beanumber commented 9 years ago

Note that a call to shakeWAR with n resamples results in getRAA being called 2n+2 times.

owar <- shakeWAR(MayProcessed, N = 1)
...Tabulating RAA per player...
...Tabulating RAA per player...
...Tabulating RAA per player...
...Tabulating RAA per player...

The 2n is because each call to getWAR calls getRAA twice: once for the replacement-level players and once for all of the players. [Is this necessary?]

Where do the extra 2 calls to getRAA come from?

gjm112 commented 9 years ago

If the replacement data and the current year data are different, I think you will have to call getRAA twice. If the current data is used for both calculation and carbonising of replacement it should only call it once. On Jun 17, 2015 1:52 PM, "Ben Baumer" notifications@github.com wrote:

Note that a call to shakeWAR with n resamples results in getRAA being called 2n+2 times.

owar <- shakeWAR(MayProcessed, N = 1) ...Tabulating RAA per player... ...Tabulating RAA per player... ...Tabulating RAA per player... ...Tabulating RAA per player...

The 2n is because each call to getWAR calls getRAA twice: once for the replacement-level players and once for all of the players. [Is this necessary?]

Where do the extra 2 calls to getRAA come from?

— Reply to this email directly or view it on GitHub https://github.com/beanumber/openWAR/issues/42#issuecomment-112912704.