groups = hard_groups[np.max(groupings, axis=1) > minimum_confidence].flatten()
groups = hard_groups[np.max(groupings, axis=1) > minimum_confidence].flatten()
groups = np.concatenate([groups, np.arange(groupings.shape[1])])
groups = np.concatenate([groups, np.arange(groupings.shape[1])])
sns.countplot(groups)
sns.countplot(groups)
plt.xlabel("Cluster")
plt.xlabel("Cluster")
plt.title("Training instances per cluster")
plt.title("Training instances per cluster")
plt.ylim(0, hard_groups.shape[0] * 1.1)
plt.ylim(0, hard_groups.shape[0] * 1.1)
plt.show()
plt.show()
```
```
%% Output
%% Output
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
The slider in the figure above lets you set the minimum confidence the model may yield when assigning a training instance to a cluster in order to be visualized.
The slider in the figure above lets you set the minimum confidence the model may yield when assigning a training instance to a cluster in order to be visualized.