Skip to content

Commit

Permalink
Added inhibition to the matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed Apr 13, 2017
1 parent d3894fe commit 61a67e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions analysis_functions.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import numpy as np


def create_artificial_matrix(hypercolumns, minicolumns, number_of_patterns, value, decay_factor,
def create_artificial_matrix(hypercolumns, minicolumns, number_of_patterns, value, inhibition, decay_factor,
extension, diagonal_zero, diagonal_across, diagonal_value):
# Creat the small matrix
w_small = np.zeros((minicolumns, minicolumns))
w_small = np.ones((minicolumns, minicolumns)) * inhibition
for i in range(number_of_patterns):
if i < number_of_patterns - extension - 1:
aux = extension
Expand All @@ -17,7 +17,7 @@ def create_artificial_matrix(hypercolumns, minicolumns, number_of_patterns, valu

# Add identity
if diagonal_across:
w_small += np.diag(np.ones(minicolumns) * diagonal_value)
w_small += np.diag(np.ones(minicolumns) * (diagonal_value - inhibition))
# Create the big matrix
w = np.zeros((minicolumns * hypercolumns, minicolumns * hypercolumns))
for j in range(hypercolumns):
Expand Down
2 changes: 0 additions & 2 deletions benchmarking/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@ def run(self):
if __name__ == '__main__':
processes = Process(1), Process(2), Process(3), Process(4)
[p.start() for p in processes]


0 comments on commit 61a67e4

Please sign in to comment.