@classmethod
    def from_data(cls, X, hypers=None, gen_seed=0):
        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)
Initialize a continuous component model with sufficient statistics
dataset/ETHPy150Open probcomp/crosscat/src/tests/component_model_extensions/CyclicComponentModel.py/p_CyclicComponentModel.from_data