d641cd7cf8d44d76e34076ed6df3c04154976bf4,mushroom/algorithms/td.py,TD,fit,#TD#Any#Any#,18
Before Change
q = q_current + self.learning_rate(sa) * (
sample[2] + self._gamma * q_next - q_current)
self.approximator.fit(sa, q, **self.params["fit_params"])
def __str__(self):
return self.__name__
After Change
assert n_iterations == 1 and len(dataset) == 1
s, a, r, ss, ab = self._parse(dataset)
self._update(s, a, r, ss, ab)
def _parse(self, dataset):
sample = dataset[0]
s = np.array([sample[0]])
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: AIRLab-POLIMI/mushroom
Commit Name: d641cd7cf8d44d76e34076ed6df3c04154976bf4
Time: 2017-10-03
Author: boris.ilpossente@hotmail.it
File Name: mushroom/algorithms/td.py
Class Name: TD
Method Name: fit
Project Name: home-assistant/home-assistant
Commit Name: 191d7b0a50f988716878aa3533c8720d7c61d961
Time: 2017-01-24
Author: stu-gott@users.noreply.github.com
File Name: homeassistant/components/switch/wemo.py
Class Name: WemoSwitch
Method Name: update
Project Name: david-abel/simple_rl
Commit Name: f07a371b090609696877dae73e6cb99c547cdfbb
Time: 2016-10-18
Author: david_abel@brown.edu
File Name: simple_rl/mdp/oomdp/OOMDPStateClass.py
Class Name: OOMDPState
Method Name: __init__