Ensemble's output's upper and lower limits

Ensemble’s output seems to have only 1.5 upper and lower limits.
Why is this, and is there any way to solve it?
The values in ifinp are imported from the file.

The code is

``````lf1 = load_from_file('C:\\Users\95649\Desktop\qibutai\\111\\test.txt')
def get_lf(t):
return lf1[int(t / dt)]
lf = nengo.Ensemble(500, dimensions=1)
lfinp = nengo.Node(get_lf)
nengo.Connection(lfinp, lf)
``````

Thanks

In Nengo, values being represented by ensembles are actually encoding these values in spike rates. That is to say, some input to the ensemble corresponds to a specific output firing rate. Nengo uses the NEF algorithm to figure out how to map these spike rates back to real-time values. One important step to this mapping is to decide what input values map to what output spikes (and conversely, what output spike rates map to what output values). Since this mapping is arbitrary Nengo uses a default range of -1 to 1 to do this mapping. That is to say, the input and output weights of the ensemble are optimized for this specific range of input values.

When the input value exceeds this assumed range, the neurons will try their best to spike as fast a possible, but, they have a maximum firing rate they can achieve (for LIF neurons, the absolute maximum firing rate is 1/tau_{ref}). This is what is happening when you see the 1.5 “upper” and “lower” limits. The neurons are trying to represent the large input values, but at their maximum firing rate, the output values only go to about 1.5.

To solve this issue, you have to tell Nengo what value ranges you expect the neural ensemble to be able to represent. You do this by setting the `radius` parameter when you create the ensemble object. As an example, if your data has an expected input range of -100 to 100, then you’ll want to set your ensemble’s radius to 100:

``````ens = nengo.Ensemble(500, dimensions=1, radius=100)
``````

Note that while it is possible to set the radius to whatever value you want, the size of the radius does affect the representational resolution of your ensemble. While this is a vast oversimplification, you can think of it as each neuron representing a subset of the entire representational range. Say you have 100 neurons, and you set the range to (-1, 1). Then each neuron would “represent” each 0.02 increment of the entire range (i.e. 2 / 100). But, if you had 100 neurons, and you set the range to (-100, 100), then each neuron would “represent” an increment of 2 in the range of -100 to 100 (i.e., a value like 50.2 would be “rounded” to 50, since you can’t represent anything smaller than 2)