Switch to side-by-side view

--- a
+++ b/man/heatmaps_integrated_grad.Rd
@@ -0,0 +1,37 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/visualization.R
+\name{heatmaps_integrated_grad}
+\alias{heatmaps_integrated_grad}
+\title{Heatmap of integrated gradient scores}
+\usage{
+heatmaps_integrated_grad(integrated_grads, input_seq)
+}
+\arguments{
+\item{integrated_grads}{Matrix of integrated gradient scores (output of \code{\link{integrated_gradients}} function).}
+
+\item{input_seq}{Input sequence for model. Should be the same as \code{input_seq} input for corresponding
+\code{\link{integrated_gradients}} call that computed input for \code{integrated_grads} argument.}
+}
+\value{
+A list of heatmaps.
+}
+\description{
+Creates a heatmap from output of \code{\link{integrated_gradients}} function. The first row contains
+the column-wise absolute sums of IG scores and the second row the sums. Rows 3 to 6 contain the IG scores for each
+position and each nucleotide. The last row contains nucleotide information.
+}
+\examples{
+\dontshow{if (reticulate::py_module_available("tensorflow")  && requireNamespace("ComplexHeatmap", quietly = TRUE)) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
+library(reticulate)
+model <- create_model_lstm_cnn(layer_lstm = 8, layer_dense = 3, maxlen = 20, verbose = FALSE)
+random_seq <- sample(0:3, 20, replace = TRUE)
+input_seq <- array(keras::to_categorical(random_seq), dim = c(1, 20, 4))
+ig <- integrated_gradients(
+  input_seq = input_seq,
+  target_class_idx = 3,
+  model = model)
+heatmaps_integrated_grad(integrated_grads = ig,
+                         input_seq = input_seq)
+ 
+\dontshow{\}) # examplesIf}
+}