Is there a simple way to generate binary classification data in python? I'd like to specify $X$ input parameter, $[x_1,...,x_n]$, and generate a dataset such that the (overall) McFadden's pseudo $R^2$ is equal to some parameter. I am struggling to find a package/library that meets this task.

Edit: by input parameter, I mean a single number. For example, 2. I want to be able to generate a dataset with 2 independent variables, X, and 1 dependent variable y, which is appropriate for logistic regression (provided a reasonably high pseudo R)

  • $\begingroup$ Could you explain the meaning of these input "parameters"? What do they represent? What is your model? $\endgroup$ – whuber Sep 16 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.