def toy_heaviside(seed=default_seed, max_iters=<NUM_LIT:100>, optimize=True, plot=True):
try:import pods<EOL>except ImportError:print('<STR_LIT>')<EOL>data = pods.datasets.toy_linear_1d_classification(seed=seed)<EOL>Y = data['<STR_LIT:Y>'][:, <NUM_LIT:0>:<NUM_LIT:1>]<EOL>Y[Y.flatten() == -<NUM_LIT:1>] = <NUM_LIT:0><EOL>kernel = GPy.kern.RBF(<NUM_LIT:1>)<EOL>likelihood = GPy.likelihoods.Bernoulli(gp_link=GPy.likelihoods.link_functions.Heaviside())<EOL>ep = GPy.inference.latent_function_inference.expectation_propagation.EP()<EOL>m = GPy.core.GP(X=data['<STR_LIT:X>'], Y=Y, kernel=kernel, likelihood=likelihood, inference_method=ep, name='<STR_LIT>')<EOL>if optimize:<EOL><INDENT>for _ in range(<NUM_LIT:5>):<EOL><INDENT>m.optimize(max_iters=int(max_iters/<NUM_LIT:5>))<EOL><DEDENT>print(m)<EOL><DEDENT>if plot:<EOL><INDENT>from matplotlib import pyplot as plt<EOL>fig, axes = plt.subplots(<NUM_LIT:2>, <NUM_LIT:1>)<EOL>m.plot_f(ax=axes[<NUM_LIT:0>])<EOL>m.plot(ax=axes[<NUM_LIT:1>])<EOL><DEDENT>print(m)<EOL>return m<EOL>
Simple 1D classification example using a heavy side gp transformation

:param seed: seed value for data generation (default is 4).
:type seed: int