@classmethod
    def from_parameters(cls, N, data_params=default_data_parameters, hypers=None, gen_seed=0):
        """
        Initialize a continuous component model with sufficient statistics
        generated from random data.
        Inputs:
          N: the number of data points
          data_params: a dict with the following keys
              mu: the mean of the data
              kappa: the precision of the data
          hypers: a dict with the following keys
              a: the prior precision of the mean
              b: the prior mean of the
              kappa: precision parameter
          gen_seed: an integer from which the rng is seeded
        """

        check_model_params_dict(data_params)

        data_kappa = data_params['kappa']
        data_mean = data_params['mu']

        rng = random.Random(gen_seed)
        X = [ [rng.vonmisesvariate(data_mean-math.pi, data_kappa)+math.pi] for i in range(N)]
        X = numpy.array(X)
        check_data_type_column_data(X)

        if hypers is None:
            hypers = cls.draw_hyperparameters(X, n_draws=1, gen_seed=next_seed(rng))[0]

        check_hyperparams_dict(hypers)

        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_parameters/original