0

So I'm wanting to make a neural network from scratch for predicting classifications and labels. The activation layer for the output in these networks would be softmax for classification and logistic for labels. However, whenever you are predicting a new value you will get some probability values for the output, so how do you determine the label or class based off these probabilities? Do you choose the largest or sample?

For example, consider three possible classes -> [1,2,3] lets say my output from my softmax layer was [0.25, 0.15, 0.6] (a probability distribution), is the actual predicted value class 3 as it has the highest value?or would you sample?

For labeling, lets say we have three different labels, so the output from the logistic layer is [0.23, 0.65, 0.9], how would you determine the final labels? Would it just be if it was greater than 0.5? so the predicted value would be [0,1,1]? or would you sample?

notMyName
  • 111
  • 3
  • There are plenty of posts on Frank Harrell’s blog about this. The general claim is that once you try doing this, the statistical part of your exercise is over. See this post here: https://www.fharrell.com/post/classification/ – Arya McCarthy May 09 '21 at 00:35
  • @AryaMcCarthy , thanks, that helps with labeling where I use a threshold for each entry but what about classification where the output is a probability distribution, thus I can't use a threshold. See my first example for classes – notMyName May 09 '21 at 01:41
  • 1
    I think you missed the point of the article, then—it's about precisely that case. Choosing a class is a domain-specific decision that should incorporate the risks of each judgment. Your question was tagged as a duplicate; I encourage you to read the top answer there. – Arya McCarthy May 09 '21 at 02:29

0 Answers0