April 2020
Intermediate to advanced
330 pages
7h 44m
English
The softmax() function is needed when there is more than one target variable. Softmax will create probabilities that a particular set of input variables belongs to each class. After these results are calculated, they can be used to assign input rows to one of the possible target classes. Let's explore this activation function with a slightly different example:
softmax <- function(x) {exp(x) / sum(exp(x))}
results <- softmax(c(2,3,6,9))results[1] 0.0008658387 0.0023535935 0.0472731888 0.9495073791
sum(results)[1] 1
We can see that this function ...
Read now
Unlock full access