Skip to content

Weighted loss function in EdgeFeatureGraphCRF#95

Open
al13n321 wants to merge 6 commits into
pystruct:masterfrom
al13n321:master
Open

Weighted loss function in EdgeFeatureGraphCRF#95
al13n321 wants to merge 6 commits into
pystruct:masterfrom
al13n321:master

Conversation

@al13n321
Copy link
Copy Markdown

See this issue.
I tried using this on some data with superpixels, and it seemed to work well, though I'm still not sure how to reliably test it on real data. All I know is:

  1. the score didn't go down when I started weighting nodes
  2. the score went way down when I tried assigning weights at random

@al13n321
Copy link
Copy Markdown
Author

I believe the remaining two test errors are not mine.

@amueller
Copy link
Copy Markdown
Member

Thanks a lot for the PR and for my slow reaction. I am still super busy :-/ I'll try to have a look asap!

@kondra
Copy link
Copy Markdown
Contributor

kondra commented Oct 31, 2013

Hi, I've also implemented weighted loss, but without breaking the API again.
I've implemented a class Label, which stores full and weak labelling (I'm working on LatentSSVM and I have different losses for full and weak labels), and it also stores weights.
Weighting is a very important feature (e.g. when you work with superpixels in semantic segmentation tasks) but I don't like the idea to pass X to loss function, it's not intuitive.
Thanks

@amueller
Copy link
Copy Markdown
Member

@kondra thank you for your feedback. would you mind sharing some code?
Why don't you like the idea of having x in the loss? In principal everything is conditioned on x, right? In particular, the graph structure is encoded there.

@kondra
Copy link
Copy Markdown
Contributor

kondra commented Nov 1, 2013

@amueller because in common formulation of ssvm there is no x in loss ^_^
It's ok to pass x to the loss.
But may be we can implement this in a backward compatible way? (e.g. make x as a third parameter with default value None)
Thanks

@amueller
Copy link
Copy Markdown
Member

amueller commented Nov 1, 2013

Yes, it should be as backward compatible as possible.
You are right, there is no x in the loss in the papers, but I guess that is only for convenient notation.I don't see a reason why the loss should not be able to include x.

Copy link
Copy Markdown

@plstcharles plstcharles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(woopsie, I used the wrong link to update a PR, sorry!)

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.

4 participants