convexengineering / gpfit

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

Pretty output for when verbosity=1 #104

Closed pgkirsch closed 2 years ago

pgkirsch commented 3 years ago

For example:

$ python myfit.py

Generated an implicit softmax affine fit with 4 terms in 1.4 seconds.

Fit
---
1 = (0.309986/w**0.309511) * (u_1)**0.6327 * (u_2)**-0.813931                    
  + (0.012176/w**0.67353) * (u_1)**2.61311 * (u_2)**-2.59033                   
  + (0.889774/w**0.242028) * (u_1)**0.485343 * (u_2)**-0.0942005               
  + (1.00588/w**0.0753052) * (u_1)**0.149934 * (u_2)**0.0116639 

Error
-----
RMS: 0.01%
Max: 0.5%

Thoughts @bqpd @whoburg?

Related to #8 (which will be closed by v1 PR). verbosity=2 could include things like number of least squares iterations, stopping criterion etc.

bqpd commented 3 years ago

looks great!

pgkirsch commented 3 years ago

Thanks @bqpd!

pgkirsch commented 2 years ago

Closed by #105