Skip to content

Commit

Permalink
Miic v2 (tmiic) (#131)
Browse files Browse the repository at this point in the history
Implementation of tMIIC
  • Loading branch information
franck-simon authored Jun 19, 2024
1 parent ff645c3 commit b150287
Show file tree
Hide file tree
Showing 35 changed files with 6,126 additions and 847 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# RStudio
*.Rproj
*.Rproj.user
.Rproj.user
# R
.Rhistory
.RData
Expand Down
45 changes: 32 additions & 13 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,23 +1,39 @@
Package: miic
Title: Learning Causal or Non-Causal Graphical Models Using Information Theory
Version: 1.9.0
Version: 2.0.0
Authors@R:
c(person(given = "Vincent",
family = "Cabeli",
c(person(given = "Franck",
family = "Simon",
role = c("aut", "cre"),
email = "[email protected]"),
email = "[email protected]"),
person(given = "Tiziana",
family = "Tocci",
role = "aut",
email = "[email protected]"),
person(given = "Nikita",
family = "Lagrange",
role = "aut",
email = "[email protected]"),
person(given = "Orianne",
family = "Debeaupuis",
role = "aut",
email = "[email protected]"),
person(given = "Louise",
family = "Dupuis",
role = "aut",
email = "[email protected]"),
person(given = "Vincent",
family = "Cabeli",
role = "aut"),
person(given = "Honghao",
family = "Li",
role = "aut",
email = "[email protected]"),
role = "aut"),
person(given = "Marcel",
family = "Ribeiro Dantas",
role = "aut",
email = "[email protected]"),
role = "aut"),
person(given = "Nadir",
family = "Sella",
role = "aut",
email = "[email protected]"),
role = "aut"),
person(given = "Louis",
family = "Verny",
role = "aut"),
Expand All @@ -27,7 +43,7 @@ Authors@R:
person(given = "Hervé",
family = "Isambert",
role = "aut",
email = "Herve.Isambert@curie.fr"))
email = "herve.isambert@curie.fr"))
Description: We report an information-theoretic method which learns a large
class of causal or non-causal graphical models from purely observational
data, while including the effects of unobserved latent variables, commonly
Expand All @@ -39,7 +55,10 @@ Description: We report an information-theoretic method which learns a large
be applied on a wide range of datasets and provide new biological insights
on regulatory networks from single cell expression data, genomic alterations
during tumor development and co-evolving residues in protein structures.
For more information you can refer to:
Since the version 2.0, MIIC can in addition process stationary time series
to unveil temporal causal graphs.
For more information, you can refer to:
Simon et al. eLife, reviewed preprint <doi:10.1101/2024.02.06.579177>,
Cabeli et al. PLoS Comp. Bio. 2020 <doi:10.1371/journal.pcbi.1007866>,
Verny et al. PLoS Comp. Bio. 2017 <doi:10.1371/journal.pcbi.1005662>.
License: GPL (>= 2)
Expand All @@ -60,4 +79,4 @@ LinkingTo:
SystemRequirements: C++14
LazyData: true
Encoding: UTF-8
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Generated by roxygen2: do not edit by hand

S3method(plot,miic)
S3method(plot,tmiic)
export(computeMutualInfo)
export(computeThreePointInfo)
export(discretizeMDL)
export(discretizeMutual)
export(estimateTemporalDynamic)
export(miic)
export(miic.export)
export(miic.write.network.cytoscape)
export(miic.write.style.cytoscape)
export(tmiic.export)
import(Rcpp)
importFrom(stats,density)
importFrom(stats,sd)
Expand Down
71 changes: 65 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,72 @@
# Development version

# v2.0.0

## Features

- tMIIC version for temporal causal discovery on stationary time series:
new mode of MIIC to reconstruct networks from temporal stationary datasets.
[Simon et al., eLife, reviewed preprint]
(https://www.biorxiv.org/content/10.1101/2024.02.06.579177v1.abstract)

## Known issues

- A (very) large number of contributors can lead to a memory fault.
Initial fix has been reverted due to side effects.

# v1.8.1

## Fixes and improvements

- The discretization of continuous variables has been modified when dealing
with variables having a large number of identical values.

- Fix for memory overflow on shared memory space.

# v1.8.0

## Features

- Addition of the 'is consequence' prior knowledge. Consequence variables are
excluded from the possible contributors, edges between consequences are
ignored and edges between a non consequence and a consequence are pre-oriented
toward the consequence.

# v1.7.0

## Features

- iMIIC version introducing genuine vs putative causes, contextual variables
and multiple enhancements to deal with very large datasets.
[Ribeiro-Dantas et al., iScience 2024]
(https://arxiv.org/abs/2303.06423)

# v1.6.0

## Features

- Enhancement of orientations using mutual information supremum principle for
finite datasets.
[Cabeli et al., Why21 at NeurIPS 2021]
(http://kinefold.curie.fr/isambertlab/PAPERS/cabeli_Why21-NeurIPS2021.pdf)

- By default, MIIC does not propagate orientations anymore
and allows latent variables discovery during orientation step.

# v1.5.3

## Features

- Release to CRAN

# v1.5.2

## Fixes and improvements
- Further refactoring of the C++ code for the computation of information
- Further refactoring of the C++ code for the computation of information.

- Fix minor bugs in the continuous computation
- Fix minor bugs in the continuous computation.

- Fix incompatibility with older versions of GCC (std::align)
- Fix incompatibility with older versions of GCC (std::align).

# v1.5.1

Expand All @@ -29,11 +88,11 @@
edges.

## Fixes and improvements
- Faster post processing in R
- Faster post processing in R.

- Rework plot functionality
- Rework plot functionality.

- Fix a bug in the orientation part about the log score
- Fix a bug in the orientation part about the log score.

- Refactor of the C++ code base (orientation).

Expand Down
17 changes: 17 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,20 @@ NULL
#'
#' @keywords data
NULL

#' Covid cases
#'
#' Demo dataset of chronological series to be used in temporal mode of miic.
#' Evolution of Covid cases on a subset of EU countries from 12/31/2019 to 06/18/2020.
#' Source of the data : European Centre for Disease Prevention and Control.
#'
#' @docType data
#' @usage data(covidCases)
#' @format A data.frame object.
#' @keywords datasets
#' @name covidCases
#' @references ECDC (\href{https://www.ecdc.europa.eu/en/publications-data/download-todays-data-geographic-distribution-covid-19-cases-worldwide}{ECDC link})
#'
#' @keywords data
NULL

8 changes: 5 additions & 3 deletions R/discretizeMutual.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Iterative dynamic programming for (conditional) mutual information through optimized discretization.
#' @description This function chooses cutpoints in the input distributions by maximizing the mutual
#' information minus a complexity cost (computed as BIC or with the Normalized Maximum Likelihood ). The
#' information minus a complexity cost (computed as BIC or with the Normalized Maximum Likelihood). The
#' (conditional) mutual information computed on the optimized discretized distributions effectively approaches
#' the mutual information computed on the original continuous variables.
#'
Expand Down Expand Up @@ -52,11 +52,13 @@
#'
#' @return A list that contains :
#' \itemize{
#' \item{two vectors containing the cutpoints for each variable : \emph{cutpoints1} corresponds to /emph{myDist1}, /emph{cutpoints2} corresponds to /emph{myDist2}.}
#' \item{two vectors containing the cutpoints for each variable :
#' \emph{cutpoints1} corresponds to \emph{X},
#' \emph{cutpoints2} corresponds to \emph{Y}.}
#' \item{\emph{niterations} is the number of iterations performed before convergence of the (C)MI estimation.}
#' \item{\emph{iterationN}, lists contatining the cutpoint vectors for each iteration.}
#' \item{\emph{info} and \emph{infok}, the estimated (C)MI value and (C)MI minus the complexity cost.}
#' \item{if $emph{plot} == TRUE, a plot object (requires ggplot2 and gridExtra).}
#' \item{if \emph{plot} == TRUE, a plot object (requires ggplot2 and gridExtra).}
#' }
#' @export
#' @useDynLib miic
Expand Down
Loading

0 comments on commit b150287

Please sign in to comment.