-
Notifications
You must be signed in to change notification settings - Fork 13
Python and C++ code refactoring #9
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
base: master
Are you sure you want to change the base?
Conversation
Numerical fix MixedKCMI
…non_normal_data_classification
Hybrid MI numerical limits fix
Thank you for the PR @carloslihu . I am reviewing the PR. I don't understand the bug in hillclimbing.hpp (lines 152-160). Can you provide more detail? I see some commented tests in tests/learning/algorithms/hillclimbing_test.py (I think they are related), but I do not know where is the "generate_normal_data_dep(1000)" (line 9) is defined. |
Hello David, thank you for reviewing my changes, they are a lot:
|
Another issue is that I have retrocompatibility with the tests until the tag v0.5.2 This KDE learning faster and removes the Singular Covariance Matrix error. If you like this change, I could adapt the tests so that they pass the results given this new method. |
Thank you @carloslihu. I will try to create a test with a case of almost 0 variance to try to control it. First, I wanna know where it is raising the error. About the diagonal matrices: yes, many authors recommend using diagonal matrices. Less parameters to estimate and usually small degradation of performance. That is why I defined ProductKDE (https://pybnesian.readthedocs.io/en/latest/api/factors.html#pybnesian.ProductKDE). I know that ProductKDE is not exactly the same as KDE with diagonal bandwidth matrix, but:
|
Hello David, For my implementation I wanted to use ProductKDE for Hill Climbing, but by lack of skill and time, I wasn't able to do so. This is just a temporary fix, I think that the best solution would be to allow the option of allowing the selection of your ProductKDE implementation for the Hill Climbing algorithm, but my lack of knowledge wouldn't let me. |
Hello David, I will continue using the diagonal bandwidth in another personal branch (feature/diagonal-bandwidth) for the moment |
black
andisort
, and has been refactored according toPEP 8
style guides.google
docstring format.doxygen
docstring format.bandwidth
calculation have been reordered and commented.ArcOperatorSet::update_incoming_arcs_scores
formulas have been reordered and commented.