aleDL
(Alessandro)
#1
Hi, I’ve successfully adapted the Rossman example to my own dataset with classification problem.

I’m having difficulties in figuring out how to use the trained model to:

- view predictions with original input dataset
- use prediction from model for just one example (not the whole dataset) so that I can create a web service with the predictions
- where can I view the model weights ?
- same as above, how can I inspect the embedding weights in a T-SNE visualization?

michaelj
(Michael Joyce)
#2
Hi Allesandro,

After fitting a model “m”, you can save the model using m.save(“my_model.pkl”). You can re-load it using m.load(“my_model.pkl”).

You can get predictions from the validation data using

pred_val,y_val=m.predict_with_targs().

You can get predictions from the test dataset using

pred_test=m.predict(True); pred_test = np.exp(pred_test)

Did you figure out how to get the model weights, especially the embedding weights? I would also like to do that.

1 Like

aleDL
(Alessandro)
#3
Sorry for my long time to reply! But a thanks is in order here!