Code Monkey home page Code Monkey logo

Comments (10)

yarnabrina avatar yarnabrina commented on June 19, 2024

Just out of my curiosity, can I ask how are you planning to use Shapley values here?

For example, strategy="direct" will use multiple models, and "actuals" are going to vary for different forecast horizons with strategy="recursive" if I understand correctly (in the sense fh=1 will only use last window_length training observations, fh=2 will use last window_length - 1 training observations and prediction for fh=1 and so on).

So, what shall you pass as "actual" values to shap?

(As said, it's not related to your issue, but out of my curiosity as I am also planning to have some explainability component for my office work.)

from sktime.

hliebert avatar hliebert commented on June 19, 2024

In my current application I care most about a few horizons only (1-3), and later horizons are increasingly less relevant. For now I'm simply planning to just look at the values for the first few horizons separately.

I'm aware of the issues with features varying by horizon in the recursive case, I'm not sure what the best solution is. Maybe offering a method to recreate the input for a given horizon is easier than storing it?

from sktime.

fkiraly avatar fkiraly commented on June 19, 2024

Related, this request by @yarnabrina to access the internal data in two-step exogenous forecast:
#5598

I wonder whether there should be a programmatic way to access internal preprocessed data.

from sktime.

fkiraly avatar fkiraly commented on June 19, 2024

From a design perspective, we could "dump" the formatted data in a _X-like argument, although we should be cautious as this can blow up the pickle size etc.

A "nicer" way would be to also allow the forecaster to act as a transformer, which is now possible with the object_type tag that can have multiple types. This was introduced to allow polymorphism for the graphical pipeline, FYI @benHeid.

There used to be a transform method, so I wonder whether this can simply be reactivated.

from sktime.

fkiraly avatar fkiraly commented on June 19, 2024

On a related note, there is a transformer (not much used afaik) which also addresses the issue, the ReducerTransform, which could be used for shapley values.

from sktime.

hliebert avatar hliebert commented on June 19, 2024

From a design perspective, we could "dump" the formatted data in a _X-like argument, although we should be cautious as this can blow up the pickle size etc.

A "nicer" way would be to also allow the forecaster to act as a transformer, which is now possible with the object_type tag that can have multiple types. This was introduced to allow polymorphism for the graphical pipeline, FYI @benHeid.

There used to be a transform method, so I wonder whether this can simply be reactivated.

I'd be fine with either, although I'm not sure how "dumping" would look like with the recursive reducer.

from sktime.

hliebert avatar hliebert commented on June 19, 2024

On a related note, there is a transformer (not much used afaik) which also addresses the issue, the ReducerTransform, which could be used for shapley values.

Thanks for pointing this out, I'll have a look. Does this mean the API reference on the homepage is incomplete? I've looked through the list of transformers, and this one isn't listed.

from sktime.

fkiraly avatar fkiraly commented on June 19, 2024

Does this mean the API reference on the homepage is incomplete

Yes, sorry.

The issue is, we are not sure how to test "estimator is not present on API reference page".
It should be picked up by the all_estimators utility though, since that is programmatic and crawls the package.

I've added it, and the new direct reducer prototype to the API reference:
#5690

from sktime.

fkiraly avatar fkiraly commented on June 19, 2024

although I'm not sure how "dumping" would look like with the recursive reducer.

I think that is precisely @yarnabrina's question, i.e., what should it even do.

from sktime.

hliebert avatar hliebert commented on June 19, 2024

although I'm not sure how "dumping" would look like with the recursive reducer.

I think that is precisely @yarnabrina's question, i.e., what should it even do.

Maybe just dump _X in a dictionary by horizon? Or provide a method that takes horizon as argument and returns X after fitting.

Thanks for updating the docs!

from sktime.

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.