Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIIC v2.0.1: Preparation of CRAN update submission, group all breaking changes. #133

Merged
merged 37 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
113d724
Opposite edges allowed in true edges
franck-simon Aug 19, 2024
ce8562c
parseResults optimization for large number of variables
franck-simon Aug 20, 2024
9417983
Remove debug traces
franck-simon Aug 20, 2024
120f6e0
Opposite true edges not allowed with specific warning
franck-simon Aug 20, 2024
4a21405
Static summary structure, change column types, reorder columns
franck-simon Aug 22, 2024
28c8ce5
Rename summary columns with underscores
franck-simon Aug 22, 2024
0700fed
Summary and documentation update
franck-simon Aug 23, 2024
e4cce74
Split proba into p_y2x, p_x2y
franck-simon Aug 26, 2024
68497e9
Standardization of exported function names
franck-simon Aug 27, 2024
2fd0241
Remove uppercase in miic summary
franck-simon Aug 27, 2024
32d6da0
Remove uppercase in miic orientation probas
franck-simon Aug 27, 2024
a28eb70
Remove uppercase computeThreePointInfo return value
franck-simon Aug 27, 2024
39fe0bb
Rename ori abreviates into ort
franck-simon Aug 27, 2024
53bea53
Rename all.edges.xx and orientations.prob data frames
franck-simon Aug 27, 2024
5713b56
Turn X, Y, Z function parameters into lowercase
franck-simon Aug 28, 2024
bf1f6ad
Harmonization of miic object + abreviated as mo
franck-simon Aug 28, 2024
fa861b2
Update version to 2.0.1
franck-simon Aug 28, 2024
e8208f0
Fixes for R checks
franck-simon Aug 28, 2024
d5167a2
URL check
franck-simon Aug 28, 2024
bf036b9
NEWS update for CRAN submission
franck-simon Aug 29, 2024
71de36f
Spell check
franck-simon Aug 29, 2024
71e247d
Check document tags
franck-simon Aug 29, 2024
dfbfb62
Fix documention for R checks
franck-simon Aug 29, 2024
10550fb
Set sign as true NA when 'NA'
franck-simon Sep 2, 2024
3b29af1
Fix about total run time, forced in secs
franck-simon Sep 2, 2024
86d12cf
OD review: replace mo, tmo by miic_obj, tmiic_obj
franck-simon Sep 4, 2024
9c06b93
NEWS review following comment on pull request
franck-simon Sep 11, 2024
1b54798
Rename MDL as BIC
franck-simon Sep 11, 2024
156f9ad
HI review (without description)
franck-simon Sep 13, 2024
838420b
Harmonize is_continuous as parameter
franck-simon Sep 13, 2024
be416fb
Rename movavg -> mov_avg
franck-simon Sep 13, 2024
d1063db
Shortened ref in text, URL and tille added in ref section
franck-simon Sep 13, 2024
6ff808c
README: S. Affeldt, point to PDF + add supp
franck-simon Sep 13, 2024
3fe4b4c
MIIC description review
franck-simon Sep 13, 2024
d98cb2b
CRAN check
franck-simon Sep 13, 2024
e7e049c
News review
franck-simon Sep 13, 2024
3c58128
Add link to News.md in DESCRIPTION
franck-simon Sep 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: miic
Title: Learning Causal or Non-Causal Graphical Models Using Information Theory
Version: 2.0.0
Version: 2.0.1
Authors@R:
c(person(given = "Franck",
family = "Simon",
Expand Down
26 changes: 19 additions & 7 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,43 @@

# v2.0.1

## Features

- New release to CRAN.

## Fixes and improvements

- Updated version published on CRAN.
- Faster post-processing in R for datasets with large number of variables.

## Breaking changes

Consolidating long-pending breaking changes:

- Harmonization of exported function names using camel case.

- Harmonization of parameters and return values using snake case.

- Standardization of exported function names, parameters and return values.
- Harmonization of abbreviations.

## Known issues

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

# 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.
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)

# v1.8.1

## Fixes and improvements

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

- Fix for memory overflow on shared memory space.
Expand Down Expand Up @@ -58,7 +70,7 @@
[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
- By default, `miic()` does not propagate orientations anymore
and allows latent variables discovery during orientation step.

# v1.5.3
Expand Down
45 changes: 23 additions & 22 deletions R/computeInformation.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
#' \item Affeldt et al., \emph{Bioinformatics 2016}
#' }
#'
#' @param X [a vector]
#' A vector that contains the observational data of the first variable.
#' @param Y [a vector]
#' A vector that contains the observational data of the second variable.
#' @param x [a vector]
#' The \eqn{X} vector that contains the observational data of the first variable.
#' @param y [a vector]
#' The \eqn{Y} vector that contains the observational data of the second variable.
#' @param df_conditioning [a data frame]
#' The data frame of the observations of the conditioning variables.
#' @param maxbins [an integer]
Expand Down Expand Up @@ -74,11 +74,12 @@
#' the cutpoints for the partitioning of \eqn{X}.
#' \item cutpoints2: Only when \eqn{Y} is continuous, a vector containing
#' the cutpoints for the partitioning of \eqn{Y}.
#' \item niterations: Only when at least one of the input variables is
#' \item n_iterations: Only when at least one of the input variables is
#' continuous, the number of iterations it takes to reach the convergence of
#' the estimated information.
#' \item iterationN: Only when at least one of the input variables is
#' continuous, the list of vectors of cutpoints of each iteration.
#' \item iteration1, iteration2, ... Only when at least one of the input
#' variables is continuous, the list of vectors of cutpoints of each
#' iteration.
#' \item info: The estimation of (conditional) mutual information without the
#' complexity cost.
#' \item infok: The estimation of (conditional) mutual information with the
Expand Down Expand Up @@ -122,7 +123,7 @@
#' message("I(X;Y|Z) = ", res$info)
#' }
#'
computeMutualInfo <- function(X, Y,
computeMutualInfo <- function(x, y,
df_conditioning = NULL,
maxbins = NULL,
cplx = c("nml", "mdl"),
Expand All @@ -142,7 +143,7 @@ computeMutualInfo <- function(X, Y,
)
cplx <- match.arg(cplx)

input_data = data.frame(X, Y)
input_data = data.frame(x, y)
if (!is.null(df_conditioning)) {
input_data <- data.frame(input_data, df_conditioning)
}
Expand All @@ -151,7 +152,7 @@ computeMutualInfo <- function(X, Y,
stop(paste(
"Differing number of rows between `sample_weights` and input data:",
length(sample_weights),
length(X)
length(x)
))
}

Expand Down Expand Up @@ -239,7 +240,7 @@ computeMutualInfo <- function(X, Y,
# Parse cutpointsmatrix
epsilon <- min(c(sd(X_num), sd(Y_num))) / 100
niterations <- nrow(rescpp$cutpointsmatrix) / maxbins
result$niterations <- niterations
result$n_iterations <- niterations
for (i in 0:(niterations - 1)) {
result[[paste0("iteration", i + 1)]] <- list()
for (l in 1:2) {
Expand Down Expand Up @@ -281,8 +282,8 @@ computeMutualInfo <- function(X, Y,
}

if (plot) {
nameDist1 <- deparse(substitute(X))
nameDist2 <- deparse(substitute(Y))
nameDist1 <- deparse(substitute(x))
nameDist2 <- deparse(substitute(y))
if (base::requireNamespace("ggplot2", quietly = TRUE) &&
base::requireNamespace("gridExtra", quietly = TRUE)) {
if (all(is_continuous[1:2])) {
Expand Down Expand Up @@ -335,12 +336,12 @@ computeMutualInfo <- function(X, Y,
#' \item Affeldt et al., \emph{Bioinformatics 2016}
#' }
#'
#' @param X [a vector]
#' A vector that contains the observational data of the first variable.
#' @param Y [a vector]
#' A vector that contains the observational data of the second variable.
#' @param Z [a vector]
#' A vector that contains the observational data of the third variable.
#' @param x [a vector]
#' The \eqn{X} vector that contains the observational data of the first variable.
#' @param y [a vector]
#' The \eqn{Y} vector that contains the observational data of the second variable.
#' @param z [a vector]
#' The \eqn{Z} vector that contains the observational data of the third variable.
#' @param df_conditioning [a data frame]
#' The data frame of the observations of the set of conditioning variables
#' \eqn{U}.
Expand Down Expand Up @@ -404,7 +405,7 @@ computeMutualInfo <- function(X, Y,
#' message("Ik(X;Y;Z) = ", res$i3k)
#' }
#'
computeThreePointInfo <- function(X, Y, Z,
computeThreePointInfo <- function(x, y, z,
df_conditioning = NULL,
maxbins = NULL,
cplx = c("nml", "mdl"),
Expand All @@ -423,7 +424,7 @@ computeThreePointInfo <- function(X, Y, Z,
)
cplx <- match.arg(cplx)

input_data = data.frame(X, Y, Z)
input_data = data.frame(x, y, z)
if (!is.null(df_conditioning)) {
input_data <- data.frame(input_data, df_conditioning)
}
Expand All @@ -432,7 +433,7 @@ computeThreePointInfo <- function(X, Y, Z,
stop(paste(
"Differing number of rows between `sample_weights` and input data:",
length(sample_weights),
length(X)
length(x)
))
}

Expand Down
Loading
Loading