visualize.infotheo.matrix: Heatmap plot of theory information metrics

Description Usage Arguments Value Examples

View source: R/metrics.R

Description

Heatmap plot of theory information metrics

Usage

1
2
3
4
5
6
visualize.infotheo.matrix(
  df,
  type,
  file = "None",
  colors = c("#DEB841", "white", "#267278")
)

Arguments

df

Conditional Entropy, Joint Entropy or Mutual Information data.frame or matrix.

type

Type of theory information metric. Character

file

In case you want to save the plot, file represents output file name.

colors

Three colors for the gradient. Default c("#DEB841", "white", "#267278").

Value

Plot theory information metrics heatmap

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
df <- data.frame("V1" = sample.int(2,5,replace=TRUE), "V2" =sample.int(2,5,replace=TRUE) , "V3" = sample.int(2,5,replace=TRUE), "V4" = sample.int(2,5,replace=TRUE),  "V5" = sample.int(2,5,replace=TRUE), "V6" = sample.int(2,5,replace=TRUE), "V7" = sample.int(2,5,replace=TRUE), "V8" = sample.int(2,5,replace=TRUE))
ce <- conditional.entropy(df)
je <- joint.entropy(df)
mi <- mutual.information(df)

visualize.infotheo.matrix(ce, type = "Conditional Entropy")
visualize.infotheo.matrix(ce, type = "Conditional Entropy", file = "conditionalEntropy")
visualize.infotheo.matrix(ce, type = "Conditional Entropy", file = "conditionalEntropy", colors = c("Blue", "White", "Green"))


visualize.infotheo.matrix(je, type = "Joint Entropy")
visualize.infotheo.matrix(je, type = "Joint Entropy", file = "jointEntropy")
visualize.infotheo.matrix(je, type = "Joint Entropy", file = "jointEntropy", colors = c("Blue", "White", "Green"))


visualize.infotheo.matrix(je, type = "Mutual Information")
visualize.infotheo.matrix(je, type = "Mutual Information", file = "mutualInformation")
visualize.infotheo.matrix(je, type = "Mutual Information", file = "mutualInformation", colors = c("Blue", "White", "Green"))

AnderEhu/sme documentation built on Jan. 31, 2022, 12:01 a.m.