Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
g207004202
explainable-multimodal-classification
Commits
942bec66
Commit
942bec66
authored
May 11, 2021
by
JunqiJiang
Browse files
update lime
parent
99a919d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
mmxai/interpretability/classification/lime/lime_base.py
View file @
942bec66
...
...
@@ -144,7 +144,7 @@ class LimeBase(object):
n_txt_features
,
n_img_features
,
n_det_features
,
feature_selection
=
"
auto
"
,
feature_selection
=
"
none
"
,
model_regressor
=
None
,
):
"""Takes perturbed data, labels and distances, returns explanation.
...
...
mmxai/interpretability/classification/lime/lime_multimodal.py
View file @
942bec66
...
...
@@ -589,7 +589,7 @@ class LimeMultimodalExplainer(object):
delta_txt
=
abs
(
calibrated_labels
[
-
1
][
0
]
-
calibrated_labels
[
0
][
0
])
delta_img
=
abs
(
calibrated_labels
[
-
1
][
0
]
-
calibrated_labels
[
1
][
0
])
ratio_txt_img
=
max
(
min
(
10
,
delta_txt
/
delta_img
),
0.1
)
ratio_txt_img
=
max
(
min
(
10
0
,
delta_txt
/
delta_img
),
0.
0
1
)
except
:
dummy_text
=
""
dummy_image
=
np
.
zeros_like
(
self
.
image
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment