def toy_linear_1d_classification(seed=default_seed):
def sample_class(f):<EOL><INDENT>p = <NUM_LIT:1.> / (<NUM_LIT:1.> + np.exp(-f))<EOL>c = np.random.binomial(<NUM_LIT:1>, p)<EOL>c = np.where(c, <NUM_LIT:1>, -<NUM_LIT:1>)<EOL>return c<EOL><DEDENT>np.random.seed(seed=seed)<EOL>x1 = np.random.normal(-<NUM_LIT:3>, <NUM_LIT:5>, <NUM_LIT:20>)<EOL>x2 = np.random.normal(<NUM_LIT:3>, <NUM_LIT:5>, <NUM_LIT:20>)<EOL>X = (np.r_[x1, x2])[:, None]<EOL>return {'<STR_LIT:X>': X, '<STR_LIT:Y>':  sample_class(<NUM_LIT>*X), '<STR_LIT:F>': <NUM_LIT>*X, '<STR_LIT>' : ['<STR_LIT:X>'], '<STR_LIT>': [discrete({'<STR_LIT>': <NUM_LIT:1>, '<STR_LIT>': -<NUM_LIT:1>})],'<STR_LIT>' : seed}<EOL>
Simple classification data in one dimension for illustrating models.