def compute_local_rotations(data, C, num_buckets):

    logger.info('Fitting local rotations...')

    A, mu, count, assignments, residuals = accumulate_covariance_estimators(data, C)

    R, mu = compute_rotations_from_accumulators(A, mu, count, num_buckets)

    logger.info('Done fitting local rotations.')

    return R, mu, assignments, residuals
Compute a rotation matrix for each cluster in the model by estimating
dataset/ETHPy150Open yahoo/lopq/python/lopq/model.py/compute_local_rotations