Reputation: 37
I am using the Caret package in R, trying to implement multi-layer perceptron for classifying satellite images. I am using method=mlpML
, and I would like to know which activation function is being used.
Here is my code:
controlparameters<-trainControl(method = "repeatedcv",
number=5,
repeats = 5,
savePredictions=TRUE,
classProbs = TRUE)
mlp_grid<-expand.grid(layer1=13,
layer2=0,
layer3=0)
model< train(as.factor(Species)~.,
data = smotedata,
method='mlpML',
preProc = c('center', 'scale'),
trcontrol=controlparameters,
tuneGrid=mlp_grid,
importance=T)
I used a single layer since it performed the best than using multi-layers.
Upvotes: 0
Views: 524
Reputation: 60370
Looking at the caret source code for mlpML
, it turns out that it uses the mlp
function of the RSNNS package.
According to the RSNNS mlp
documentation, its default arguments are:
mlp(x, ...)
## Default S3 method:
mlp(x, y, size = c(5), maxit = 100,
initFunc = "Randomize_Weights", initFuncParams = c(-0.3, 0.3),
learnFunc = "Std_Backpropagation", learnFuncParams = c(0.2, 0),
updateFunc = "Topological_Order", updateFuncParams = c(0),
hiddenActFunc = "Act_Logistic", shufflePatterns = TRUE,
linOut = FALSE, outputActFunc = if (linOut) "Act_Identity" else
"Act_Logistic", inputsTest = NULL, targetsTest = NULL,
pruneFunc = NULL, pruneFuncParams = NULL, ...)
from which it is apparent that hiddenActFunc = "Act_Logistic"
, i.e the activation function for the hidden layers, is the logistic one.
Upvotes: 0