def get_mean_masked_features_distance(mean_features_0,
                                      mean_features_1,
                                      mean_masks_0,
                                      mean_masks_1,
                                      n_features_per_channel=None,
                                      ):

    assert n_features_per_channel > 0

    mu_0 = mean_features_0.ravel()
    mu_1 = mean_features_1.ravel()

    omeg_0 = mean_masks_0
    omeg_1 = mean_masks_1

    omeg_0 = np.repeat(omeg_0, n_features_per_channel)
    omeg_1 = np.repeat(omeg_1, n_features_per_channel)

    d_0 = mu_0 * omeg_0
    d_1 = mu_1 * omeg_1

    return np.linalg.norm(d_0 - d_1)
Compute the distance between the mean masked features.
dataset/ETHPy150Open kwikteam/phy/phy/stats/clusters.py/get_mean_masked_features_distance