bit-lsi / men2017 Goto Github PK
View Code? Open in Web Editor NEWMechanism Enrichment Lab SS2017
Mechanism Enrichment Lab SS2017
Lines generally shouldn't go over 79. For the case of triple-quoted docstrings, it's easy to just split these over multiple lines.
Line 60 in 1f77631
Put these imports at the top of the file
Lines 24 to 25 in 1f77631
There are a lot of places where you're getting sequential elements from a list. Use unpacking to make this code more readable:
Lines 74 to 75 in 1f77631
At best, this can look like:
q_p, q_m = predictionListStats
If there are more elements in predictionListStats
, then you have a couple options:
Explicit assignment
q_p, q_m = predictionListStats[0], predictionListStats[1]
Unpacking sliced list
q_p, q_m = predictionListStats[0:2]
Splat Unpacking
q_p, q_m, *_ = predictionListStats
All functions could use unit tests
You can use vectorized operations in numpy to operate over entire arrays, then list unpack.
Also, remember that <-
isn't a valid assingment in Python and the R people also finally decided to stop doing this too (it's only in legacy code or from legacy coders)
Lines 27 to 30 in 1f77631
f_n_pp, f_n_pm, f_n_mp, f_n_mm = np.floor(twoByTwoContingencyTable[0:4])
R and Python don't have the same documentation styles, so this has to be slightly re-written.
Python-style documentation also allows for embedding of mathtype and latex, so the yucky math looks beautiful
There must be a way to compute the log of the factorial directly to avoid dealing with ridiculous big numbers
Line 71 in 1f77631
At least, this code should be refactored since the pattern of sum log factorial is repeated many times throughout this repo
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.