1. A method of controlling a prosthetic device, comprising: a brain machine interface for controlling said prosthetic device based on neural brain signals, wherein said brain machine interface in said control executes in parallel a continuous decoder and a discrete action state decoder, wherein said continuous decoder controls kinematics of said prosthetic device based on said neural brain signals as input to said continuous decoder, wherein said discrete action state decoder controls discrete action states of said prosthetic device based on said neural brain signals as input to said discrete action state decoder, wherein said discrete action states comprise: (i) discrete velocity states of said prosthetic device, (ii) discrete idle states; and (iii) discrete task states of said prosthetic device, wherein said discrete action state decoder is based on learning models, wherein said learning comprises: (j) learning distribution models of neural data for each of said states (i), (ii) and (iii); and (jj) learning probability transition models between said states (i), (ii) and (iii).