mljar-api-python
mljar-api-python copied to clipboard
`fit` on discrete features and binary target yields error
Here is what I'm doing
>>> model.fit(train_features, train_target.squeeze())
Ups, Something bad happend! There is no attributes usage defined for your dataset
When I look in mljar.com, I see that the attribute usage is not accepted.
Edit 1: Looking in mljar.com, I also notice that the target is categorical with unique values True, False, "target" (string being "target"). My target in python was a numpy pandas array with just True/False. Maybe this was the problem with automatic acceptance of attribute usage.
This columns is also marked with "use it" and not as target. Accepting without changing it to target says something along the lines of "error, should have target". Changing it to target yields error like "binary classification target should have 2 values only."
Edit 2: target was pandas array and not numpy array .. fixed inline
Just repeated the fit call but instead of having numeric columns with mljar automatically renaming them to attribute_..., I renamed them myself. This lead to the error above not appearing.