Skip to content

BDeu implementation issue #249

@ZJsheep

Description

@ZJsheep

According to definition, the prior term should be

$$ \log p(G) = \sum_{i=1}^{d} \left[ |PA_i| \log\left(\frac{\kappa}{d-1}\right) + (d - 1 - |PA_i|)\log\left(1 - \frac{\kappa}{d-1}\right) \right] $$

where $d$ is number of variables. But it seems that in LocalScoreFunction.py line 151, where Data is of shape (n_samples, n_variables), Data.shape[0] is used instead of Data.shape[1]. Could you please let me know if this was intentional, or if it might have been unintentionally missed?

I have opened a pull request (#248) that proposes this change for your consideration.

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