MCPcopy Index your code
hub / github.com/rushter/MLAlgorithms / fit

Method fit

mla/rbm.py:39–43  ·  view source on GitHub ↗
(self, X, y=None)

Source from the content-addressed store, hash-verified

37 self.n_hidden = n_hidden
38
39 def fit(self, X, y=None):
40 self.n_visible = X.shape[1]
41 self._init_weights()
42 self._setup_input(X, y)
43 self._train()
44
45 def _init_weights(self):
46 self.W = np.random.randn(self.n_visible, self.n_hidden) * 0.1

Callers

nothing calls this directly

Calls 3

_init_weightsMethod · 0.95
_trainMethod · 0.95
_setup_inputMethod · 0.80

Tested by

no test coverage detected