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

Design and implement BehaviorModel interface #148

Open
ChrisTimperley opened this issue Dec 13, 2018 · 0 comments
Open

Design and implement BehaviorModel interface #148

ChrisTimperley opened this issue Dec 13, 2018 · 0 comments
Assignees

Comments

@ChrisTimperley
Copy link
Collaborator

We should add a BehaviorModel class to abstract away the implementation details of how behavioral models work and to provide a interface for tools to hook into.

Below is a partial example of what a BehaviorModel could potentially look like.

class BehaviorModel(object):
  @staticmethod
  def from_file(self, filename: str) -> 'BehaviorModel':
    ...

  def to_file(self, filename: str) -> None:
    ...

  def score(self, trace: MissionTrace) -> float:
    ...

  def validate(self, trace: MissionTrace, threshold: float = 0.05) -> bool:
    return 1 - self.score(trace) > threshold
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants