def sparse_toy_linear_1d_classification(num_inducing=<NUM_LIT:10>, seed=default_seed, 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>m = GPy.models.SparseGPClassification(data['<STR_LIT:X>'], Y, num_inducing=num_inducing)<EOL>m['<STR_LIT>'] = <NUM_LIT><EOL>if optimize:<EOL><INDENT>m.optimize()<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>
Sparse 1D classification example

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