fzi-forschungszentrum-informatik / TSInterpret

An Open-Source Library for the interpretability of time series classifiers
BSD 3-Clause "New" or "Revised" License
115 stars 8 forks source link

[Q] some fault of svs #27

Closed asas21212aa closed 12 months ago

asas21212aa commented 1 year ago

sorry, i found some fault when using the method='svs'

JHoelli commented 1 year ago

Hi @asas21212aa,

would you mind sharing some more information on the occurring error so that we can try to locate the issue? (e.g., Error Message ideally with Line Number, Version of TsInterpret, Function Calls, Parameters used or in the best Case a Minimal Sample ).

This is relevant, e.g. SVS is currently not implemented for TensorFlow Models and the Method is supposed to be called in the current Version of TSInterpret (0.1.3) with Upper Case: method='SVS'.

asas21212aa commented 1 year ago

2023-04-13 14:32:12"Jacqueline Höllig" @.***>写道:

hello, thank you for your email; when i use the example in the notebooks whiche names 'TSR_torch.ipynb' ,and i find that there will be a runtimeerror:the size of tensor a(100) must match the tensor b(6), maybe the fault is in the api to captum.attribution.shapley value sampling, or please tell some more detail to change, hope for your email in soon

Hi,

would you mind sharing some more information one the occurring error so that we can try to locate the issue? (e.g., Error Message, Function Calls, Parameters used or in the best Case a Minimal Sample )

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

Message ID: @.***>

JHoelli commented 1 year ago

Hi @asas21212aa ,

I just rechecked the notebook locally and for me it seems to work. Therefore I would need a bit more information: (The easiest would be if you share the exact code you are using.)

asas21212aa commented 1 year ago

here is my code, you can try it, my edition is 0.0.12

2023-04-13 16:19:58"Jacqueline Höllig" @.***>写道:

Hi @asas21212aa ,

I just rechecked the notebook locally and for me it seems to work. Therefore I would need a bit more information: (The easiest would be if you share the exact code you are using.)

What is your version of TSInterpret? (pip show TSInterpret) What are the input/Output shapes? int_mod=TSR(model, train_x.shape[-1],train_x.shape[-2], method='SVS', \ mode='feat') When using mode='feat' with 'Basic_Motion' train_x.shape[-1] is supposed to be 100 and train_x.shape[-2] is supposed to be 6. For mode='time' it is the other way around. item = np.array([test_x[0,:,:]]) label = int(np.argmax(test_y[0])) exp=int_mod.explain(item,labels=label,TSR = False) item has shape (1,6,100) for feat or (1,100,6) if you chose time

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

JHoelli commented 1 year ago

Hi @asas21212aa,

Would you mind updating the TSInterpret version to 0.1.3? pip install --upgrade pip pip install --upgrade TSInterpret

Your version is quite old (its from August 2022). Multiple updated version are in-between and we did some major changes in the implementation. Therefore the current notebook implementations will not work with the older package versions.

If you still have issues, let me know.

asas21212aa commented 1 year ago

sorry i always find some trouble , and when i use pip install TSinterpret, there is no version 0.1.3 in the selection edition

-----原始邮件----- 发件人:"Jacqueline Höllig" @.> 发送时间:2023-04-13 19:20:43 (星期四) 收件人: fzi-forschungszentrum-informatik/TSInterpret @.> 抄送: asas21212aa @.>, Mention @.> 主题: Re: [fzi-forschungszentrum-informatik/TSInterpret] [Q] some fault of svs (Issue #27)

Hi @asas21212aa,

Would you mind updating the TSInterpret version to 0.1.3?

pip install --upgrade TSInterpret

Your version is quite old (its from August 2022). Multiple updated version are in-between and we did some major changes in the implementation. Therefore the current notebook implementations will not work with the older package versions.

If you still have issues, let me know.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

JHoelli commented 1 year ago

Hi @asas21212aa ,

I am sorry but I do not understand what you mean by "Selection Edition".

The version is there https://pypi.org/project/TSInterpret/. Please make sure you use a python version >= 3.9.

Maybe you need to update pip before installing TsInterpret: pip install --upgrade pip or python -m pip install --upgrade pip. As I am not sure what you mean by Selection Edition I am unsure how to do that there.

JHoelli commented 12 months ago

Closed due to inactivity