Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/lazyprogrammer/machine_learning_examples
/ get_data
Function
get_data
supervised_class/perceptron.py:16–21 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
14
15
16
def
get_data():
17
w = np.array([-0.5, 0.5])
18
b = 0.1
19
X = np.random.random((300, 2))*2 - 1
20
Y = np.sign(X.dot(w) + b)
21
return
X, Y
22
23
24
def
get_simple_xor():
Callers
1
perceptron.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected