remove dimension of input. Return last relative price vector. :param x: matrix with shape (1, window_size, coin_number+1)
(self, x)
| 31 | raise NotImplementedError('subclass must implement this!') |
| 32 | |
| 33 | def get_last_rpv(self, x): |
| 34 | '''remove dimension of input. Return last relative price vector. |
| 35 | :param x: matrix with shape (1, window_size, coin_number+1) |
| 36 | ''' |
| 37 | if x.ndim == 3: |
| 38 | #print x.shape |
| 39 | last_rpv = x[0,:,-1] # output a vector with shape (x.size,) |
| 40 | else: |
| 41 | last_rpv = x #if it has already been processed just return x |
| 42 | return last_rpv |
| 43 | |
| 44 | def get_first_history(self, x): |
| 45 | '''get history in first period |
no outgoing calls
no test coverage detected