bjherger / keras-pandas

keras-pandas allows users to rapidly build and iterate on deep learning models.
MIT License
57 stars 14 forks source link

Bug in Categorical.py #110

Open Sammi-Smith opened 4 years ago

Sammi-Smith commented 4 years ago

In Categorical.output_inverse_transform(), I think there is a bug in line 104. It doesn't seem to be correctly outputting the original data categories. For me, it was just outputting all zeros. Upon closer inspection of that function and comparing it to the similar functions implemented for the other data types, it doesn't appear to be utilizing the response_transform_pipeline that is passed in as an argument to the function.

Currently, line 104 reads: natural_scaled_vars = numpy.argmax(y_pred, axis=1)

I believe it should read: natural_scaled_vars = response_variable_transformer.inverse_transform(y_pred)