equialgo/fairness-in-ml

Convert Pandas dataframes to Numpy arrays for the Keras estimator using .values

ClaudeCoulombe opened this issue · 1 comments

Nice post on a delicate and important subject. I've shared with G+ AI Machine & Deep Learning (moderated) and Deep Learning Community. In order to run it smoothly I've made small corrections.

Just before training the model (nn_classifier), since X_train and y_train are Pandas dataframes we need to convert them to Numpy arrays for the Keras estimator using .values

X_train = X_train.values
y_train = y_train.values

Is-it good to you?

Hi Claude,

thanks for your kind words and the feedback!

I do not know for sure if it is really necessary to convert all dataframes to numpy arrays. However, I updated the notebook to do the conversion anyway.

Cheers,

Stijn