You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the 'Anchor on tabular data.ipynb' example, and also in the SP Anchors example from the anchor-experiments repository, I am not sure if I am misunderstanding this, but I think you may be computing the coverage of an Anchor in a wrong way. You seem to only check for equality in feature values (of course, only for the features included in the Anchor) between the instance that generated the Anchor and the other instances from the dataset.
The specific files and lines I am referring to are the following:
'Anchor on tabular data.ipynb':
Line fit_anchor = np.where(np.all(dataset.test[:, exp.features()] == dataset.test[idx][exp.features()], axis=1))[0]
'utils.py' from the 'anchor-experiments' repository:
Line 347, 347:
Shouldn't you compute the coverage based on the operator used in the Anchor, similar to what you do in file 'anchor_tabular.py' from the on Lines 254-261?
for i in mapping:
f, op, v = mapping[i]
if op == 'eq':
data[:, i] = (d_raw_data[:, f] == data_row[f]).astype(int)
if op == 'leq':
data[:, i] = (d_raw_data[:, f] <= v).astype(int)
if op == 'geq':
data[:, i] = (d_raw_data[:, f] > v).astype(int)
Thank you!
-Alexandru
The text was updated successfully, but these errors were encountered:
Hello Marco,
In the 'Anchor on tabular data.ipynb' example, and also in the SP Anchors example from the anchor-experiments repository, I am not sure if I am misunderstanding this, but I think you may be computing the coverage of an Anchor in a wrong way. You seem to only check for equality in feature values (of course, only for the features included in the Anchor) between the instance that generated the Anchor and the other instances from the dataset.
The specific files and lines I am referring to are the following:
Line
fit_anchor = np.where(np.all(dataset.test[:, exp.features()] == dataset.test[idx][exp.features()], axis=1))[0]
Line 347, 347:
Shouldn't you compute the coverage based on the operator used in the Anchor, similar to what you do in file 'anchor_tabular.py' from the on Lines 254-261?
Thank you!
-Alexandru
The text was updated successfully, but these errors were encountered: