r"""split samples in :math:`\mathbf{X}` by classes in :math:`\mathbf{y}`
(X, y)
| 74 | |
| 75 | |
| 76 | def split_classes(X, y): |
| 77 | r"""split samples in :math:`\mathbf{X}` by classes in :math:`\mathbf{y}`""" |
| 78 | lstsclass = np.unique(y) |
| 79 | return [X[y == i, :].astype(np.float32) for i in lstsclass] |
| 80 | |
| 81 | |
| 82 | def fda(X, y, p=2, reg=1e-16): |