Class Distance Loss not working
See original GitHub issueUsing class_distance
and class_distance_temperature
for Category Output Features always leads to the error “No class_distance metadata available for …”.
While checking the code I noticed that the CategoryBaseFeature
class tries to access the class distances via the key distances
from the features metadata. But they are never stored under that key. I think the whole implementation to calculate and store class distances is missing from the toolkit.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
What should I do when my neural network doesn't learn?
Accuracy (0-1 loss) is a crappy metric if you have strong class imbalance. Try something more meaningful such as cross-entropy loss: you don't...
Read more >Neural Networks Intuitions: 9. Distance Metric Learning
This paper solves the problem mentioned at the start of the article — “Classifiers do not minimize intra-class distance but only maxmize ...
Read more >Transferring Knowledge to Smaller Network with Class ...
We propose class-distance loss that helps teacher networks to form densely clustered vector space to make it easy for the student network to...
Read more >How to Choose Loss Functions When Training Deep Learning ...
Multi-Class Classification Loss Functions ... We will use this function to define a problem that has 20 input features; 10 of the features ......
Read more >Squared Earth Mover's Distance Loss for Training Deep ...
stand-alone loss function for multi-class single-label classification problems using CNNs. The EMD is also known as the Wasserstein distance [1, 3], ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mullerpeter thanks for reporting this. After a quick look, it’s likely that it’s just a mismatch of names, will set it as a bug and resolve it quickly. Anyway, there is no calculation for class distances, the user is expected to provide the distances between classes in the model definition, and that is used by Ludwig in the calculation of the loss https://github.com/uber/ludwig/blob/master/ludwig/features/category_feature.py#L293 . Anyway, will use the occasion of fixing this bug to probably enhance this part, maybe renaming distances to similarities for instance, which makes a bit more sense, and adding some additional documentation about it. Will post the progress in this thread.
LGTM, thanks for your help!