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

Provide utility functions to build contact models #37

Open
1 task
janosg opened this issue Nov 9, 2020 · 0 comments
Open
1 task

Provide utility functions to build contact models #37

janosg opened this issue Nov 9, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@janosg
Copy link
Contributor

janosg commented Nov 9, 2020

What would you like to enhance and why? Is it related to an issue/problem?

In our estimation repo we use quite many different ways to work with contact models. Some of them are slow. I suggest to implement a few fast functions that can be used instead.

Describe the solution you'd like

def reduce_contacts(contacts, multiplier, contact_type, states=None, condition=None):
    Args:
        contacts (pandas.Series or numpy.ndarray)
        multiplier (float)
        contact_type (str): One of "recurrent", "non-recurrent"
        states (pandas.DataFrame, optional): Only needed if condition is not None
        condition (str): eval string that returns boolean Series. 

To Do

  • add more relevant interfaces
@janosg janosg added the enhancement New feature or request label Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant