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

Changes to swap rule and to acc_tuner #26

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

edoardociscato
Copy link

In order to implement the swap rule

if evj.value - evi.value < algo["maxdists"][i]
            swap_ev_ij!(algo,i,j)
end

I realized I could simply change the default dist_fun into -, so that the algorithm looks at algo.dist_fun(evj.value, evi.value) being by default -(evj.value, evi.value) but still being editable by users. In addition, I changed the default maxdists to a vector of zeros, so that the default swap rule is simply evj.value < evi.value, as suggested by BGP.

I also introduced a vector acc_tuners as a field of MAlgoBGP so that each chain can have its own value for acc_tuner. This allows for more control on the algorithm. Ideally, one might want to be more restrictive (i.e., higher acc_tuner) on colder chains.

In order to implement the swap rule
```
if evj.value - evi.value < algo["maxdists"][i]
            swap_ev_ij!(algo,i,j)
end
```
I changed the default `dist_fun` into `-`, so that the algorithm looks at `algo.dist_fun(evj.value, evi.value)`. In addition, I changed the default `maxdists` to a vector of zeros, so that the default swap rule is simply `evj.value < evi.value`, as suggested by BGP.

I also introduced a vector `acc_tuners` as a field of `MAlgoBGP` so that each chain can have its own value for `acc_tuner`. This allows more control on the algorithm. Ideally, you might want to be more restrictive (i.e., higher `acc_tuner`) on colder chains.
@codecov-io
Copy link

codecov-io commented Aug 18, 2018

Codecov Report

Merging #26 into master will decrease coverage by 0.2%.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #26      +/-   ##
==========================================
- Coverage    52.5%   52.29%   -0.21%     
==========================================
  Files          14       14              
  Lines         960      960              
==========================================
- Hits          504      502       -2     
- Misses        456      458       +2
Impacted Files Coverage Δ
src/mopt/Examples.jl 66.1% <ø> (ø) ⬆️
src/mopt/AlgoBGP.jl 77.25% <80%> (-0.95%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f204add...183e604. Read the comment docs.

@coveralls
Copy link

coveralls commented Aug 18, 2018

Pull Request Test Coverage Report for Build 209

  • 4 of 5 (80.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.2%) to 52.292%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/mopt/AlgoBGP.jl 4 5 80.0%
Files with Coverage Reduction New Missed Lines %
src/mopt/AlgoBGP.jl 2 77.25%
Totals Coverage Status
Change from base Build 206: -0.2%
Covered Lines: 502
Relevant Lines: 960

💛 - Coveralls

@floswald
Copy link
Owner

can you just let me know when you are done with this? Im planning to move to julia 0.7 in the coming days, so i may wait (or not) depending on that.

@edoardociscato
Copy link
Author

OK, I will do this as soon as possible!

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.

4 participants