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

Docs on how to write a selection function #18

Open
Zsailer opened this issue Nov 30, 2018 · 0 comments
Open

Docs on how to write a selection function #18

Zsailer opened this issue Nov 30, 2018 · 0 comments

Comments

@Zsailer
Copy link
Member

Zsailer commented Nov 30, 2018

I realize this is simple, but I don't think we should expect users to dig into the source code to learn how to write a selection function.

Without looking at source code, I wouldn't know what the input, output, arguments, etc would look like to create my own selection function. Further, this is definitely a thing that users will be doing when using this package.

Let's provide a simple documentation page that demonstrates how to write a selection function that the user passes to apply_selection.

I'm imagining some example like this (with details filled in):

def my_selection_function(phenotypes, param_1=None, param_2=None): 
    # Do something to `phenotypes` to get `fitness`  
    return fitness

# Kwargs passed to apply_selection get passed directly to the fitness function.
gpmsm.apply_selection(fitness_function=my_selection_function, param_1=1, param_2=1)
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