|
1 | 1 | using XAIBase
|
2 | 2 |
|
| 3 | +input = 42 |
3 | 4 | val = output = [1 6; 2 5; 3 4]
|
4 | 5 | text = [["Test", "Text", "Heatmap"], ["another", "dummy", "input"]]
|
5 | 6 | output_selection = [CartesianIndex(1, 2), CartesianIndex(3, 4)] # irrelevant
|
6 |
| -expl = Explanation(val, output, output_selection, :Gradient, :sensitivity) |
| 7 | +expl = Explanation(val, input, output, output_selection, :Gradient, :sensitivity) |
7 | 8 | h = heatmap(expl, text)
|
8 | 9 | @test_reference "references/Gradient1.txt" repr("text/plain", h[1])
|
9 | 10 | @test_reference "references/Gradient2.txt" repr("text/plain", h[2])
|
10 | 11 |
|
11 | 12 | expl = Explanation(
|
12 |
| - val[:, 1:1], output[:, 1:1], output_selection[1], :Gradient, :sensitivity |
| 13 | + val[:, 1:1], input, output[:, 1:1], output_selection[1], :Gradient, :sensitivity |
13 | 14 | )
|
14 | 15 | h = heatmap(expl, text[1])
|
15 | 16 | @test_reference "references/Gradient1.txt" repr("text/plain", only(h))
|
16 | 17 |
|
17 |
| -expl = Explanation(val, output, output_selection, :LRP, :attribution) |
| 18 | +expl = Explanation(val, input, output, output_selection, :LRP, :attribution) |
18 | 19 | h = heatmap(expl, text)
|
19 | 20 | @test_reference "references/LRP1.txt" repr("text/plain", h[1])
|
20 | 21 | @test_reference "references/LRP2.txt" repr("text/plain", h[2])
|
|
0 commit comments