glmdisc.Glmdisc.generate_data

static Glmdisc.generate_data(n, d, theta=None, plot=False)

Generates some toy continuous data that gets discretized, and a label is drawn from a logistic regression given the discretized features.

Parameters
  • n (int) – Number of observations to draw.

  • d (int) – Number of features to draw.

  • theta (numpy.array) – Logistic regression coefficient to use (if None, drawn from N(0,2)).

  • plot (bool) – If true, plot the two first x axes with y as color.