powered by
Compute weighting between two models based on accuracy in predicting a set of observations. Computation is via the Expectation-Maximization algorithm.
fit_weights(mod1, mod2, obs, prop_area, w_ini = 0.5, z_ini = 0.5, eps = 0.01)
array with estimated sea ice probability from model 1. Dimensions are nuumber of training years x lon x lat.
array with estimated sea ice probability from model 2. Dimensions are nuumber of training years x lon x lat.
array with observations of sea ice presence (1) and absence (0). Dimensions are nuumber of training years x lon x lat.
matrix that gives the proportion of area in each grid box. Should sum to 1. Dimensions are lon x lat.
initial value of all w, defaults to 0.5.
initial value of all z, defaults to 0.5.
tolerance for EM algorithm to reach convergence, defaults to 0.01.
value between 0 and 1 giving the weight on the first model
# NOT RUN { weight <- fit_weights(mod1 = clim_9_2005_2007, mod2 = ppe_9_2005_2007, obs = obs_9_2005_2007, prop_area = prop_area) # }
Run the code above in your browser using DataLab