Rossmann questions


(Tony Travers) #21

Very interesting… thanks!!!


(gram) #22

I was able to extrapolate your example in the notebook to my problem. It trains now. Great.

I wish there was someplace to work this out on my own but I have new issues I couldn’t find tell of on the internet or by digging into the code.
Question ONE: ‘m.fit’ has this ‘metrics’ option for a loss function (like RMSLE) but it doesn’t like two columns.
It says ‘TypeError: only 1-element tensors can be converted to Python scalars’.

Question TWO: After training for a while I try to get the model’s predictions for the two columns but I get an error.
‘pred_test=m.predict(True)’ returns…
‘RuntimeError: running_mean should contain 261 elements not 262’

and I can tell this has something to do with my continuous variables since I have 261 continuous variables.

I tried setting the ‘n_cont’ in ‘md.get_learner’ up 1 and down 1 but I get an error like this.
‘RuntimeError: running_mean should contain 262 elements not 261’