def coregionalization_toy(optimize=True, plot=True):
<EOL>X1 = np.random.rand(<NUM_LIT:50>, <NUM_LIT:1>) * <NUM_LIT:8><EOL>X2 = np.random.rand(<NUM_LIT:30>, <NUM_LIT:1>) * <NUM_LIT:5><EOL>Y1 = np.sin(X1) + np.random.randn(*X1.shape) * <NUM_LIT><EOL>Y2 = np.sin(X2) + np.random.randn(*X2.shape) * <NUM_LIT> + <NUM_LIT><EOL>m = GPy.models.GPCoregionalizedRegression(X_list=[X1,X2], Y_list=[Y1,Y2])<EOL>if optimize:<EOL><INDENT>m.optimize('<STR_LIT>', max_iters=<NUM_LIT:100>)<EOL><DEDENT>if plot:<EOL><INDENT>slices = GPy.util.multioutput.get_slices([X1,X2])<EOL>m.plot(fixed_inputs=[(<NUM_LIT:1>,<NUM_LIT:0>)],which_data_rows=slices[<NUM_LIT:0>],Y_metadata={'<STR_LIT>':<NUM_LIT:0>})<EOL>m.plot(fixed_inputs=[(<NUM_LIT:1>,<NUM_LIT:1>)],which_data_rows=slices[<NUM_LIT:1>],Y_metadata={'<STR_LIT>':<NUM_LIT:1>},ax=pb.gca())<EOL><DEDENT>return m<EOL>
A simple demonstration of coregionalization on two sinusoidal functions.