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

Fix most_frequent method to be deterministic #10

Merged
merged 1 commit into from
May 30, 2023
Merged

Fix most_frequent method to be deterministic #10

merged 1 commit into from
May 30, 2023

Conversation

jzelenjak
Copy link
Collaborator

Current implementation of most_frequent method depends on sets, which are unstable. This causes in non-deterministic results for consecutive runs when service counts are equal. The proposed implementation breaks ties by selecting the first most frequent service as the most targeted service.

@smzvandenbroec
Copy link
Contributor

Tested it, works for me!

@Kheoss
Copy link

Kheoss commented May 26, 2023

Looks good!
(Tested on CPTC-2018 dataset)

@Alexandru-Dumitriu
Copy link

Works for me as well. (2017 dataset)

@OpreaCristian2002
Copy link
Contributor

OpreaCristian2002 commented May 29, 2023

Also works for me on the CPTC-2017 dataset

@azqanadeem azqanadeem merged commit 826be69 into tudelft-cda-lab:main May 30, 2023
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.

None yet

6 participants