-
Notifications
You must be signed in to change notification settings - Fork 1
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
False positives negatives rate #67
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine apart from RNG management.
malsim/sims/mal_simulator.py
Outdated
@@ -654,9 +655,15 @@ def _observe_defender( | |||
observation["observed_state"][index] = 1 | |||
else: | |||
if node.is_compromised(): | |||
observation["observed_state"][index] = 1 | |||
fn_rate = node.extras.get('false_negative_rate') | |||
make_false_negative = fn_rate and random() < fn_rate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would advise using a random number generator object here, so that the simulator respects the given seed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense, will fix that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a lot of changes to the PR after restructuring was done in the main branch. Needs to be reviewed again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also added a test for the rng functionality to make sure a seed makes it deterministic.
7053d6d
to
cd0e80a
Compare
9f5e512
to
f4e9fba
Compare
- Make it possible to set fp/fn rates in a scenario config file - Add rate to nodes .extras field
…pport for false positives
486e523
to
12c2cda
Compare
Current state:
The are applied by scenario on the attack graph into node.extras field and used when creating the observation.