Open artiom-matvei opened 2 weeks ago
This is not possible because all our contrast building functions work on data frames, not on arrays. For example, imagine you have a numeric predictor and a string predictor. In a data frame, that is two columns. In a numpy array, we must one hot encode the string variable, so the array has many more columns.
This is why in the scikit learn proposal, there must be a pipeline object to convert a single newdata
into two separate X
and y
: https://github.com/vincentarelbundock/pymarginaleffects/issues/35
I think it would be useful to support specifying a model without
statsmodels.formulas.api
Pandas example
Currently it throws the error below, probably meaning that
get_modeldata()
could be generalized:Polars example
Changing to
polars
does not fix it, it seems likeget_modeldata()
could be improved. See example below and error thrown:Error thrown: