Skip to content

Commit

Permalink
fix: add set_context in base and remove it for samknn
Browse files Browse the repository at this point in the history
  • Loading branch information
Spencer Sun authored and hmgomes committed May 14, 2024
1 parent 50f55ce commit 4baad0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/capymoa/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ def __init__(self, moa_learner, schema=None, CLI=None, random_seed=1):

self.moa_learner.prepareForUse()
self.moa_learner.resetLearningImpl()
self.moa_learner.setModelContext(schema.get_moa_header())


def __str__(self):
# Removes the package information from the name of the learner.
Expand Down
3 changes: 0 additions & 3 deletions src/capymoa/classifier/_samknn.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,3 @@ def __init__(
CLI=config_str,
moa_learner=self.moa_learner,
)

# setModelContext needs to be called for SAMkNN to initialise the short and long term memory
self.moa_learner.setModelContext(schema.get_moa_header())

0 comments on commit 4baad0f

Please sign in to comment.