Coder Social home page Coder Social logo

fonnesbeck / bios8366 Goto Github PK

View Code? Open in Web Editor NEW
532.0 57.0 356.0 108.68 MB

Advanced Statistical Computing at Vanderbilt University Medical Center's Department of Biostatistics

Home Page: http://fonnesbeck.github.io/Bios8366/

HTML 0.34% Jupyter Notebook 98.87% Python 0.79%

bios8366's Introduction

Bios8366

Binder

Advanced Statistical Computing at Vanderbilt University's Department of Biostatistics

Course covers numerical optimization, statistical machine learning, Markov Chain Monte Carlo (MCMC), variational inference (VI) algorithms, data augmentation algorithms with applications for model fitting and techniques for dealing with missing data.

Prerequisites: Bios 6341 (Fundamentals of Probability), Bios 6342 (Contemporary Statistical Inference), or permission of instructor. Students must be familiar with basic probability, have some formal programming experience, and be comfortable using the Git version control system.

To run the course materials, the first step is to install Python. Though your computer likely already has Python installed, we recommend installing the Miniforge distribution of Python, as it includes useful utilities for manipulating your Python environment. Alternatively, you can install the commercial Anaconda Python distribution.

Having set up Python, to then install the Python packages for the course, clone the repository and run:

conda env create -f environment.yml

All content is licensed under CC-BY-SA 3.0 unless otherwise stated.

FAQ

Can I audit this course?

While we strongly prefer that students attend BIOS 8366 for credit, there are circumstances under which we will allow auditing. Auditors will be expected to attend lectures regularly and complete all homeworks, but will be exempted from completing the final course project.

bios8366's People

Contributors

fonnesbeck avatar gitter-badger avatar ntjames avatar schluedj avatar varunu28 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bios8366's Issues

wrong implementation of function "conditional".

The conditional function takes as input (x_new, x, y, params), there is no need to pass y in the function. By definition of conditional probability above conditional distribution, "x_new" represent "x" and "x" represent "y".

Correct implementation would be:

def conditional(x_new, x, params):
B = exponential_cov(x_new, x, params)
C = exponential_cov(x, x, params)
A = exponential_cov(x_new, x_new, params)
mu = np.linalg.inv(C).dot(B.T).T.dot(x) // y is replace by x.
sigma = A - B.dot(np.linalg.inv(C).dot(B.T))
return(mu.squeeze(), sigma.squeeze())

E-step for ZIP data

In the Expectation and Maximization notebook,

I am not sure, but can you check the following E-step

     a = psi * (x == 0)
     b = (1-psi)*poisson.pmf(x, mu)

is correct? The following can be correct.

    a = (1-psi) * (x == 0)
    b = psi*poisson.pmf(x, mu)

typo in e_step

Excellent work.
And I found a typo in Section3_1-Expectation-Maximization.ipynb-General formulation

from scipy.stats.distributions import norm

def e_step(x, mu, sigma, psi):
    a = psi * norm.pdf(x, mu[0], sigma[0])
    b = (1. - psi) * norm.pdf(x, mu[1], sigma[1])
    return b / (a + b)

should be

def e_step(x, mu, sigma, psi):
    a = (1. - psi) * norm.pdf(x, mu[0], sigma[0])
    b =  psi * norm.pdf(x, mu[1], sigma[1])
    return b / (a + b)

Becasue m_step output psi of second distribution and to be consistent with formula.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.