formulaic
formulaic copied to clipboard
A high-performance implementation of Wilkinson formulas for Python.
hi, thanks for the library! I was wondering how best to handle a particular use-case, where a single column can "expand" into multiple categorical factors. The specific context is when...
What's the preferred way to model structural zeros in a `Formula`? Assume the following toy example: I have a $3\times 2$ contingency table that looks like this | | e...
**Context:** My team uses `patsy` heavily. One aspect of `patsy` that makes it great for our use cases is the fact that `patsy` isn't strict about its input types. For...
[Polars](https://pola-rs.github.io/polars/py-polars/html/index.html) is a (relatively) new dataframe library that is gaining more popularity and blows pandas away in performance using arrow memory in the backend.
Currently they get formatted as `C({parameter})[T.{value}]` or `{parameter}[T.{value}]` if its already a string. E.g., ```py BinGrp = [0, 0, 0, 1, 1, 1] becomes C(BinGrp)[T.0] C(BinGrp)[T.1] 0 1 0 1...
First of all, thanks for the amazing package! I am working on extending a GLM package ([glum](https://github.com/Quantco/glum)) and the matrix library it uses as a backend ([tabmat](https://github.com/Quantco/glum)) with a formula...
Just a heads-up that current model matrix instantiation is likely incompatible with the pandas development version (i.e. future pandas 3.0.0). To check this, you need to first create an environment...
Update to avoid spurious error when using tuple[str,...] as Sequence[str]
Apologies if this already exists, but I could not find an equivalent of `patsy`'s `incr_dbuilder` ([more info](https://github.com/pydata/patsy/issues/93#issuecomment-255648436)). This would be useful for several reasons, one of them being for parallelizing...
Thanks for the very useful library! I'm having some issues with retaining the order of the terms as they are in the formula. Using the example from the README, but...