Doubt about Neural Networks

Asked

Viewed 137 times

5

I had finished the course of Neural Networks with python, and simply after having trained my entire neural network, I had a question about the use of it. For example, after my network goes through the entire Feed Forward process, it returns in the output layer (for example 0.406) with the sigmoid function already applied. The problem is that I don’t know how I would do a check to say whether it’s 0 or 1 or something, so the user can understand the output. I don’t know if it would be something like:

if respostaCamadaOculta < 0.5:
    return 0
else:
    return 1

1 answer

5


For this, we are entering a definition that is conceptual time and situational time.

From a concept point of view, the output 0.406 can mean anything, and the only thing it defines is what the model understood, using the model architecture / output functions, training and the inputs of the specific case, inputs that were calculated as a consequence of the weights found when analyzing the patterns. That is, conceptually the number does not necessarily define its interpretation (in your case, one should consider 0.5 as separation limit / cut-off rule to interpret it as 0 or 1). So your answer is situational, not conceptual.

Now, entering the situational point, the first question you need to ask yourself is: What is the expected output of the model? Because if you are using a single output (which I believe is the case), then what you got was the probability of that output being defined as the state 1, that is, in that application would be 40.6%.

Now, answering your question, you have to ask yourself: Como vou tratar meu output?

In general, a simpler model would be to treat the binary according to a cut rule like the one you mentioned (using 0.5 as the result separator).

However, this is not necessarily true for any model. In the case of chatbots with NLU, it is common to use values other than 0.5 (if you want to take a look at this, use the Google Assistant with the DialogFlow is a good way to understand what I’m saying).

So, in short, you have to know the best way to interpret the final value, according to the result you expect from your model, and the type of data you’re analyzing!

If you want to comment here on a better detail of your model, to help with ideas on how to interpret, for your application, feel free!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.