def flat_prior(self):
""" Evaluate log-probability of each primitive in the population.
Return value is properly normalized.
In this base class, we implement a version where the
distribution over primitives is static; subclasses will
reevaluate this at each call based on the values of variables and
parameters.
"""
raw_weights = np.zeros(len(self.rule_population))
normalization = logsumexp(raw_weights)
return raw_weights - normalization
###
评论列表
文章目录