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

Missing argument descriptions in some docstrings #62

Closed
matt-graham opened this issue Jul 8, 2021 · 1 comment
Closed

Missing argument descriptions in some docstrings #62

matt-graham opened this issue Jul 8, 2021 · 1 comment

Comments

@matt-graham
Copy link

Submitting as part of JOSS review openjournals/joss-reviews#3397

Some functions and methods do not have any descriptions of the arguments in their docstrings, for example

def truncated_normal_asym(
group_fraction, votes_fraction, precinct_pops
): # pylint: disable=too-many-locals
"""
A modification of king97's truncated normal that puts some broad priors
over the parameters of the truncated normal dist
"""

def log_binom_sum(lower, upper, obs_vote, n0_curr, n1_curr, b_1_curr, b_2_curr, prev):
"""
Helper function for computing log prob of convolution of binomial
"""

def wakefield_model_beta(
group_fraction, votes_fraction, precinct_pops, pareto_scale=8, pareto_shape=2
):

def wakefield_normal(group_fraction, votes_fraction, precinct_pops, mu0=0, mu1=0):
"""
2 x 2 EI model Wakefield with normal hyperpriors
Note: Wakefield suggests adding another level of hierarchy, with a prior over mu0 and mu1,
sigma0, sigma1, but that is not yet implemented here
"""

def __init__(self, model_name, **additional_model_params):

def plot_polarization_kde(
self, threshold=None, percentile=None, reference_group=0, show_threshold=False, ax=None
):
"""Plot kde of differences between voting preferences"""

def __init__(self, is_weighted_regression=False):

def __init__(self, model_name, weighted_by_pop=False, **additional_model_params):

def __init__(self, model_name, **additional_model_params):

If any of the (non-__init__) functions / methods are intended for internal use only it may be worth indicating that by prefixing the names with an underscore and/or explicitly declaring the public API of each module in the __all__ attribute.

@matt-graham
Copy link
Author

Docstrings updated in c9acc2e so closing.

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

1 participant