Skip to content
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

adding train_x variable in SETSTCF for feat mode #71

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

kndbvortex
Copy link
Contributor

@kndbvortex kndbvortex commented Nov 20, 2024

Hello,
i'm currently working with xai for tsc using TSInterpret and @aeon-toolkit/aeon . I tried SET with HIVECOTE2 and face this issue :

[91](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/kndb/Dev/Phd-Code/explainability/MTS/~/Dev/Phd-Code/explainability/MTS/venv/lib/python3.10/site-packages/TSInterpret/InterpretabilityModels/counterfactual/SETSCF.py:91)     # self.train_x = np.array(train_x)
     [92](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/kndb/Dev/Phd-Code/explainability/MTS/~/Dev/Phd-Code/explainability/MTS/venv/lib/python3.10/site-packages/TSInterpret/InterpretabilityModels/counterfactual/SETSCF.py:92)     self.ts_len = train_x.shape[2]
---> [94](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/kndb/Dev/Phd-Code/explainability/MTS/~/Dev/Phd-Code/explainability/MTS/venv/lib/python3.10/site-packages/TSInterpret/InterpretabilityModels/counterfactual/SETSCF.py:94) self.train_x_n = from_3d_numpy_to_nested(self.train_x)
     [95](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/kndb/Dev/Phd-Code/explainability/MTS/~/Dev/Phd-Code/explainability/MTS/venv/lib/python3.10/site-packages/TSInterpret/InterpretabilityModels/counterfactual/SETSCF.py:95) if backend == "PYT":
     [96](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/kndb/Dev/Phd-Code/explainability/MTS/~/Dev/Phd-Code/explainability/MTS/venv/lib/python3.10/site-packages/TSInterpret/InterpretabilityModels/counterfactual/SETSCF.py:96)     self.predict = PyTorchModel(model, change).predict

AttributeError: 'SETSCF' object has no attribute 'train_x'

After looking in the source code i figure out that when the mode == 'feat' you didn't add the train_x variable. I just add it in this PR :).

@JHoelli JHoelli merged commit 4a553dd into fzi-forschungszentrum-informatik:main Nov 21, 2024
1 check failed
@JHoelli
Copy link
Contributor

JHoelli commented Nov 21, 2024

Hi,

thanks for your pull request. :)
The sets implementation on PyTorch is still a bit buggy. If you find anything else feel free to let me know or open up another pull request .

@kndbvortex
Copy link
Contributor Author

Hi,
Ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants