Skip to content

Softmax transiogram fit and multistart in Matrix Exponential path#86

Open
pkofod wants to merge 19 commits into
JuliaEarth:mainfrom
pkofod:pkm/softmax-transiogram-fit
Open

Softmax transiogram fit and multistart in Matrix Exponential path#86
pkofod wants to merge 19 commits into
JuliaEarth:mainfrom
pkofod:pkm/softmax-transiogram-fit

Conversation

@pkofod

@pkofod pkofod commented Jun 20, 2026

Copy link
Copy Markdown

@juliohm please read this carefully as it may not be what you want. I changed a few things. First, proportions can be fit as you do, but the softmax version is more straight forward imho because this way they sum to 1 by construction. The multistart in the mat exp can be removed, but when running the tests I found that even if a minimum was found it was not always the global.

Some caveats:

  • now that proportions are fixed by the softmax relation there is no simple way to bound each individual proportions size. I think you did this for stability of the fit, but if you need this, then softmax is not the way to go
  • I made the mat exp fit a bit more expensive since it tries several starting values. I'm not sure if this is a bottle neck in practice. You can adjust as you see fit.

juliohm and others added 4 commits April 25, 2026 19:16
Co-authored-by: Patrick Kofod Mogensen <patrick.mogensen@gmail.com>
Co-authored-by: Patrick Kofod Mogensen <patrick.mogensen@gmail.com>
…ltistart Matrix Exponential fits because they appeared to have multiple local minima.
@juliohm

juliohm commented Jun 22, 2026

Copy link
Copy Markdown
Member

Thank you @pkofod for attempting an alternative solution with a softmax rewrite. Appreciate the time you put into this! I would like to avoid core changes to the original implementation though because it has been used in past projects with great success.

There is nothing special about the box constraints in #85, yet we still get test failures with Optim.jl v2.x, which seems to indicate an issue on the optimization side. Can we try to debug it further over there?

I will close the PR here to avoid confusion.

@juliohm juliohm closed this Jun 22, 2026
@juliohm

juliohm commented Jun 25, 2026

Copy link
Copy Markdown
Member

@pkofod I am starting to appreciate your proposed solution with softmax. I've noticed that our current implementation has several flaws and that your approach is superior.

@juliohm juliohm reopened this Jun 25, 2026
@codecov-commenter

codecov-commenter commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.36%. Comparing base (8e8c6c0) to head (41c647b).
⚠️ Report is 23 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #86      +/-   ##
==========================================
- Coverage   77.76%   77.36%   -0.41%     
==========================================
  Files          47       47              
  Lines        1390     1396       +6     
==========================================
- Hits         1081     1080       -1     
- Misses        309      316       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/fitting/transiograms.jl Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants