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)
| 290 | return flatten_list |
| 291 | |
| 292 | def 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 | |
| 306 | def plot_centers(X, label_list): |
| 307 | ''' |