mljar / mljar-api-python

A simple python wrapper over MLJAR API.
https://docs.mljar.com/
Apache License 2.0
42 stars 10 forks source link

`fit` on discrete features and binary target yields error #10

Open shadiakiki1986 opened 6 years ago

shadiakiki1986 commented 6 years ago

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.

A related point may be that this is a larger dataset than I used to upload. Previous datasets were 1 million rows and 100 columns, continuous, and around 500 MB. This one is 1 million rows and 300 columns, discrete, and around 500 MB also.

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

shadiakiki1986 commented 6 years ago

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.