CANM: CANM with auto search the number latent variables.

Description Usage Arguments Value Examples

Description

Fit the Latent variable with ANM.

Usage

1
2
3
CANM(X, Y, N = NULL, epochs = 50L, batch_size = 128L,
  prior_sdy = 0.5, minN = 1L, maxN = 5L, seed = 0L,
  update_sdy = TRUE, ...)

Arguments

X

The cause variable.

Y

The effect variable.

N

The number of hidden intermediated variables. If N=NULL, it will perform an auto search from minN to maxN.

epochs

The training epochs

batch_size

The batch size

prior_sdy

The initialization of the standard error at noise distribution.

minN

The minimum N of the searching progress. It will search N from minN to maxN.

maxN

The maximum N of the searching progress. It will search N from minN to maxN.

seed

The random seed

update_sdy

Whether update the noise distribution by using gradient decent.

...

Other parameters for CANM, see CANM.py for more details.

Value

The likelihood of the model.

Examples

1
2
3
4
5
6
7
8
9
set.seed(0)
data=CANM_data(depth=2,sample_size=5000)
lxy=CANM(data[,1],data[,2])
lyx=CANM(data[,2],data[,1])
if(max(lxy$train_score)>max(lyx$train_score)){
 print("X->Y")
}else{
 print("Y->X")
}

DMIRLAB-Group/CANM documentation built on May 31, 2019, 12:40 a.m.