Skip to content

Commit

Permalink
fixes random order of binary file, which should have lead to wrong le…
Browse files Browse the repository at this point in the history
…arning results; thanks to David-Elias
  • Loading branch information
derNarr committed Feb 19, 2018
1 parent 38e76b7 commit 69fc3d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyndl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
__author__ = ('Konstantin Sering, Marc Weitz, '
'David-Elias Künstle, Lennard Schneider')
__author_email__ = 'konstantin.sering@uni-tuebingen.de'
__version__ = '0.4.3'
__version__ = '0.4.4'
__license__ = 'MIT'
__description__ = ('Naive discriminative learning implements learning and '
'classification models based on the Rescorla-Wagner '
Expand Down
2 changes: 2 additions & 0 deletions pyndl/ndl.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ def ndl(events, alpha, betas, lambda_=1.0, *,
binary_files = [os.path.join(binary_path, binary_file)
for binary_file in os.listdir(binary_path)
if os.path.isfile(os.path.join(binary_path, binary_file))]
# sort binary files as they were created
binary_files.sort(key=lambda filename: int(os.path.basename(filename)[9:-4]))
if verbose:
print('start learning...')
# learning
Expand Down

0 comments on commit 69fc3d2

Please sign in to comment.