-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathppl_base_model.py
More file actions
executable file
·70 lines (53 loc) · 1.41 KB
/
ppl_base_model.py
File metadata and controls
executable file
·70 lines (53 loc) · 1.41 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
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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
Author: Bradley Gram-Hansen
Time created: 18:51
Date created: 19/03/2018
License: MIT
'''
from abc import ABC, abstractmethod, ABCMeta
class base_model(ABC):
@abstractmethod
def get_vertices(self):
'''
Generates the vertices of the graphical model.
:return: Set of vertices
'''
return NotImplementedError
@abstractmethod
def get_vertices_names(self):
return NotImplementedError
@abstractmethod
def get_arcs(self):
return NotImplementedError
@abstractmethod
def get_arcs_names(self):
return NotImplementedError
@abstractmethod
def get_conditions(self):
return NotImplementedError
@abstractmethod
def gen_cond_vars(self):
return NotImplementedError
@abstractmethod
def gen_if_vars(self):
return NotImplementedError
@abstractmethod
def gen_cont_vars(self):
return NotImplementedError
@abstractmethod
def gen_disc_vars(self):
return NotImplementedError
@abstractmethod
def get_vars(self):
return NotImplementedError
@abstractmethod
def gen_log_prob(self):
return NotImplementedError
# @abstractmethod
# def gen_log_prob_transformed(self):
# return NotImplementedError
@abstractmethod
def gen_prior_samples(self):
return NotImplementedError