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 DES #490

Merged
merged 2 commits into from
Jan 6, 2025
Merged

Add DES #490

merged 2 commits into from
Jan 6, 2025

Conversation

VanyaVolgushev
Copy link
Contributor

Add differential evolution solver algorithm for mining numerical association rules.

@VanyaVolgushev VanyaVolgushev force-pushed the add-des-release branch 2 times, most recently from 66d00fc to dbbf329 Compare November 4, 2024 18:57
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

src/core/algorithms/nar/des/des.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/des.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/des.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/encoded_nar.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/encoded_nar.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/rng.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/rng.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/rng.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/value_range.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/value_range.h Outdated Show resolved Hide resolved
@VanyaVolgushev VanyaVolgushev force-pushed the add-des-release branch 2 times, most recently from 578470b to 4edd689 Compare November 9, 2024 18:24
Copy link
Collaborator

@alexandrsmirn alexandrsmirn left a comment

Choose a reason for hiding this comment

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

The first part of the review. I will check the rest of the code later.

src/core/algorithms/nar/nar.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/nar.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/nar_algorithm.h Show resolved Hide resolved
src/core/algorithms/nar/nar_algorithm.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/nar_algorithm.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/nar_algorithm.cpp Show resolved Hide resolved
src/core/config/descriptions.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/value_range.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/value_range.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/des.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/des.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/des.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/des.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/des.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/encoded_nar.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/encoded_nar.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/encoded_nar.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/encoded_nar.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/encoded_nar.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/des.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/des.cpp Show resolved Hide resolved
src/core/algorithms/nar/des/des.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/encoded_nar.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/encoded_value_range.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/encoded_value_range.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/encoded_value_range.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/encoded_value_range.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/encoded_value_range.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/rng.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/mining_algorithms.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/nar.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/nar.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/nar.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/value_range.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/value_range.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/value_range.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/value_range.h Outdated Show resolved Hide resolved
src/tests/test_des.cpp Show resolved Hide resolved
src/core/algorithms/nar/des/encoded_value_range.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/encoded_value_range.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/encoded_value_range.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/encoded_value_range.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/encoded_value_range.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/nar.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/nar.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/nar.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/nar.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/nar.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/nar.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/nar.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/value_range.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/value_range.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/value_range.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/value_range.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/value_range.cpp Outdated Show resolved Hide resolved
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

src/core/algorithms/nar/des/rng.h Outdated Show resolved Hide resolved
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

src/core/algorithms/nar/des/rng.h Outdated Show resolved Hide resolved
Copy link
Collaborator

@ol-imorozko ol-imorozko left a comment

Choose a reason for hiding this comment

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

Oh, by the way, I feel like I left a comment somewhere that asks to change

std::vector a;
loop (x : vector b) {a.push_back(foo(x))}

to

std::vector a(b.size());
loop (x : vector b) {a.push_back(foo(x))}

instead of

std::vector a;
a.reserve(b.size());
loop (x : vector b) {a.push_back(foo(x))}

which is, of course, wrong, but I don't remember where :)

src/core/algorithms/nar/des/des.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/des.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/des.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/des/differential_functions.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/value_range.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/value_range.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/value_range.h Outdated Show resolved Hide resolved
src/core/algorithms/nar/value_range.h Outdated Show resolved Hide resolved
src/tests/test_des.cpp Outdated Show resolved Hide resolved
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

src/tests/test_des.cpp Show resolved Hide resolved
src/core/algorithms/nar/des/des.cpp Outdated Show resolved Hide resolved
auto compare_by_fitness = [](EncodedNAR const& a, EncodedNAR const& b) {
return a.GetQualities().fitness > b.GetQualities().fitness;
};
std::sort(population.begin(), population.end(), compare_by_fitness);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see ranges in the updated version

auto resulting_nar = model::NAR();

std::vector<size_t> feature_order(encoded_value_ranges_.size());
std::iota(std::begin(feature_order), std::end(feature_order), 0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see that in the updated version

src/core/algorithms/nar/nar.cpp Outdated Show resolved Hide resolved
src/core/algorithms/nar/value_range.cpp Outdated Show resolved Hide resolved
@ol-imorozko
Copy link
Collaborator

LGTM apart from those last five requested changes

Copy link
Collaborator

@p-senichenkov p-senichenkov left a comment

Choose a reason for hiding this comment

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

LGTM. The one thing left is to fix commit history. We try to make sure that newer commits don't fix older commit within same PR.

@chernishev chernishev merged commit 423ced6 into Desbordante:main Jan 6, 2025
20 checks passed
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.

5 participants