New answers tagged

0

The problem was I didn't one-hot encode my labels, so my model did not train correctly. I.E I've given my model the label [4] instead of [0,0,0,0,1,0,0] (because there are 7 classes and the label is the fifth) I found out when I switched from using a generator to numpy array, then tensorflow prompt me with an error. I don't understand why didn't tensorflow ...


0

One possibility is that DNNRegressor is a TensorFlow Estimator. TensorFlow Estimators have been deprecated because they "can behave unexpectedly". It might be better to explicitly define a model.


0

One option is to create a custom score function that calculates the loss and groups by day. Here is a rough start: import numpy as np from sklearn.metrics import make_scorer from sklearn.model_selection import GridSearchCV def custom_loss_function(model, X, y): y_pred = clf.predict(X) y_true = y difference = y_pred-y_true ...


0

Apparently the reason I was getting worse performance was because I was using cross validation during HP tuning but not when I built the base model. Hence the issue. Another mistake was not scaling my data! Typical noob mistakes!


Top 50 recent answers are included