Skip to content

ValueError: probabilities do not sum to 1 #4

@zhao-zilong

Description

@zhao-zilong

The bug comes from this line:

draws = np.random.choice(a=range(unique_bnds.shape[0]), p = unique_bnds['cvg'] / self.num_trees, size=n)

And I think why it happens it is because in this line of code: you intentionally set come cvg values to zero:

bnds.loc[bnds['cvg'] == 1/pred.shape[0],'cvg'] = 0

Do you have some insights on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions