pydbm.dbm package

Submodules

pydbm.dbm.dbm_director module

class pydbm.dbm.dbm_director.DBMDirector

Bases: object

The Director in Builder Pattern.

Compose restricted boltzmann machines for building a object of deep boltzmann machine.

dbm_construct()

Build deep boltzmann machine.

Parameters:
  • neuron_assign_list – The unit of neurons in each layers.
  • activating_function_list – The list of activation function,
  • approximate_interface_list – The list of function approximation.
get_rbm_list()

getter

rbm_list

getter

set_rbm_list()

setter

pydbm.dbm.deep_boltzmann_machine module

class pydbm.dbm.deep_boltzmann_machine.DeepBoltzmannMachine

Bases: object

The Client in Builder Pattern,

Build deep boltzmann machine.

get_feature_point()

Extract the feature points.

Parameters:layer_number – The index of layers. For instance, 0 is visible layer, 1 is hidden or middle layer, and 2 is hidden layer in three layers.
Returns:The np.ndarray of feature points.
get_hidden_activity_arr_list()

Extract activity of neurons in each hidden layers.

Returns:Activity.
get_hidden_bias_arr_list()

Extract bias in each hidden layers.

Returns:Bias.
get_rbm_list()
get_reconstruct_error_arr()

Extract reconsturction error rate.

Returns:The np.ndarray.
get_visible_activity_arr_list()

Extract activity of neurons in each visible layers.

Returns:Activity.
get_visible_bias_arr_list()

Extract bias in each visible layers.

Returns:Bias.
get_visible_point()

Extract the visible data points which is reconsturcted.

Parameters:layer_number – The index of layers. For instance, 0 is visible layer, 1 is hidden or middle layer, and 2 is hidden layer in three layers.
Returns:The np.ndarray of visible data points.
get_weight_arr_list()

Extract weights of each links.

Returns:The list of weights.
learn()

Learning.

Parameters:
  • observed_data_arr – The np.ndarray of observed data points.
  • training_count – Training counts.
  • batch_size – Batch size in learning.
  • r_batch_size

    Batch size in inferencing. If this value is 0, the inferencing is a recursive learning. If this value is more than 0, the inferencing is a mini-batch recursive learning. If this value is ‘-1’, the inferencing is not a recursive learning.

    If you do not want to execute the mini-batch training, the value of batch_size must be -1. And r_batch_size is also parameter to control the mini-batch training but is refered only in inference and reconstruction. If this value is more than 0, the inferencing is a kind of reccursive learning with the mini-batch training.

rbm_list
set_rbm_list()

pydbm.dbm.restricted_boltzmann_machines module

class pydbm.dbm.restricted_boltzmann_machines.RestrictedBoltzmannMachine

Bases: object

Restricted Boltzmann Machine.

approximate_inferencing()

Learning with function approximation.

Parameters:
  • observed_data_arr – The array of observed data points.
  • traning_count – Training counts.
  • r_batch_size

    Batch size. If this value is 0, the inferencing is a recursive learning. If this value is more than 0, the inferencing is a mini-batch recursive learning. If this value is ‘-1’, the inferencing is not a recursive learning.

    If you do not want to execute the mini-batch training, the value of batch_size must be -1. And r_batch_size is also parameter to control the mini-batch training but is refered only in inference and reconstruction. If this value is more than 0, the inferencing is a kind of reccursive learning with the mini-batch training.

approximate_learning()

Learning with function approximation.

Parameters:
  • observed_data_arr – The array of observed data points.
  • traning_count – Training counts.
  • batch_size – Batch size.
get_graph()

getter of graph

get_reconstruct_error_list()

Extract reconstruction error.

Returns:The list.
graph

getter of graph

set_read_only()

setter of graph

Module contents