Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes word_to_word event file creation for line event structure #246

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pyndl/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,12 @@ def gen_occurrences(words):
occurrences.append(("_".join(cues), word))
return occurrences
elif event_structure == 'line':
# (cues, outcomes) with empty outcomes
return [('_'.join(words), ''), ]
#{"trigrams_to_word", "word_to_word", "bigrams_to_word"}
if cue_structure in ("trigrams_to_word", "bigrams_to_word"):
# (cues, outcomes) with empty outcomes
return [('_'.join(words), ''), ]
else:
return [('_'.join(words), '_'.join(words)), ]
else:
raise ValueError('gen_occurrences should be one of {"consecutive_words", "word_to_word", "line"}')

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyndl"
version = "1.1.2"
version = "1.2.0"
description = "Naive discriminative learning implements learning and classification models based on the Rescorla-Wagner equations."

license = "MIT"
Expand Down
Loading