0
$\begingroup$

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?

$\endgroup$
3
  • $\begingroup$ 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: fharrell.com/post/classification $\endgroup$ Commented May 9, 2021 at 0:35
  • $\begingroup$ @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 $\endgroup$ Commented May 9, 2021 at 1:41
  • 1
    $\begingroup$ 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. $\endgroup$ Commented May 9, 2021 at 2:29

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.