convexengineering / gpfit

Fit posynomials to data
http://gpfit.readthedocs.io/en/latest/
MIT License
10 stars 7 forks source link

User should be able to specify number of sig figs #107

Open pgkirsch opened 3 years ago

pgkirsch commented 3 years ago

Generate a fit, round to appropriate sig figs, print/savetxt with correct sig figs, plot rounded function, possibly retain original fit in save?

whoburg commented 3 years ago

maybe this should be a .round() method on the Fit base class?

pgkirsch commented 3 years ago

That would be a nice interface. Just need to make sure that everything that needs to be modified accordingly is (or the code is restructured a little). Examples: __repr__ currently hard codes sig figs, __init__ calculates the errors based on the un-rounded fit. Either way, I was thinking this could be v0.3 or beyond, more just making a note of a nice-to-have for future implementation.