MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / get_clouds

Function get_clouds

svm_class/util.py:105–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103
104
105def get_clouds():
106 N = 1000
107 c1 = np.array([2, 2])
108 c2 = np.array([-2, -2])
109 # c1 = np.array([0, 3])
110 # c2 = np.array([0, 0])
111 X1 = np.random.randn(N, 2) + c1
112 X2 = np.random.randn(N, 2) + c2
113 X = np.vstack((X1, X2))
114 Y = np.array([-1]*N + [1]*N)
115 return X, Y
116
117
118def plot_decision_boundary(model, resolution=100, colors=('b', 'k', 'r')):

Callers 4

cloudsFunction · 0.90
cloudsFunction · 0.90
get_dataFunction · 0.90
cloudsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected