timeseriesAI / tsai

Time series Timeseries Deep Learning Machine Learning Python Pytorch fastai | State-of-the-art Deep Learning library for Time Series and Sequences in Pytorch / fastai
https://timeseriesai.github.io/tsai/
Apache License 2.0
4.92k stars 622 forks source link

Issue when using MixedDataLoaders and trying to get confusion matrix and feature importance #792

Closed jorgpg5 closed 10 months ago

jorgpg5 commented 1 year ago

Thank you so much for developing this tool! It is great. So I have a mixed model, and I would like to get the confusion matrix and the feature importance. Nonetheless, I'm having these errors when running the code for the confusion matrix. If you could guide me on how to fix this, I would be super happy to fix it and upload the example for future reference. My guess is that I need to copy how the DataLoader works, but I got a bit lost (Sorry, I'm still learning how this works).

I tried hardcoding the value (something very naive), and it didn't work. image

I also get this error when running the code for feat importance, which is more convoluted than the last one. image

Do you have any suggestions or guidance to fix it from my end? I'll be thrilled to update the code, upload another example notebook, or update the one that already has it.

Cheers.

oguiza commented 1 year ago

@jorgpg5 , That is a limitation of using MixedDataLoaders. I'm not sure what's your use case, but you may be interested in some new (still experimental) functionality we have added to handle different types of data. You can find more information here: https://timeseriesai.github.io/tsai/models.multimodal.html

jorgpg5 commented 1 year ago

Thank you for your answer, Ignacio. I'm sorry, I have one more question. Would it be possible to get the confusion matrix and feature importance using the new functionality (multimodal approach)?

oguiza commented 1 year ago

Hi @jorgpg5, I haven't tested it yet, but I believe it'd be possible. If you test it, it'd be great if you let us know if it works or not.

jorgpg5 commented 1 year ago

Will do! I'll come back with the test results in a few days. Thank you!

oguiza commented 10 months ago

Closed due to lack of response.