cog-imperial / OMLT

Represent trained machine learning models as Pyomo optimization formulations
Other
271 stars 57 forks source link

Allow passing unscaled input bounds to NetworkDefinition #49

Closed joshuahaddad closed 2 years ago

joshuahaddad commented 2 years ago

This code allows the user to pass either unscaled_input_bounds or scaled_input_bounds dictionaries to the NetworkDefinition. If unscaled_input_bounds are passed they are converted to scaled_input_bounds via the scaler (or 1:1 if no scaler provided) when setting up input_output_bounds in formulation.py.

codecov[bot] commented 2 years ago

Codecov Report

Merging #49 (dc9f200) into main (683caa7) will decrease coverage by 0.02%. The diff coverage is 92.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #49      +/-   ##
==========================================
- Coverage   94.15%   94.12%   -0.03%     
==========================================
  Files          24       24              
  Lines        1231     1242      +11     
  Branches      186      192       +6     
==========================================
+ Hits         1159     1169      +10     
- Misses         42       43       +1     
  Partials       30       30              
Impacted Files Coverage Δ
src/omlt/neuralnet/network_definition.py 89.85% <91.66%> (+0.19%) :arrow_up:
src/omlt/io/keras_reader.py 89.47% <100.00%> (ø)

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 683caa7...dc9f200. Read the comment docs.