mathematicalmichael / mud

https://mud.dataconsistent.com
MIT License
2 stars 2 forks source link

weights in kwargs (attempt) #52

Closed mathematicalmichael closed 3 years ago

mathematicalmichael commented 3 years ago

trying to fix #51

cc: @cdelcastillo21

codecov[bot] commented 3 years ago

Codecov Report

Merging #52 (f81dc2a) into main (ce312d0) will increase coverage by 2.56%. The diff coverage is 77.27%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
+ Coverage   58.38%   60.94%   +2.56%     
==========================================
  Files           4        4              
  Lines         346      361      +15     
  Branches       66       67       +1     
==========================================
+ Hits          202      220      +18     
  Misses        107      107              
+ Partials       37       34       -3     
Impacted Files Coverage Δ
src/mud/funs.py 41.11% <66.66%> (ø)
src/mud/base.py 76.92% <81.25%> (+6.33%) :arrow_up:

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 ce312d0...f81dc2a. Read the comment docs.

mathematicalmichael commented 3 years ago

really need to actually add tests to cover this expected behavior:

d.set_predicted(weights=d._in) where d is a DensityProblem

mathematicalmichael commented 3 years ago

@cdelcastillo21 I want to also add a unit test to cover your expected behavior.

This is my rough outline: (think identity map and unit vector for truth):




normalizing weights would just be setting weights to d._r/sum(d._r) instead of just d._r, right? probably should use that in that first step of the second part of the outline if so.