Code Monkey home page Code Monkey logo

Comments (4)

JoaoPBSousa avatar JoaoPBSousa commented on May 23, 2024

Hi @bryancoh ,

Regarding 1, in TimeSHAP, the assumption is that the sequence follows an ascending order based on time. This means that index 0 of a sequence represents the oldest event, while the last index represents the most recent event. For example: [event1, event2, event3, event4, event5], with event5 being the most recent event.

Regarding 2, TimeSHAP does not require any padding. Each sequence is explained individually, and all perturbations have the same sequence length. This ensures that all batches sent to the model have the same sequence length, eliminating the need for pruning.

I hope this answer is helpful. If you have any further questions feel free to ask.

from timeshap.

bryancoh avatar bryancoh commented on May 23, 2024

Hi,
Thank you for your answer,
Since in my case the sequence follows a descending order based on time, in order to be able to apply TimeSHAP, should I reverse the report I get from local_event function or should I reverse before applying TimeSHAP.
In case I need to reserve before apply TimeSHAP, it means that I need to change the LSTM model I am using as well.
Thanks.

from timeshap.

JoaoPBSousa avatar JoaoPBSousa commented on May 23, 2024

Hi @bryancoh ,

Ideally, both TimeSHAP and the model should operate using the same time ordering. However, if this is not possible, you can work around it by modifying the model wrapper. This involves passing the sequence to TimeSHAP in the required order, where the first event of the sequence represents the oldest event. TimeSHAP then sends the sequence to the model wrapper, which flips the time order before passing it to the model. The model scores the sequence, and the wrapper flips the time order of the scores before returning them to TimeSHAP.

Please note that this approach can be considered a workaround, and it introduces multiple potential points of failure in your code. If any part of this wrapper contains a bug, the explanations provided by TimeSHAP will be incorrect.

I hope this answer is helpful. If you have any further questions feel free to ask.

from timeshap.

JoaoPBSousa avatar JoaoPBSousa commented on May 23, 2024

Closed this issue due to inactivity. If you have any further questions feel free to re-open the issue or create a new one.

from timeshap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.