

@classmethod
def from_data(cls, X, hypers=None, gen_seed=0):
    '\n        Initialize a continuous component model with sufficient statistics\n        generated from data X\n        Inputs:\n            X: a column of data (numpy)\n            hypers: dict with the following entries\n                a: the prior precision of the mean\n                b: the prior mean of the\n                kappa: precision parameter\n            gen_seed: a int to seed the rng\n        '
    check_data_type_column_data(X)
    if (type(gen_seed) is not int):
        raise TypeError('gen_seed should be an int')
    rng = random.Random(gen_seed)
    if (hypers is None):
        hypers = cls.draw_hyperparameters(X, gen_seed=next_seed(rng))[0]
    check_hyperparams_dict(hypers)
    N = len(X)
    sum_sin_x = numpy.sum(numpy.sin(X))
    sum_cos_x = numpy.sum(numpy.cos(X))
    hypers['fixed'] = 0.0
    return cls(hypers, float(N), sum_sin_x, sum_cos_x)

dataset/ETHPy150Open probcomp/crosscat/src/tests/component_model_extensions/CyclicComponentModel.py p_CyclicComponentModel.from_data/original