MCPcopy Create free account
hub / github.com/BladeDancer957/CPFD / plot_embedding

Function plot_embedding

src/utils.py:292–304  ·  view source on GitHub ↗

Plot the feature X Params: - X: a feature matrix has dims (num_samples, hidden_dims) - Y: a label list has dims (num_samples)

(X, Y)

Source from the content-addressed store, hash-verified

290 return flatten_list
291
292def plot_embedding(X, Y):
293 '''
294 Plot the feature X
295
296 Params:
297 - X: a feature matrix has dims (num_samples, hidden_dims)
298 - Y: a label list has dims (num_samples)
299 '''
300 plt.scatter(X[:,0],
301 X[:,1],
302 c=Y,
303 marker='.',
304 cmap=plt.cm.Spectral)
305
306def plot_centers(X, label_list):
307 '''

Callers 1

plot_distributionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected