Neural networks with the package "AMORE" - R

Asked

Viewed 736 times

4

Dear colleagues, I am trying to use the AMORE package of R to run a Neural Network with new activation functions, but I could not understand very well the manual and consequently could not implement the new function. Anyway, the function I want to implement is as follows::

Ordonez

ord <- function(x){
   1-((1+0.5*exp(x))^(-1/0.5))#activation function Aranda-Ordonez
}

DERIVATIVE Ordonez

dord <- function(x){
   ((1+0.5*exp(x))^(-(1+0.5)/0.5))*exp(x)# derivative activation functionao Aranda-Ordonez
}

and the function of R that I want to use is this, which I just want to modify the function of the last neuron output.layer="custom":

select.activation.function(activation.function)

library(AMORE)

P <- matrix(sample(seq(-1,1,length=1000), 1000, replace=FALSE), ncol=1)

target <- P^2

net <- newff(n.neurons=c(1,3,2,1), learning.rate.global=1e-2, momentum.global=0.5,
error.criterium="LMS", Stao=NA, hidden.layer="tansig",
output.layer="custom", method="ADAPTgdwm")
result <- train(net, P, target, error.criterium="LMS", report=TRUE, show.step=100, n.shows=5 )


y <- sim(result$net, P)

In case anyone has ever used or has any tips to give me, I’m grateful for the help.

Sincerely yours truly, Elisalvo

  • I came to this question just for lack... :/

1 answer

-1

I was able to implement neural networks with the package neuralnet following this tutorial: https://www.youtube.com/watch?v=LTg-qP9iGFY&index=3&t=899s&list=PLVbc4TTBBn6nuF3BTQms_y1j7wIV2inkL

This package seemed simple to implement. I also tried the package RNNS but without success.

Here is also a list of tutorials: https://www.youtube.com/playlist?list=PLVbc4TTBBn6nuF3BTQms_y1j7wIV2inkL

If you adopt the package neuralnet If you have any questions, I can help you more. The package AMORE never used.

Browser other questions tagged

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