@staticmethod
    def draw_hyperparameters(X, n_draws=1, gen_seed=0):
        """
        Draws hyperparameters a, b, and kappa from the same distribution that
        generates the grid in the C++ code.
        Inputs:
             X: a column of data (numpy)
             n_draws: the number of draws
             gen_seed: seed the rng
        Output:
            A list of dicts of draws where each entry has keys 'a', 'b', 'kappa'.
        """
        check_data_type_column_data(X)
        if type(n_draws) is not int:
            raise TypeError("n_draws should be an int")
        if type(gen_seed) is not int:
            raise TypeError("gen_seed should be an int")

        rng = random.Random(gen_seed)

        samples = []

        N = float(len(X))

        vx = numpy.var(X)

        a_kappa_draw_range = (vx, vx/N)
        mu_draw_range = (0, 2*pi)

        for i in range(n_draws):
            a = math.exp(rng.uniform(a_kappa_draw_range[0], a_kappa_draw_range[1]))
            kappa = math.exp(rng.uniform(a_kappa_draw_range[0], a_kappa_draw_range[1]))
            b = rng.uniform(mu_draw_range[0], mu_draw_range[1])

            this_draw = dict(a=a, b=b, kappa=kappa)

            samples.append(this_draw)

        assert len(samples) == n_draws

        return samples
dataset/ETHPy150Open probcomp/crosscat/src/tests/component_model_extensions/CyclicComponentModel.py/p_CyclicComponentModel.draw_hyperparameters/original