Skip to content

Bug in networkTMLE/example_usage.py #4

@milechin

Description

@milechin

There seems to be a bug in the follow example script:
networkTMLE/example_usage.py

I get the following error when running the script:

Traceback (most recent call last):
  File "./networkTMLE/example_usage.py", line 79, in <module>
    tmle.define_threshold(variable='diet', threshold=3,
TypeError: define_threshold() got an unexpected keyword argument 'definition'

The error message indicates the issue is with line 79. It indicates the argument 'definition' is not defined for define_threshold function.

tmle.define_threshold(variable='diet', threshold=3,
definition='sum') # Defining threshold measure of at least 3 contacts with a diet

The define_threshold function seems to be part of the mossspider package and I found the code block linked below associated with that function and it is indeed missing the "definition" argument.

https://github.com/pzivich/MossSpider/blob/62e6bd20364c7ef01b6964fd79f21be84e5ac579/mossspider/estimators/tmle.py#L753-L762

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions