itca.compute_y_dist¶
- itca.compute_y_dist(y)¶
Compute the distribution of labels given the label vectors.
- Parameters
y (numpy array) – Class labels vector whose values range from 0 to K - 1
- Returns
A dictionary whose keys indicate the class labels and values indicate the corresponding proportions.
- Return type
dict
Examples
>>> y = np.array([0, 0, 1, 1]) >>> y = compute_y_dist(y) ... {0: 0.5, 1:0.5}