%matplotlib inline
%reload_ext autoreload
%autoreload 2
s,b = np.random.normal(1,0.5,1000),np.random.normal(0,0.5,1000)
s,b = s[(s<1)&(s>0)][:,None],b[(b<1)&(b>0)][:,None]
s,b = np.hstack((s,np.ones_like(s))),np.hstack((b,np.zeros_like(b)))
d = np.vstack((s,b))
df = pd.DataFrame({'pred':d[:,0],'gen_target':d[:,1]})
df.head()
plot_preds(df)