3

I am learning about Restricted Boltzmann Machines and I'm so excited by the ability it gives us for unsupervised learning. The problem is that I do not know how to implement it using one of the programming languages I know without using libraries. I want to implement it manually, which means that I want to use native functionalities of a language as much as possible.

The programming languages I know are Java, C, PHP (my preferred language), JavaScript, R and Python. I am not familiar with TensorFlow or Scikit-Learn or similar stuff.

Thanks in advance

stressed out
  • 175
  • 1
  • 8

1 Answers1

3

ML From Scratch has an implementation in Python

Valentin Calomme
  • 5,396
  • 3
  • 20
  • 49
  • Thank you for your answer. I appreciate it. Sorry if my question is stupid and a bit off-topic, but how can I prepare data and feed it to this? Should I format my data as a vector and pass it to the third argument of the function fit() after initializing the class as an object? – stressed out Jul 11 '18 at 21:41
  • Not entirely certain about the exact interface, but I believe it follows the sklearn interface. Meaning that you instantiate an RBM object, then pass the data inside the fit method (as the X argument). The X argument should probably be a 2-dimensional array/iterable (n_samples x n_features) – Valentin Calomme Jul 11 '18 at 21:51
  • Thanks. Maybe I should ask it separately on a different question, but how can I find data like that? I'm very new to this field, so I'm afraid of asking questions because I feel my questions may be immature. Should I find a CSV file and then turn it into a 2-dimensional array or data scientists use another way to format the input data? – stressed out Jul 11 '18 at 22:05
  • 1
    You probably find some use cases on Kaggle.com. When it comes to data, you use whatever you can find, if it's a csv, a text file, a json document, or even on a database, it doesn't matter. Then it's up to you to read and parse the data into whatever format you'd like! – Valentin Calomme Jul 11 '18 at 22:30