(clf, min_x, max_x, linestyle, label)
| 43 | |
| 44 | |
| 45 | def plot_hyperplane(clf, min_x, max_x, linestyle, label): |
| 46 | # get the separating hyperplane |
| 47 | w = clf.coef_[0] |
| 48 | a = -w[0] / w[1] |
| 49 | xx = np.linspace(min_x - 5, max_x + 5) # make sure the line is long enough |
| 50 | yy = a * xx - (clf.intercept_[0]) / w[1] |
| 51 | plt.plot(xx, yy, linestyle, label=label) |
| 52 | |
| 53 | |
| 54 | def plot_subfigure(X, Y, subplot, title, transform): |
no test coverage detected
searching dependent graphs…