Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PFD verification #463

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

nemakin
Copy link

@nemakin nemakin commented Sep 16, 2024

This PR implements PFD verification algorithm along with some tests, python bindings and examples.

Copy link
Contributor

@egshnov egshnov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not fix codestyle in a separate commit.

Copy link
Contributor

@egshnov egshnov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall seems fine, but most of the code just repeats fd_verifier. As soon as #396 and #458 are merged there will be a task to add afd verification with different measures, which will differ from this pr only in CalculateStatistics, so directly copying code from fd_verifier for the 3rd time will look quite bad. I suggest you moving all the common logic of pfd_verifier and fd_verifier to a new base class (or at least talk to @chernishev and give this task to someone else). Do it in a separate pr.

error_ = 0;
}

bool PFDHolds() const {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we need a separate function to check whether pfd holds or not (and store max_fd_error_) since afd_verifier just returns the error to the user and pfd is pretty much an afd. But this is a topic to discuss with the maintainers, let me know if you've done it already.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the future reference: we just talked and decided to fix immediate problems, found by @egshnov. The architecture rework will come later, when both mining and validation PRs for other metrics will be merged.

return clusters_violating_pfd_;
}

void CalculateStatistics(model::PositionListIndex const* x_pli,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost entirely repeats PFDTane::CalculatePFDError from #396. I think we will have to split it into several functions to avoid repetition as soon as #396 is merged.

@nemakin nemakin force-pushed the PFD-verification branch 2 times, most recently from 0cd2e87 to fea2afd Compare September 22, 2024 10:24
Copy link
Contributor

@egshnov egshnov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not make changes to the interface of PfdVerifier in a separate commit. Amend to the implementation and we are done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants