Note
This documentation is for a development version. Click here for the latest stable release (v1.3.0).
nengo_spa.testing¶
Support for unit testing SPA models.
Functions
|
Test that the RMSE to a Semantic Pointer is below threshold. |
-
nengo_spa.testing.
assert_sp_close
(t, data, target_sp, skip=0.0, duration=None, atol=0.2, normalized=False)[source]¶ Test that the RMSE to a Semantic Pointer is below threshold.
- Parameters
- t(T,) array_like
Time values for data in seconds, usually obtained with
nengo.Simulator.trange
.- data(T, D) array_like
Simulation data for T timesteps and D dimensions.
- target_spSemanticPointer
Target Semantic Pointer.
- skipfloat, optional
Amount of seconds to ignore at the beginning of the data.
- durationfloat, optional
Amount of seconds to consider after the skipped portion.
- atolfloat, optional
Absolute tolerated RMSE.
- normalizebool, optional
Whether to normalize the simulation data to unit length in each timestep.