Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bringing back more control in FreeViz #6479

Closed
processo opened this issue Jun 17, 2023 · 4 comments · Fixed by #6515
Closed

Bringing back more control in FreeViz #6479

processo opened this issue Jun 17, 2023 · 4 comments · Fixed by #6515
Assignees

Comments

@processo
Copy link

I brought this up in #5501 earlier and still comes up from time to time in my work, so I'll post it here as a feature request.

Older FreeViz (orange v2.4 or 2.6, I think) gave a lot of control to the user over the attractive and repulsive forces of the optimization process. I often found that a temporary increase in repulsive forces can push it out of a local minimum when it's stuck, achieving much better results (in some cases to almost perfect separation of classes). Would it be possible to bring back the force settings and add an option to disable auto-stopping?

@janezd janezd self-assigned this Jun 23, 2023
@processo
Copy link
Author

Here is a visual representation of how different FreeViz results can be.
(It is a document classification task with 100 numeric attributes (binary term occurence of the 100 most frequent words) and one topic attribute as target. In both cases I let it run until stopped by itself.)

Orange 3.35.0:
orange 3 35 freeviz

Orange 1.0-py2.4 (Gaussian law, kernel width 0.1):
orange 2 4 freeviz

@janezd
Copy link
Contributor

janezd commented Jul 4, 2023

I agree. I'll re-add more control, but probably not in a few days -- unless I'd need some rest from other work :).

I can't guarantee the exact same results as before, though. The code is reimplemented and even small random changes can result in ending up in a different local minimum. I noticed that the result of the new code is sometimes better, sometimes worse.

@janezd
Copy link
Contributor

janezd commented Jul 19, 2023

I checked that code. Wow. So: different types of "kernels" are not coming back. That code was a hodgepodge of dreamed up formulae, documented in comments like LAW_GAUSSIAN is based on a kind of log-likelihood estimation. (What's worse, it didn't have much to do with log-likelihood at all. It transformed distances through something that looks like logistic function, but only for repulsive forces, while attractive used inverse linear.) The old behaviour could only be reimplemented by copying this awful inconsistent code. Perhaps.

Setting the ratio between force strengths is also arbitrary, but bearably so. I also have a feeling that it should suffice; the effect of different "types" of forces was probably rather random.

I implemented this in #6515. Can you check how it works for you?

@processo
Copy link
Author

I checked it on the same data and separation has improved greatly.

Here is the result with gravity 2:
freeviz gravity

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 a pull request may close this issue.

2 participants