Home

Awesome

Causal-discovery-and-forecasting-in-nonstationary-environments

Causal discovery and forecasting in nonstationary environments with state-space models

Copyright (c) 2018-2019 Biwei Huang

This package contains code to the paper for causal discovery and forecasting in nonstationary environments: "Huang, B., Zhang, K., Gong, M., Glymour, C. Causal Discovery and Forecasting in Nonstationary Environments with State-Space Models. ICML 2019."

The code is written in Matlab R2017a.

IMPORTANT FUNCTIONS

function [R, q, A, B] = cpf_saem1_new(numIter, X, N, gamma,R_init,q_init,A_init,B_Mask)

Input:

Output:

function [q, A, beta, p, B,h] = cpf_saem2_new(numIter, X, N, gamma,q_init,A_init,beta_init,p_init,B_Mask)

Input:

Output:

function y_star = prediction_SSM1_new(G,Data,target_id,Bt,A,q,R)

Input:

Output:

function y_star = prediction_SSM2_new(G,Data,target_id,Bt,ht,A,q,beta,p)

Input:

Output:

EXAMPLE

example1.m and example2.m give two example of using this package.

CITATION

If you use this code, please cite the following paper: "Huang, B., Zhang, K., Gong, M., Glymour, C. Causal Discovery and Forecasting in Nonstationary Environments with State-Space Models. ICML 2019."

If you have problems or questions, do not hesitate to send an email to biweih@andrew.cmu.edu