neurodynex.ojas_rule package¶
Submodules¶
neurodynex.ojas_rule.oja module¶
This file implements Oja’s hebbian learning rule.
- Relevant book chapters:
-
neurodynex.ojas_rule.oja.
learn
(cloud, initial_angle=None, eta=0.005)[source]¶ Run one batch of Oja’s learning over a cloud of datapoints.
Parameters: - cloud (numpy.ndarray) – An N by 2 array of datapoints. You can think of each of the two columns as the time series of firing rates of one presynaptic neuron.
- initial_angle (float, optional) – angle of initial set of weights [deg]. If None, this is random.
- eta (float, optional) – learning rate
Returns: time course of the weight vector
Return type:
-
neurodynex.ojas_rule.oja.
make_cloud
(n=2000, ratio=1, angle=0)[source]¶ Returns an oriented elliptic gaussian cloud of 2D points
Parameters: Returns: array of datapoints
Return type:
-
neurodynex.ojas_rule.oja.
plot_oja_trace
(data_cloud, weights_course)[source]¶ Plots the datapoints and the time series of the weights :param data_cloud: n by 2 data :type data_cloud: numpy.ndarray :param weights_course: n by 2 weights :type weights_course: numpy.ndarray
Returns: