-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscript.py
101 lines (78 loc) · 3.58 KB
/
script.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import copy
import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import grad
from torch.optim import Optimizer
import sys
import glob
import os
import numpy as np
from CloMu import *
#Prediction of causal relations on Simulation I-a
for R in range(20):
modelFolder = './Models/simulations/I-a/'
modelFile = modelFolder + 'T_4_R_' + str(R) + '_model.pt'
saveFile = './results/simulations/I-a/absoluteCausality_' + str(R) + '.npy'
giveAbsoluteCausality(modelFile, saveFile)
#Prediction of causal relations on Simulation I-b
for R in range(20):
modelFolder = './Models/simulations/I-b/'
modelFile = modelFolder + 'T_11_R_' + str(R) + '_model.pt'
saveFile = './results/simulations/I-b/absoluteCausality_' + str(R) + '.npy'
giveAbsoluteCausality(modelFile, saveFile)
#Prediction of causal relations on Simulation I-c
for R in range(20):
modelFolder = './Models/simulations/I-c/'
modelFile = modelFolder + 'T_12_R_' + str(R) + '_model.pt'
saveFile = './results/simulations/I-c/absoluteCausality_' + str(R) + '.npy'
giveAbsoluteCausality(modelFile, saveFile)
#Tree selection on Simulation I-a
for R in range(20):
probFolder = './Models/simulations/I-a/'
probFile = probFolder + 'T_4_R_' + str(R) + '_baseline.pt.npy'
sampleFolder = './data/simulations/I-a/'
sampleFile = sampleFolder + 'T_4_R_' + str(R) + '_bulkSample.npz'
saveFile = './results/simulations/I-a/treeSelection_' + str(R) + '.npy'
giveTreeSelection(probFile, sampleFile, saveFile)
#Prediction of Latent Representations on Simulation II
for R in range(30):
modelFolder = './Models/simulations/II/'
modelFile = modelFolder + 'T_1_R_' + str(R) + '_model.pt'
saveFile = './results/simulations/II/latentRepresentations_' + str(R) + '.npy'
giveLatentRepresentations(modelFile, saveFile)
#Analysis of AML data
modelFile = './Models/realData/savedModel_AML.pt'
saveFile = './results/realData/latentRepresentations_AML.npy'
giveLatentRepresentations(modelFile, saveFile)
modelFile = './Models/realData/savedModel_AML.pt'
saveFile = './results/realData/relativeCausality_AML.npy'
giveRelativeCausality(modelFile, saveFile)
modelFile = './Models/realData/savedModel_AML.pt'
saveFile = './results/realData/fitness_AML.npy'
giveFitness(modelFile, saveFile)
#Analysis of Breast Cancer data
modelFile = './Models/realData/savedModel_breast.pt'
saveFile = './results/realData/latentRepresentations_breast.npy'
giveLatentRepresentations(modelFile, saveFile)
modelFile = './Models/realData/savedModel_breast.pt'
saveFile = './results/realData/relativeCausality_breast.npy'
giveRelativeCausality(modelFile, saveFile)
modelFile = './Models/realData/savedModel_breast.pt'
saveFile = './results/realData/fitness_breast.npy'
giveFitness(modelFile, saveFile)
#Causal Prediction on TreeMHN simulations
for R in range(20):
modelFolder = './Models/simulations/IV/n10_N300/'
modelFile = modelFolder + str(R) + '_12.pt'
saveFile = './results/simulations/IV/n10_N300/absoluteCausality_neural_' + str(R) + '.npy'
giveAbsoluteCausality(modelFile, saveFile)
modelFolder = './Models/simulations/IV/n15_N300/'
modelFile = modelFolder + str(R) + '_12.pt'
saveFile = './results/simulations/IV/n15_N300/absoluteCausality_neural_' + str(R) + '.npy'
giveAbsoluteCausality(modelFile, saveFile)
modelFolder = './Models/simulations/IV/n20_N300/'
modelFile = modelFolder + str(R) + '_12.pt'
saveFile = './results/simulations/IV/n20_N300/absoluteCausality_neural_' + str(R) + '.npy'
giveAbsoluteCausality(modelFile, saveFile)