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

Binomial distribution #498

Merged
merged 8 commits into from
Jan 25, 2022
Merged

Binomial distribution #498

merged 8 commits into from
Jan 25, 2022

Conversation

neworderofjamie
Copy link
Contributor

Added $(gennrand_binomial) non-uniform RNG, InitVarSnippet::Binomial if you ever need to initialise variables with binomial distribution and extended VarInit feature test

@codecov
Copy link

codecov bot commented Jan 25, 2022

Codecov Report

Merging #498 (df71783) into master (4d11fab) will increase coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #498      +/-   ##
==========================================
+ Coverage   86.94%   87.03%   +0.08%     
==========================================
  Files          84       84              
  Lines       17976    18099     +123     
==========================================
+ Hits        15629    15752     +123     
  Misses       2347     2347              
Impacted Files Coverage Δ
include/genn/genn/initVarSnippet.h 100.00% <ø> (ø)
src/genn/backends/single_threaded_cpu/backend.cc 56.18% <ø> (ø)
src/genn/genn/gennUtils.cc 98.78% <ø> (ø)
src/genn/genn/initVarSnippet.cc 100.00% <ø> (ø)
src/genn/backends/cuda/backend.cc 82.76% <100.00%> (+1.01%) ⬆️
src/genn/backends/opencl/backend.cc 91.59% <100.00%> (+0.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4d11fab...df71783. Read the comment docs.

Copy link
Member

@tnowotny tnowotny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good ... I am sure you adopted the code for the binomial right in particular if the test passed.

//! Initialises variable by sampling from the exponential distribution
/*! This snippet takes 1 parameter:
//! Initialises variable by sampling from the gamma distribution
/*! This snippet takes s parameters:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why "s" ... looks like 2.

@neworderofjamie neworderofjamie merged commit acad848 into master Jan 25, 2022
@neworderofjamie neworderofjamie deleted the binomial_distribution branch January 25, 2022 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants