

def mrd_simulation_missing_data(optimize=True, verbose=True, plot=True, plot_sim=True, **kw):
    from GPy import kern
    from GPy.models import MRD
    (D1, D2, D3, N, num_inducing, Q) = (60, 20, 36, 60, 6, 5)
    (_, _, Ylist) = _simulate_matern(D1, D2, D3, N, num_inducing, plot_sim)
    k = (kern.Linear(Q, ARD=True) + kern.White(Q, variance=0.0001))
    inanlist = []
    for Y in Ylist:
        inan = _np.random.binomial(1, 0.6, size=Y.shape).astype(bool)
        inanlist.append(inan)
        Y[inan] = _np.nan
    m = MRD(Y, input_dim=Q, num_inducing=num_inducing, kernel=k, inference_method=None, initx='random', initz='permute', **kw)
    if optimize:
        print('Optimizing Model:')
        m.optimize('bfgs', messages=verbose, max_iters=8000.0, gtol=0.1)
    if plot:
        m.X.plot('MRD Latent Space 1D')
        m.plot_scales('MRD Scales')
    return m

dataset/ETHPy150Open SheffieldML/GPy/GPy/examples/dimensionality_reduction.py mrd_simulation_missing_data/VarMisuse@173/218 `Ylist`->`Y`