(self, env)
| 43 | |
| 44 | class Model: |
| 45 | def __init__(self, env): |
| 46 | # fit the featurizer to data |
| 47 | self.env = env |
| 48 | samples = gather_samples(env) |
| 49 | self.featurizer = RBFSampler() |
| 50 | self.featurizer.fit(samples) |
| 51 | dims = self.featurizer.n_components |
| 52 | |
| 53 | # initialize linear model weights |
| 54 | self.w = np.zeros(dims) |
| 55 | |
| 56 | def predict(self, s, a): |
| 57 | sa = np.concatenate((s, [a])) |
nothing calls this directly
no test coverage detected