简体   繁体   English

深度学习分类中如何处理类之间的相关性?

[英]How to deal with correlation between classes in deep learning classification?

I am not sure about how to deal with the situation where some of the classes in a deep learning classification network are correlated to each other.我不确定如何处理深度学习分类网络中的某些类相互关联的情况。

For example, when classifying images, if the input is a pic of a dog, and the output label is a cat, then the loss should be lower than if the output label is an airplane or a bridge. For example, when classifying images, if the input is a pic of a dog, and the output label is a cat, then the loss should be lower than if the output label is an airplane or a bridge. I was wondering how cs people deal with this before, and if there is any paper I can refer to.我想知道 cs 人以前是如何处理这个问题的,如果有任何论文我可以参考。 Thank you!谢谢!

tl;dr: tl;博士:
You can't/shouldn't你不能/不应该

Long version:长版:
If, for your specific case, you can find a measurement to determine how close the classes are from each other, like this:如果,对于您的特定情况,您可以找到一个度量来确定类之间的距离,如下所示:

d[i,j] = f(L[i], L[j])

(where d[i,j] is the distance between the classes with labels L[i] and L[j] and f is a function of those 2 classes/labels) then you can incorporate this in your loss function, such that the loss will be greater if d is large and smaller if d is small. (其中d[i,j]是标签为L[i]L[j]的类之间的距离, f是这两个类/标签的 function)然后您可以将其合并到您的损失 function 中,这样如果d大,损失会更大,如果d小,损失会更小。

However, in your example with cats/dogs/airplanes/bridges/... I can't believe there is a correct way to determine the distance between dog/cat or dog/bridge etc. If you really want to, you could of course manually decide that for example predicting a bridge is 3 times worse than predicting a dog if your image contains a cat:但是,在您的猫/狗/飞机/桥梁/...的示例中,我无法相信有一种正确的方法可以确定狗/猫或狗/桥梁等之间的距离。如果您真的想要,您可以当然手动决定例如,如果您的图像包含猫,则预测桥梁比预测狗差 3 倍:

d[cat,dog]=1
d[cat,bridge]=3

But I wouldn't recommend this at all.但我根本不会推荐这个。

When would I recommend this?我什么时候推荐这个? If you have a number of classes and a correlation matrix that correctly quantifies the correlation between all classes.如果您有许多类和一个相关矩阵,可以正确量化所有类之间的相关性

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM