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:
|
if self.cat_vars is None: |
|
raise TypeError('No categorical variables specified in the "cat_vars" argument.') |
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:
|
If categorical variables are present, then transform those to numerical values. |
|
This step is not necessary in the absence of categorical variables. |
The following implementation for the
fit-method's parameter validation raises an exception when there is nocat_varsparameter given in the object's constructor:alibi-detect/alibi_detect/od/mahalanobis.py
Lines 125 to 126 in ecb3bcc
However, the documentation says (emphasize mine):
Even in the docstring of the function itself it states:
alibi-detect/alibi_detect/od/mahalanobis.py
Lines 91 to 92 in ecb3bcc