You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I'm a novice to hLDA and this might be wrong, but I'm wondering if the last (gamma)/(gamma+num_customers) really should be added for the leaves in calculate_ncrp_prior()? If we are on the lowest level, no new nodes can be added below, right?
def calculate_ncrp_prior(self, node_weights, node, weight):
''' Calculates the prior on the path according to the nested CRP '''
for child in node.children:
child_weight = log( float(child.customers) / (node.customers + self.gamma) )
self.calculate_ncrp_prior(node_weights, child, weight + child_weight)
node_weights[node] = weight + log( self.gamma / (node.customers + self.gamma))
The text was updated successfully, but these errors were encountered:
Hello! I'm a novice to hLDA and this might be wrong, but I'm wondering if the last (gamma)/(gamma+num_customers) really should be added for the leaves in calculate_ncrp_prior()? If we are on the lowest level, no new nodes can be added below, right?
The text was updated successfully, but these errors were encountered: