I use the caret package with multi-layer perception.
My dataset consists of a labelled output value, which can be either A,B or C. The input vector consists of 4 variables.
I use the following lines of code to calculate the class probabilities for each input value:
fit <- train(device~.,data=dataframetrain[1:100,], method="mlp",
             trControl=trainControl(classProbs=TRUE))
(p=(predict(fit,newdata=dataframetest,type=("prob"))))
I thought that the class probabilities for each record must sum up to one. But I get the following:
rowSums(p)
#        1        2        3        4        5        6        7        8 
# 1.015291 1.015265 1.015291 1.015291 1.015291 1.014933 1.015011 1.015291 
#        9       10       11       12       13       14       15       16 
# 1.014933 1.015206 1.015291 1.015291 1.015291 1.015224 1.015011 1.015291 
Can anybody help me because I don't know what I did wrong.
 
     
     
    