alan-turing-institute / network-comparison

An R package implementing the NetEMD and NetDis network comparison measures
MIT License
14 stars 3 forks source link

Accurate offset #85

Closed andeElliott closed 6 years ago

andeElliott commented 6 years ago

I think this fixes our offset issue, I have changed the tests and the code to reflect the change.

andeElliott commented 6 years ago

This should fix issue #84 but would be good for some one else @leospinaf @martintoreilly to confirm this

codecov-io commented 6 years ago

Codecov Report

Merging #85 into master will decrease coverage by 0.16%. The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #85      +/-   ##
==========================================
- Coverage   84.91%   84.75%   -0.17%     
==========================================
  Files           7        7              
  Lines         663      669       +6     
==========================================
+ Hits          563      567       +4     
- Misses        100      102       +2
Impacted Files Coverage Δ
R/measures_net_emd.R 77.77% <66.66%> (-1.17%) :arrow_down:

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 cf628b1...556235e. Read the comment docs.

martintoreilly commented 6 years ago

There are two meaningful offsets:

  1. The offset with respect to the original locations / centre of mass of each distribution
  2. The offset with respect to the mean-centred and normalised variance histogram (strictly speaking the variance normalisation does not affect this).

We'll provide both:

  1. raw_offset
  2. normalised_offset
martintoreilly commented 6 years ago

Dividing the means be their variances isn't applicable here (though it would be if we were considering rescaling a random variable).