-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add time series tutorial #177
Conversation
Codecov Report
@@ Coverage Diff @@
## main #177 +/- ##
=======================================
Coverage 92.86% 92.86%
=======================================
Files 54 54
Lines 2649 2649
=======================================
Hits 2460 2460
Misses 189 189 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkrako made some smaller updates to the file. but it throws an error:
--------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/var/folders/w2/h9z278fs179f393h2jbj3y_80000gn/T/ipykernel_50650/2093353479.py in <module>
1 # Return ModelParameterRandomisation scores for Integrated Gradients.
----> 2 scores_intgrad = metric_init(
3 model=net,
4 x_batch=test_features,
5 y_batch=test_labels,
~/anaconda3/envs/quantus/lib/python3.9/site-packages/quantus/metrics/randomisation/model_parameter_randomisation.py in __call__(self, model, x_batch, y_batch, a_batch, s_batch, custom_batch, channel_first, explain_func, explain_func_kwargs, model_predict_kwargs, softmax, device, **kwargs)
146 custom_batch,
147 custom_preprocess_batch,
--> 148 ) = self.general_preprocess(
149 model=model,
150 x_batch=x_batch,
~/anaconda3/envs/quantus/lib/python3.9/site-packages/quantus/metrics/base.py in general_preprocess(self, model, x_batch, y_batch, a_batch, s_batch, custom_batch, channel_first, explain_func, explain_func_kwargs, model_predict_kwargs, softmax, device)
298 # Reshape input batch to channel first order:
299 if not isinstance(channel_first, bool): # None is not a boolean instance.
--> 300 channel_first = utils.infer_channel_first(x_batch)
301 x_batch = utils.make_channel_first(x_batch, channel_first)
302
~/anaconda3/envs/quantus/lib/python3.9/site-packages/quantus/helpers/utils.py in infer_channel_first(x)
178
179 else:
--> 180 raise ValueError(
181 "Only batched 1d and 2d multi-channel input dimensions supported."
182 )
ValueError: Only batched 1d and 2d multi-channel input dimensions supported.
when trying to evaluate. the size of the test_features are (1000, 40)
Fixed the error by removing the test_features = test_features.reshape(1000, 1, 40) |
…feature/time_series_tutorial add time series tutorial
Description
Implemented changes
Minimum acceptance criteria
@annahedstroem unfortunately I currently cannot install the quantus package anymore on my system (python 3.10).
I'm somehow getting dependency issues which cannot be resolved, and even when I ignore this, the numpy versions just don't match? I'm very confused why this happens.