(x, w, b, c=0)
| 57 | |
| 58 | def 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") |
no outgoing calls
no test coverage detected