Rossmann questions

Very interesting… thanks!!!

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: ‘’ 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’

Hi there! I’m trying to figure out how to implement metrics with three arguments like NWRMSLE (see - the arguments include Y_predicted, Y, and Weights.
I took a look at the library’s source code but didn’t get any idea. Could someone provide a way or comment?

Figured out how to get the model to give me its predictions (an issue in my last question).

I removed the second column from ‘df’ as I also did in ‘df_test’ before.
I was able to submit to the competition and my result was within 0.014 of number one - though still in 500 something place. If I could see my error before submitting maybe I could do some fine tuning.

Still getting ‘TypeError: only 1-element tensors can be converted to Python scalars’ when trying to get RMSLE function displayed while training.
I suspect it requires a new loss function and inside knowledge of where access what the ‘metrics=’ option is using when there’s just one column.

this might be helpful

1 Like

Yeah, that’s a valid point. THe only way to have all these data such as weather conditions of any day in the future is to wait for that day to arrive. Needless to say, if sales can only be predicted on that day, it’s too late to be useful to anyone.

I have some questions about proc_df().

  1. Issues with scaling/normalizing data. When training the model, the columns of the training data each must have parameters that define that column’s standardization. How do you use the parameters from the training data on the validation and test sets and how do you use them when making predictions?

  2. It appears that the y-values are not standardized. My y-values are profits and they can be both positive and negative. Executing nl = np.log(y) fails. nl is required by ColumnarModelData.from_data_frame(). How do I get around this problem?

for your point 2, i just bumped into the same problem:

You have to remove the log.