In Establishing, versus maintaining, brain function: a neurocomputational model of cortical reorganisation after injury to the immature brain, Varier et al develop a neural network model of motor control and then "lesion" it as it is training. I am new to neural networks and really do not even know where to begin in emulating them so that I can investigate this further for myself. Any hints would be appreciated. The details of the model can be found on page 16 of the linked arxiv paper.

Figure 1 from the linked paper: enter image description here

  • $\begingroup$ This question shows a lack of pre-work—you're basically asking us to do all the work for you in setting up this problem with R. You need to ask a more precise question if you want to elicit useful feedback. $\endgroup$
    – aeismail
    Dec 28 '13 at 19:48
  • $\begingroup$ @aeismail Yes, as I mentioned I really have no idea how to go about doing this. Chicken and egg problem. Even if the answer is that not enough information was provided by the paper authors, that would be good. $\endgroup$
    – Flask
    Dec 28 '13 at 20:49
  • 1
    $\begingroup$ You have to learn how to crawl before you can walk. Try implementing any neural network model first. There must be models a lot simpler than this available. Then try adding the complexity that allows you to reproduce this model. In general, it shouldn't be based exclusively on figures. There needs to be some text explaining the model! $\endgroup$
    – aeismail
    Dec 28 '13 at 21:06
  • $\begingroup$ @aeismail The text description is on page 16 as I mentioned. I did not copy/paste it here because I do not understand how to format the equations. Also, I suppose you are right that what I need is a simple custom neural network written in R. $\endgroup$
    – Flask
    Dec 28 '13 at 21:26

Actually, there are two considerable packages in R to handle neural networks with easiness. Here they are: nnet and neuralnet.

Install them via



in R. To get help and see examples, see



You can look at a neural network as a function f(x) where x is a vector of inputs. You put a vector and the neural network answers you a number.

The first two problems you will find are

  • Define an architecture. For simplicity, take a single node at first, this will be equal to a linear regression.

  • Train the network. There are algorithms such as Levenberg-Marquardt.

This is the absolute minimum you have to know in order to program/run a neural network in R.

  • $\begingroup$ I am able to use nnet for simple classification problems but have assumed that the type of model described in the question is completely different. For example it is not clear to me what the model described is actually learning. $\endgroup$
    – Flask
    Dec 30 '13 at 18:49
  • $\begingroup$ It's learning to approximate the answer you train it. Imagine you have a dataset X which is multidimensional and a response y for which you want to approximate by f(X), i.e., f(X) = y + error where error is what you want to minimize. Actually, you can see as X is trying to explain y via f(X). The power to explain y depends completely on the the function f you choose. Take, for example, f(X) = c1*X[1]+c2*X[2]+c3*X[3] where X is tridimensional; here, you need to train the network to find the constants c1,c2,c3, then you'll have something like f(X)=2X[1]+3X[2]-7X[3]. $\endgroup$ Dec 30 '13 at 18:58
  • $\begingroup$ Yes, that makes sense to me. But if you read page 16 of the arxiv paper I don't understand what they are using as a measure of error, if anything. Instead they appear to be iterating through different sets of weights until the system attains stability? They say 'This equation implements a Hebbian learning paradigm where synaptic weights increase if pre-synaptic and post-synaptic activity are correlated and decrease otherwise.' $\endgroup$
    – Flask
    Dec 30 '13 at 19:02
  • $\begingroup$ Very exotic, this is new to me. Usually, what you try to minimize is the mean squared error to fit f to your data, MSE(c1,c2,c3) = (1/n) * sqrt(sum((y - f(X,c1,c2,c3))^2)). $\endgroup$ Dec 30 '13 at 19:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.