Tuesday, January 21, 2020

Softmax function



  • A wonderful activation function that turns numbers aka logits into probabilities that sum to one. 
  • Outputs a vector that represents the probability distributions of a list of potential outcomes
  • Core element that is used in deep learning task



Lets predict a model to see if we receive a gift or not?

MODEL PREDICTIONS
The probability that we get a gift is 0.8
The probability that we would not receive a gift is 0.2

JOB OF MODEL
Based on the existing features (Birthdate,year) it calculates the linear model which would be the score
Then the probability that we get a gift or not is the sigmoid function applied to that score

MODEL WHICH WOULD TELL US WHICH ANIMAL WHAT WE SAW

Notice that the probability of the model needs to add to 1.
  • Assuming we have a linear model based on some inputs, We calculate linear function based on inputs like if it has a feather, teeth etc
  • After calculating linear functions based on these inputs , assuming that we get some scores


Note:
  • We need to change the scores to 1. (Requirement for probability)
  • The probability of duck is higher then beaver and the beaver is higher then walrus
We can take the sum of scores and divide it by zero


          The probability would be 2/3 for the duck 1/3 for the beaver and 0 for the walrus

NOTE:
We need to store these scores into positive scores. This can be achieved using exponential function


It is called as softmax function

1 comment:

  1. Play Blackjack at a Casino! - Microgaming - Microgaming
    A classic card game is a thrilling and communitykhabar engaging blackjack 출장마사지 game goyangfc.com at Microgaming. This fun game is now 출장안마 available for septcasino your device!

    ReplyDelete