Total Complexity | 7 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | class Observation(object): |
||
2 | x = None |
||
3 | y = None |
||
4 | group_id = None |
||
5 | label = None |
||
6 | |||
7 | def __init__(self, x=None, label=None, group_id=None, y=None): |
||
8 | if x is not None: |
||
9 | self.x = x |
||
10 | if y is not None: |
||
11 | self.y = y |
||
12 | |||
13 | if label is not None: |
||
14 | self.label = label |
||
15 | |||
16 | if group_id is not None: |
||
17 | self.group_id = group_id |
||
18 | |||
19 | def is_categorical(self): |
||
20 | return self.label is not None |
||
21 | |||
22 | def is_numerical(self): |
||
23 | return self.x is not None |
||
24 | |||
73 |