Save results of show_results into a variable - tabular

Hi friends!

I trained a tabular model and happy with the results and would love to store results of show_results into a variable. Is there a way to do that?

I tried to do results_df = learner.show_results() but that does not work :confused: I poked around source code a bit and it looks like show_results does not explicitly return a df so I was wondering if there is a workaround :thinking:

Show results basically returns an image of sorts (if we trace it back to show_xyzs). A temporary could be to copy everything up til the last line in the show_results function to get your x, y, and zā€™s and then use those :slight_smile:

That makes sense! Thank you! :slight_smile:

I was poking around a bit more this morning and found out that model.get_preds(ds_type=DatasetType.Train)
probably does all I need which is just a list of actuals/predictions and I think Iā€™d be able to get away with that :grimacing:

2 Likes