2
2
3
3
const HEATMAPPING_PRESETS = Dict {Symbol,Tuple{ColorScheme,Symbol,Symbol}} (
4
4
# Analyzer => (colorscheme, reduce, rangescale)
5
- :LRP => (ColorSchemes. bwr , :sum , :centered ), # attribution
6
- :InputTimesGradient => (ColorSchemes. bwr , :sum , :centered ), # attribution
5
+ :LRP => (ColorSchemes. seismic , :sum , :centered ), # attribution
6
+ :InputTimesGradient => (ColorSchemes. seismic , :sum , :centered ), # attribution
7
7
:Gradient => (ColorSchemes. grays, :norm , :extrema ), # gradient
8
8
)
9
9
@@ -20,7 +20,7 @@ Assumes Flux's WHCN convention (width, height, color channels, batch size).
20
20
## Keyword arguments
21
21
- `cs::ColorScheme`: ColorScheme that is applied.
22
22
When calling `heatmap` with an `Explanation` or analyzer, the method default is selected.
23
- When calling `heatmap` with an array, the default is `ColorSchemes.bwr `.
23
+ When calling `heatmap` with an array, the default is `ColorSchemes.seismic `.
24
24
- `reduce::Symbol`: How the color channels are reduced to a single number to apply a colorscheme.
25
25
The following methods can be selected, which are then applied over the color channels
26
26
for each "pixel" in the attribution:
@@ -32,7 +32,7 @@ Assumes Flux's WHCN convention (width, height, color channels, batch size).
32
32
- `rangescale::Symbol`: How the color channel reduced heatmap is normalized before the colorscheme is applied.
33
33
Can be either `:extrema` or `:centered`.
34
34
When calling `heatmap` with an `Explanation` or analyzer, the method default is selected.
35
- When calling `heatmap` with an array, the default for use with the `bwr ` colorscheme is `:centered`.
35
+ When calling `heatmap` with an array, the default for use with the `seismic ` colorscheme is `:centered`.
36
36
- `permute::Bool`: Whether to flip W&H input channels. Default is `true`.
37
37
- `unpack_singleton::Bool`: When heatmapping a batch with a single sample, setting `unpack_singleton=true`
38
38
will return an image instead of an Vector containing a single image.
@@ -41,7 +41,7 @@ Assumes Flux's WHCN convention (width, height, color channels, batch size).
41
41
"""
42
42
function heatmap (
43
43
attr:: AbstractArray{T,N} ;
44
- cs:: ColorScheme = ColorSchemes. bwr ,
44
+ cs:: ColorScheme = ColorSchemes. seismic ,
45
45
reduce:: Symbol = :sum ,
46
46
rangescale:: Symbol = :centered ,
47
47
permute:: Bool = true ,
0 commit comments