Add GA-RFD#750
Open
py-cyber wants to merge 14 commits into
Open
Conversation
Closed
0cdb179 to
9f46b95
Compare
c45f483 to
30f2c99
Compare
0125af1 to
27cc596
Compare
202b724 to
d42f01c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a genetic algorithm for the discovery of relaxed functional dependencies (GA‑RFD)
New GA‑RFD Discovery Algorithm
src/core/algorithms/rfd/ga_rfd/ga_rfd.handsrc/core/algorithms/rfd/ga_rfd/ga_rfd.cppCore implementation of the
GaRfdclass. It builds difference‑dataset bit matrices, maintains an LRU cache for support computation and evolves a population of candidate RFDs using selection, crossover, and mutation operators. The algorithm works on a single table, stores data column‑wise for performance, and outputs a set of unique RFDs with their conf and suppsrc/core/algorithms/rfd/rfd.hLightweight
RFDstruct (LHS mask, RHS index, confidence, support) with ordering for deduplication;src/core/algorithms/rfd/similarity_metric.handsrc/core/algorithms/rfd/similarity_metric.cppAbstract
SimilarityMetricinterface and built‑in metrics. Users can provide custom metrics from Python.Python Bindings
src/python_bindings/rfd/bind_ga_rfd.cppandsrc/python_bindings/rfd/bind_ga_rfd.hExpose
GaRfd,RFD, andSimilarityMetricto Python. A helperPySimilarityMetricwraps Python callables so that user‑defined metrics can be passed directly;src/python_bindings/rfd/py_similarity_metric.hPython‑friendly metric adapter with GIL handling;
src/python_bindings/py_util/py_to_any.cppRegisters a converter for
std::shared_ptr<SimilarityMetric>to enable passing Python functions as metrics;Example
examples/basic/mining_ga_rfd.pydemonstrates loading Iris, configuring metrics, setting GA parameters, and printing the discovered RFDs.Tests
src/tests/unit/test_ga_rfd.cppExtensive test suite covering:
Help links:
report
FlameGraph
paper