MCPcopy Index your code
hub / github.com/wepe/MachineLearning / f

Function f

SVM/SVM_by_QP/testSVM.py:59–62  ·  view source on GitHub ↗
(x, w, b, c=0)

Source from the content-addressed store, hash-verified

57
58def plot_margin(X1_train, X2_train, clf):
59 def f(x, w, b, c=0):
60 # given x, return y such that [x,y] in on the line
61 # w.x + b = c
62 return (-w[0] * x - b + c) / w[1]
63
64 pl.plot(X1_train[:,0], X1_train[:,1], "ro")
65 pl.plot(X2_train[:,0], X2_train[:,1], "bo")

Callers 2

use_CNNFunction · 0.85
plot_marginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected