Methods of treating medical conditions by population based encoding of neural information