jolars / eulerr

Area-Proportional Euler and Venn Diagrams with Ellipses
https://jolars.github.io/eulerr/
GNU General Public License v3.0
129 stars 18 forks source link

a different cost function #81

Closed GDCCP closed 3 years ago

GDCCP commented 3 years ago

This is my test case with 4 sets:

    original fitted residuals regionError

A 13 13 0 0.007 B 6 6 0 0.003 C 28 28 0 0.015 D 8 8 0 0.004 A&B 6 6 0 0.003 A&C 23 23 0 0.013 A&D 9 0 9 0.054 B&C 8 8 0 0.004 B&D 3 0 3 0.018 C&D 17 17 0 0.009 A&B&C 9 9 0 0.005 A&B&D 2 0 2 0.012 A&C&D 19 19 0 0.010 B&C&D 9 9 0 0.005 A&B&C&D 7 7 0 0.004

diagError: 0.054 stress: 0.036

I wonder if it is possible to minimize the variance of residuals/deviation(possibly in percentage) as the objective so that the amount of deviation is more evenly distributed. Current var(residuals) is 5.78...

As I look at the current API, I think I have to come up with custom weights (which I have yet to get the details out). Just wonder if you have better suggestions.

Thanks.

GDCCP commented 3 years ago

Looked at the code, and now realize I need a different approach. I did change optim_final.cpp for a different loss function.