alibi-detect
alibi-detect copied to clipboard
`Mahalanobis.fit` unexpectedly raises error when no categorical variables are present
The following implementation for the fit-method's parameter validation raises an exception when there is no cat_vars parameter given in the object's constructor:
https://github.com/SeldonIO/alibi-detect/blob/ecb3bcc59d429bc978bac32380bcc47aa21aa239/alibi_detect/od/mahalanobis.py#L125-L126
However, the documentation says (emphasize mine):
cat_vars: dictionary with as keys the categorical columns and as values the number of categories per categorical variable. Only needed if categorical variables are present.
Even in the docstring of the function itself it states: https://github.com/SeldonIO/alibi-detect/blob/ecb3bcc59d429bc978bac32380bcc47aa21aa239/alibi_detect/od/mahalanobis.py#L91-L92