RBMs are random and undirected graph models generally built with a visible and a hidden layer. They were used in a Netflix competition to predict future user behaviors. The goal here is not to predict what X will do but find out who X is and store the data in X's profile-structured mind-dataset.
The input data represents the features to be trained to learn about person X. Each column represents a feature of X's potential personality and tastes. The following code (and this section) is in RBM.py:
F=["love","happiness","family","horizons","action","violence"]
Each of the following lines is a movie X watched containing those six features; for them, X gave a five-star rating:
r = RBM(num_visible = 6, num_hidden = 2)
training_data = np.array([[1,1,0,0,1,1],
[1...