Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/rushter/MLAlgorithms
/ _sample
Method
_sample
mla/rbm.py:97–98 ·
view source on GitHub ↗
(self, X)
Source
from the content-addressed store, hash-verified
95
logging.debug(
"Visible bias: %s"
% self.bias_v)
96
97
def
_sample(self, X):
98
return
X > np.random.random_sample(size=X.shape)
99
100
def
_predict(self, X=None):
101
return
sigmoid(np.dot(X, self.W) + self.bias_h)
Callers
1
_train
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected