(self, feat)
| 37 | self.alpha = 0.9 |
| 38 | |
| 39 | def update_features(self, feat): |
| 40 | feat /= np.linalg.norm(feat) |
| 41 | self.curr_feat = feat |
| 42 | if self.smooth_feat is None: |
| 43 | self.smooth_feat = feat |
| 44 | else: |
| 45 | self.smooth_feat = self.alpha * self.smooth_feat + (1 - self.alpha) * feat |
| 46 | self.features.append(feat) |
| 47 | self.smooth_feat /= np.linalg.norm(self.smooth_feat) |
| 48 | |
| 49 | def predict(self): |
| 50 | mean_state = self.mean.copy() |
no outgoing calls
no test coverage detected