JHoelli / TSEvo

"TSEvo: Counterfactuals for Time Series Classification" accepted at ICMLA '22.
12 stars 0 forks source link

Changing label and max iteration limit NUN_CF #6

Open LbzSteven opened 6 months ago

LbzSteven commented 6 months ago

Hi, Thank you for the public code and for implementing the Native Guide in multiclass classification. I would like to report an error when switching the labels in NUN_CF: In NUN_CF.py if target == label: target = np.argsort(out)[0][-2:-1][1] This is problematic since essentially np.argsort(out)[0][-2:-1] will be an array with one number.

Also is there any reason why limit the maximum iteration in NUN_CF to 500 steps?

JHoelli commented 6 months ago

Hi @LbzSteven,

thank you for your interest.

In general, if you want to use the Native Guide implementation, I would advise you to use the one provided here. It is based on the one in here, however a bit more robust, as it is improved iteratively. (Same goes for all the approaches implemented in here. I maintain the algorithms in TSInterpret.

Regarding your questions:

Hope that helps.