(self, grid)
| 56 | |
| 57 | class Model: |
| 58 | def __init__(self, grid): |
| 59 | # fit the featurizer to data |
| 60 | samples = gather_samples(grid) |
| 61 | # self.featurizer = Nystroem() |
| 62 | self.featurizer = RBFSampler() |
| 63 | self.featurizer.fit(samples) |
| 64 | dims = self.featurizer.n_components |
| 65 | |
| 66 | # initialize linear model weights |
| 67 | self.w = np.zeros(dims) |
| 68 | |
| 69 | def predict(self, s, a): |
| 70 | sa = merge_state_action(s, a) |
nothing calls this directly
no test coverage detected