MCPcopy Index your code
hub / github.com/scikit-learn/scikit-learn / plot_samples

Function plot_samples

examples/mixture/plot_gmm_sin.py:85–99  ·  view source on GitHub ↗
(X, Y, n_components, index, title)

Source from the content-addressed store, hash-verified

83
84
85def plot_samples(X, Y, n_components, index, title):
86 plt.subplot(5, 1, 4 + index)
87 for i, color in zip(range(n_components), color_iter):
88 # as the DP will not use every component it has access to
89 # unless it needs it, we shouldn't plot the redundant
90 # components.
91 if not np.any(Y == i):
92 continue
93 plt.scatter(X[Y == i, 0], X[Y == i, 1], 0.8, color=color)
94
95 plt.xlim(-6.0, 4.0 * np.pi - 6.0)
96 plt.ylim(-5.0, 5.0)
97 plt.title(title)
98 plt.xticks(())
99 plt.yticks(())
100
101
102# Parameters

Callers 1

plot_gmm_sin.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…