# nengolib.Connection¶

class nengolib.Connection(pre, post, solver=LstsqL2(reg=0.1, solver=Cholesky(transpose=None), weights=False), **kwargs)[source]

Drop-in replacement for nengo.Connection.

Extends nengo.Connection to improve decoding by using a bias. If the pre object is a nengo.Ensemble, then a bias will be included in its decoders. This automatically improves the decoding of functions with a constant offset when the ensemble has few neurons. This is equivalent to a change in postsynaptic biases (in effect changing the representation to be centered around some constant offset, that is discovered optimally).

Parameters: pre : Nengo source object for the connection. post : Nengo destination object for the connection. solver : nengo.solvers.Solver, optional Solver to use for decoded bias and connection. Defaults to nengo.solvers.LstsqL2. **kwargs : dictionary, optional Additional keyword arguments passed to nengo.Connection.
Attributes: eval_points function function_info Connection-specific validation for functions. is_decoded label A parameter where the value is a string. learning_rule (LearningRule or iterable) Connectable learning rule object(s). learning_rule_type Connection-specific validation for learning rules. modulatory A parameter that is no longer supported. params Returns a list of parameter names that can be set. post post_obj post_slice pre pre_obj pre_slice scale_eval_points A parameter where the value is a boolean. seed A parameter where the value is an integer. size_in (int) The number of output dimensions of the pre object. size_mid (int) The number of output dimensions of the function, if specified. size_out (int) The number of input dimensions of the post object. solver Connection-specific validation for decoder solvers. synapse transform The transform additionally validates size_out.

Methods

 copy