MCPcopy
hub / github.com/scikit-learn/scikit-learn / plot_hyperplane

Function plot_hyperplane

examples/miscellaneous/plot_multilabel.py:45–51  ·  view source on GitHub ↗
(clf, min_x, max_x, linestyle, label)

Source from the content-addressed store, hash-verified

43
44
45def 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
54def plot_subfigure(X, Y, subplot, title, transform):

Callers 1

plot_subfigureFunction · 0.70

Calls 1

plotMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…