Skip to content
Snippets Groups Projects
Commit 7bce87a6 authored by dlinzner-bcs's avatar dlinzner-bcs
Browse files

corrected relative paths in scripts
parent 9412f863
Branches
No related tags found
No related merge requests found
# Introduction
This is the companion code to the paper 'Scalable Structure Learning for Continuous-time Bayesian Networks from Incomplete Data' [D.Linzner, M.Schmidt and H Koeppl].
This is the companion code to the paper 'Scalable Structure Learning of Continuous-time Bayesian Networks from Incomplete Data' [D.Linzner, M.Schmidt and H Koeppl].
Simulations similar to the ones used in the paper can be run with this Matlab code.
......
No preview for this file type
......@@ -2,7 +2,8 @@
%Generate synthetic data
L=5; %number of nodes of random graph
max_par=2;
num_graphs=10;
num_graphs=30;
N_TRAJ=40; %number of synthetic trajectories
mworkers=4;
for graphs=1:num_graphs
A=zeros(L);
......@@ -11,13 +12,12 @@ for graphs=1:num_graphs
lin(i)=[];
par=find(mnrnd(1,ones(1,max_par+1).*1/(max_par+1)),1)-1;
A(i,randsample(lin,par))=1;
end
end
A
B=ones(L,L);
for i=1:L
B(i,i)=0;
end
N_TRAJ=20; %number of synthetic trajectories
SIGMA=0.2; %noise in synthetic trajectories
MAX_PAR=2; %maximum number of parents in synthetic experiments
steps=10; %number of sampled transitions
......@@ -38,7 +38,7 @@ for graphs=1:num_graphs
[DATAC,D] = corrupted_observation_gaussianD(DATA0,SIGMA,node0);
name=sprintf('data.mat');
save(name,'DATAC','D','DATA0','D0','time0','SIGMA','node0','b','ta','L','A','B','states');
save(name,'DATAC','time0','L','states');
header=sprintf('states_%d_maxpar_%d_ntraj%d_beta%.2g',D0,max_par,N_TRAJ,b);
hashA=bi2de(reshape(A,[1,L^2]));
......@@ -47,5 +47,5 @@ for graphs=1:num_graphs
%start exhaustive experiment
ctbn_gradient_structure_learning_dims(name,mworkers)
%start greedy experiment
%ctbn_gradient_structure_learning_dims_greedy(name,mworkers,2)
ctbn_gradient_structure_learning_dims_greedy(name,mworkers,2)
end
\ No newline at end of file
......@@ -4,9 +4,7 @@
% node : final estimated ctbn at different iterations
% C : estimated edge probabilities
% F : value of objective function at different iterations
addpath(genpath('ssl-ctbn-code'))
addpath(genpath('../ssl-ctbn-code'))
%name of experiment
name=sprintf('my_test_run_%d_%dparents',1);
%number of workers running in parallel
......
......@@ -4,8 +4,7 @@
% node : final estimated ctbn at different iterations
% C : estimated edge probabilities
% F : value of objective function at different iterations
addpath(genpath('ssl-ctbn-code'))
addpath(genpath('../ssl-ctbn-code'))
%maximal number of parents in greedy search
K=2;
%name of experiment
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment