HCR: Hidden Compact Representation Model

Description Usage Arguments Value Examples

View source: R/fit_model.R

Description

Causal Discovery from Discrete Data using Hidden Compact Representation.

Usage

1
2
HCR(X, Y, score_type = "bic", is_anm = FALSE, is_cyclic = FALSE,
  verbose = FALSE, max_iteration = 1000, ...)

Arguments

X

The data of cause.

Y

The data of effect.

score_type

You can choose "bic","aic","aicc","log" as the type of score to fit the HCR model. Default: bic

is_anm

If is_anm=TRUE, it will enable a data preprocessing to adjust for the additive noise model.

is_cyclic

If is_anm=TRUE and is_cyclic=TRUE, it will enable a data preprocessing to adjust the cyclic additive noise model.

verbose

Show the score at each iteration.

max_iteration

The maximum iteration.

...

Other arguments passed on to methods. Not currently used.

Value

The fitted HCR model and its score.

Examples

1
2
3
4
5
6
7
8
9
library(data.table)
set.seed(10)
data=simuXY(sample_size=200)
r1<-HCR(data$X,data$Y)
r2<-HCR(data$Y,data$X)
# The canonical hidden representation
unique(r1$data[,c("X","Yp")])
# The recovery of hidden representation
unique(data.frame(data$X,data$Yp))

HCR documentation built on May 2, 2019, 10:15 a.m.

Related to HCR in HCR...