Comments (10)
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.
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.
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.
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.
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.
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.
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.
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.
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.
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)
- [BUG] `CNNClassifier` and `CNNRegressor` do not accept `filter_sizes` argument listed in docstring HOT 2
- [DOC] Misleading docstring parameters for convert utility function of dask_to_pd and vice versa
- [ENH] Logging intermediate results in forecasting benchmarking HOT 1
- [MNT] keras/transformers installation error on python 3.8-3.11 in CI HOT 2
- [ENH] EnbPI and SPCI algorithms
- [ENH][MNT] interface estimators from `neuralforecast` into `sktime`
- [BUG] `LabelEncoder` does not fit in a nested pipeline HOT 24
- [BUG] broken MACNNClassifier and MACNNRegressor
- [BUG] MCDCNNRegressor does not perform fitting/training?
- [BUG] CNTCRegressor raises an error on calling .fit()
- [BUG] In clustering averaging_method = 'dba' crashed HOT 3
- [ENH] categorical feature support: input checking - column type encoding by the `__dataframe__` protocol HOT 3
- [BUG] `TimeSeriesForestRegressor` failure - Parameter `self.criterion` does not exist in `TimeSeriesForestRegressor` HOT 1
- [BUG] pepy.tech downloads tracker on readme landing page is broken
- [BUG] Differencer is producing `SettingWithCopyWarning` HOT 3
- [ENH] wishlist: outlier detection, segmentation, change point detection (annotation module) HOT 3
- [MNT] Bump scikit-base to 0.8.0 HOT 1
- [BUG] failure of `test_differencer_cutoff` HOT 4
- [BUG] `ForecastingHorizon` `M` and `Y` `freq` incompatibility with `pandas >=2.2.0` HOT 10
- [BUG] `PyKanForecaster` `TypeError: 'NoneType' object is not subscriptable` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sktime.