spmviz.measures.contrast#

spmviz.measures.contrast(ps, groups, positive=None, pseudocount=0.5)[source]#

Support of every pattern in two or more groups of sequences.

Parameters:
psPatternSet
groupsstr or array_like

An attribute column of the database or one label per sequence.

positivelabel, optional

Group compared with all others (two-group statistics); default the first label.

pseudocountfloat

Added to the counts of the log-ratio so that it stays finite.

Returns:
pandas.DataFrame

Relative support per group (supp[<label>]), diff and log2_ratio of the positive group against the rest, growth_rate (Dong & Li, 1999) and the p-value of Fisher’s exact test (two-sided).

Examples using spmviz.measures.contrast#

Comparing two groups: contrast sunburst

Comparing two groups: contrast sunburst