How to get a prediction out of my model ? (super beginner here!)

Hi there,

Please excuse my very noob level question but I am new to this.
I am interested to get a model with Structured data working.

I managed to get a working model (I think) using some data from the internet.
Please see screenshot from my notebook below.

Now, I don’t know how I could query the model for a new unseen data point…
I tried to play with the m.predict function but could not get it to work.

Would appreciate if someone could help me figure this out…
Thanks a lot.

Marc




@Nennig try this.

inp = [YOUR INPUT]
m.model.eval()
out = m.model(VV_(torch.stack([inp]))
print(out)

Also, typically you wouldn’t do m = md.get_learner(...), but instead something like learn = md.get_learner(...) or learner = md.get_learner(...).

Then, m = learn.model.

Hi alecrubin,

Thanks so much for helping me.
I tried the following but without success.
Any other ideas on how to make it work?

Marc

Take a look at this topic Predicting on a single row with Rossmann Data

Thank you Nick!

This worked for me! Cool, I have a “Hello World” example for deep learning with structured data.
I have no idea of what all the parameters do but now I motivated to keep watching the videos :wink:

Thanks a lot to both of you guys!