accelbrainbase.samplabledata package

Subpackages

Submodules

accelbrainbase.samplabledata.condition_sampler module

class accelbrainbase.samplabledata.condition_sampler.ConditionSampler

Bases: accelbrainbase.samplable_data.SamplableData

The class to draw conditional samples from distributions, using a TrueSampler.

References

  • Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., … & Bengio, Y. (2014). Generative adversarial nets. In Advances in neural information processing systems (pp. 2672-2680).
  • Mirza, M., & Osindero, S. (2014). Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784.
draw()

Draw samples from distribtions.

Returns:Tuple of `mx.nd.array`s.
get_model()

getter for mxnet.gluon.hybrid.hybridblock.HybridBlock.

get_true_sampler()

getter

model

getter for mxnet.gluon.hybrid.hybridblock.HybridBlock.

set_model(value)

setter for mxnet.gluon.hybrid.hybridblock.HybridBlock.

set_true_sampler(value)

setter

true_sampler

getter

accelbrainbase.samplabledata.noise_sampler module

class accelbrainbase.samplabledata.noise_sampler.NoiseSampler

Bases: accelbrainbase.samplable_data.SamplableData

The abstract class to draw fake samples from distributions, generating from IteratableData.

References

  • Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., … & Bengio, Y. (2014). Generative adversarial nets. In Advances in neural information processing systems (pp. 2672-2680).
  • Mirza, M., & Osindero, S. (2014). Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784.
  • Bousmalis, K., Silberman, N., Dohan, D., Erhan, D., & Krishnan, D. (2017). Unsupervised pixel-level domain adaptation with generative adversarial networks. In Proceedings of the IEEE conference on computer vision and pattern recognition (pp. 3722-3731).
draw()

Draw samples from distribtions.

Returns:Tuple of `mx.nd.array`s.
get_iteratorable_data()

getter for IteratableData.

get_noise_sampler()

getter for NoiseSampler.

iteratorable_data

getter for IteratableData.

noise_sampler

getter for NoiseSampler.

set_iteratorable_data(value)

setter for IteratableData.

set_noise_sampler(value)

setter for NoiseSampler.

accelbrainbase.samplabledata.policy_sampler module

class accelbrainbase.samplabledata.policy_sampler.PolicySampler

Bases: accelbrainbase.samplable_data.SamplableData

The class to draw state-action samples from distributions of Q-learning agent’s policy, generating from state-action value function Q(s, a).

References

  • Cho, K., Van Merriënboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H., & Bengio, Y. (2014). Learning phrase representations using RNN encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078.
  • Egorov, M. (2016). Multi-agent deep reinforcement learning.
  • Gupta, J. K., Egorov, M., & Kochenderfer, M. (2017, May). Cooperative multi-agent control using deep reinforcement learning. In International Conference on Autonomous Agents and Multiagent Systems (pp. 66-83). Springer, Cham.
  • Malhotra, P., Ramakrishnan, A., Anand, G., Vig, L., Agarwal, P., & Shroff, G. (2016). LSTM-based encoder-decoder for multi-sensor anomaly detection. arXiv preprint arXiv:1607.00148.
  • Mnih, V., Kavukcuoglu, K., Silver, D., Graves, A., Antonoglou, I., Wierstra, D., & Riedmiller, M. (2013). Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602.
  • Sainath, T. N., Vinyals, O., Senior, A., & Sak, H. (2015, April). Convolutional, long short-term memory, fully connected deep neural networks. In Acoustics, Speech and Signal Processing (ICASSP), 2015 IEEE International Conference on (pp. 4580-4584). IEEE.
  • Xingjian, S. H. I., Chen, Z., Wang, H., Yeung, D. Y., Wong, W. K., & Woo, W. C. (2015). Convolutional LSTM network: A machine learning approach for precipitation nowcasting. In Advances in neural information processing systems (pp. 802-810).
  • Zaremba, W., Sutskever, I., & Vinyals, O. (2014). Recurrent neural network regularization. arXiv preprint arXiv:1409.2329.
check_the_end_flag(state_arr, meta_data_arr=None)

Check the end flag.

If this return value is True, the learning is end.

As a rule, the learning can not be stopped. This method should be overrided for concreate usecases.

Parameters:
  • state_arr – state in self.t.
  • meta_data_arr – meta data of the state.
Returns:

bool

get_possible_n()

getter

observe_reward_value(state_arr, action_arr, meta_data_arr=None)

Compute the reward value.

Parameters:
  • state_arr – Tensor of state.
  • action_arr – Tensor of action.
  • meta_data_arr – Meta data of actions.
Returns:

Reward value.

observe_state(state_arr, meta_data_arr)

Observe states of agents in last epoch.

Parameters:
  • state_arr – Tensor of state.
  • meta_data_arr – meta data of the state.
possible_n

getter

set_possible_n(value)

setter

update_state(action_arr, meta_data_arr=None)

Update state.

This method can be overrided for concreate usecases.

Parameters:
  • action_arr – action in self.t.
  • meta_data_arr – meta data of the action.
Returns:

Tuple data. - state in self.t+1. - meta data of the state.

accelbrainbase.samplabledata.true_sampler module

class accelbrainbase.samplabledata.true_sampler.TrueSampler

Bases: accelbrainbase.samplable_data.SamplableData

The class to draw true samples from distributions, generating from an IteratableData.

References

  • Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., … & Bengio, Y. (2014). Generative adversarial nets. In Advances in neural information processing systems (pp. 2672-2680).
  • Mirza, M., & Osindero, S. (2014). Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784.
draw()

Draw samples from distribtions.

Returns:Tuple of `mx.nd.array`s.
get_iteratorable_data()

getter for IteratableData.

iteratorable_data

getter for IteratableData.

set_iteratorable_data(value)

setter for IteratableData.

Module contents