-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathVDPMSimplified.py
More file actions
47 lines (30 loc) · 1.5 KB
/
VDPMSimplified.py
File metadata and controls
47 lines (30 loc) · 1.5 KB
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
import VDPM_MRF
import VDPMMean
import voxelDPM
class VDPMStaticBuilder(voxelDPM.VoxelDPMBuilder):
# builds a voxel-wise disease progression model
def __init__(self, isClust):
super().__init__(isClust)
def generate(self, dataIndices, expName, params):
return VDPMStatic(dataIndices, expName, params, self.plotterObj)
class VDPMStatic(VDPMMean.VDPMMean):
def __init__(self, dataIndices, expName, params, plotterObj):
super().__init__(dataIndices, expName, params, plotterObj)
def recompResponsib(self, crossData, longData, crossAge1array, thetas, variances,
subShiftsCross, trajFunc, prevClustProbBC, scanTimepts, partCode, uniquePartCode):
return prevClustProbBC, crossData, longData
class VDPMNoDPSBuilder(VDPM_MRF.VDPMMrfBuilder):
# builds a voxel-wise disease progression model
def __init__(self, isClust):
super().__init__(isClust)
def generate(self, dataIndices, expName, params):
return VDPMNoDPS(dataIndices, expName, params, self.plotterObj)
class VDPMNoDPS(VDPM_MRF.VDPM_MRF):
def __init__(self, dataIndices, expName, params, plotterObj):
super().__init__(dataIndices, expName, params, plotterObj)
# one option is to overwrite the run(), stageSubjects? and calcPredScores
# the other option is to force subject shifts to be (1,0), effectively building the model against age.
def estimShifts(self, dataOneSubj, thetas, variances, ageOneSubj1array, clustProbBC,
prevSubShift, prevSubShiftAvg, fixSpeed):
bestShift = [1, 0]
return bestShift