ensemble_hic/setup_functions.py
def make_norm_prior(norm_prior_settings, likelihood, n_structures):
    """
    Makes the Gamma prior object for the scaling parameter

    Shape and rate of the Gamma distribution are set to rather broad
    values depending on the average number of counts in the data

    :param norm_prior_settings: settings for the scaling factor prior
                                as specified in a config file
    :type norm_prior_settings: dict

    :param likelihood: a likelihood object from which the count data
                       can be retrieved
    :type likelihood: :class:`.Likelihood`

    :param n_structures: number of ensemble members
    :type n_structures: int

    :returns: a scaling factor prior object
    :rtype: :class:`.NormGammaPrior`
    """
    from .gamma_prior import NormGammaPrior

    shape = norm_prior_settings['shape']
    rate = norm_prior_settings['rate']
    if shape == rate == 'auto':
        rate = 1.0 / n_structures
        dp = likelihood.forward_model.data_points[:,2]
        shape = np.mean(dp[dp > 0]) / float(n_structures)
    else:
        shape = float(shape)
        rate = float(rate)

    return NormGammaPrior(shape, rate)

    Makes the Gamma prior object for the scaling parameter

    Shape and rate of the Gamma distribution are set to rather broad
    values depending on the average number of counts in the data

    :param norm_prior_settings: settings for the scaling factor prior
                                as specified in a config file
    :type norm_prior_settings: dict

    :param likelihood: a likelihood object from which the count data
                       can be retrieved
    :type likelihood: :class:`.Likelihood`

    :param n_structures: number of ensemble members
    :type n_structures: int

    :returns: a scaling factor prior object
    :rtype: :class:`.NormGammaPrior`
    
Makes the Gamma prior object for the scaling parameter
Shape and rate of the Gamma distribution are set to rather broad
values depending on the average number of counts in the data
Makes the Gamma prior object for the scaling parameter Shape and rate of the Gamma distribution are set to rather broad values depending on the average number of counts in the data
def make_norm_prior(norm_prior_settings, likelihood, n_structures):
    from .gamma_prior import NormGammaPrior
    shape = norm_prior_settings['shape']
    rate = norm_prior_settings['rate']
    if shape == rate == 'auto':
        rate = 1.0 / n_structures
        dp = likelihood.forward_model.data_points[:,2]
        shape = np.mean(dp[dp > 0]) / float(n_structures)
    else:
        shape = float(shape)
        rate = float(rate)
    return NormGammaPrior(shape, rate)
def make_norm_prior ( norm_prior_settings , likelihood , n_structures ) : from . gamma_prior import NormGammaPrior shape = norm_prior_settings [ 'shape' ] rate = norm_prior_settings [ 'rate' ] if shape == rate == 'auto' : rate = 1.0 / n_structures dp = likelihood . forward_model . data_points [ : , 2 ] shape = np . mean ( dp [ dp > 0 ] ) / float ( n_structures ) else : shape = float ( shape ) rate = float ( rate ) return NormGammaPrior ( shape , rate )
Makes the Gamma prior object for the scaling parameter
Shape and rate of the Gamma distribution are set to rather broad
values depending on the average number of counts in the data
Makes the Gamma prior object for the scaling parameter Shape and rate of the Gamma distribution are set to rather broad values depending on the average number of counts in the data
"""
    Makes the Gamma prior object for the scaling parameter

    Shape and rate of the Gamma distribution are set to rather broad
    values depending on the average number of counts in the data

    :param norm_prior_settings: settings for the scaling factor prior
                                as specified in a config file
    :type norm_prior_settings: dict

    :param likelihood: a likelihood object from which the count data
                       can be retrieved
    :type likelihood: :class:`.Likelihood`

    :param n_structures: number of ensemble members
    :type n_structures: int

    :returns: a scaling factor prior object
    :rtype: :class:`.NormGammaPrior`
    """
a scaling factor prior object
a scaling factor prior object
:class:`.NormGammaPrior`
norm_prior_settings
settings for the scaling factor prior
as specified in a config file
settings for the scaling factor prior as specified in a config file
likelihood
a likelihood object from which the count data
can be retrieved
a likelihood object from which the count data can be retrieved
n_structures
number of ensemble members
number of ensemble members