Coder Social home page Coder Social logo

bertdv / bmlip Goto Github PK

View Code? Open in Web Editor NEW
34.0 7.0 17.0 616.43 MB

Course 5SSD0 - Bayesian Machine Learning and Information Processing

Home Page: http://bmlip.nl

License: Other

Python 0.07% HTML 3.41% JavaScript 0.01% Jupyter Notebook 96.37% Julia 0.13% CSS 0.01%
bayesian course-materials machine-learning information-theory signal-processing

bmlip's People

Contributors

abpolym avatar bauglir avatar bertdv avatar ismailsenoz avatar ivan-bocharov avatar magnuskoudahl avatar marcocox avatar markus92 avatar martindeq98 avatar mroavi avatar sepideh-adamiat avatar wmkouw avatar wouterwln 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bmlip's Issues

URL link from notebook to a page in pdf

I would like to put links in the lecture notes to a specific page in a pdf file (eg the PRML book). It should be possible for a student to click on a link in the notebook and a specific page from the PRML book opens. This way we can make notes such as

for proof, see Bishop, p.463.

I have looked around and it should be possible to add a named bookmark (say with name p463) and make it work with a link such as

https://github.com/bertdv/BMLIP/blob/master/lessons/notebooks/files/PRML.pdf#p463

but it does not work for me. Can any of you figure out how to make this work?

todo: installation guide for Julia and Jupyter

I think we (read: I) should write an installation guide so that the students can quickly install the right versions of Julia and Jupyters. Lots of things can go wrong in the PP notebooks if they get their versions wrong.

PDF generation

Are there alternative methods for generating PDF files from Jupyter notebooks? It is difficult at the moment to get attractive-looking output.

pdf generation for exercises fail

I ran jupyter nbconvert --config bundler/bundle_configuration.py for the exercises and got the following:

Screen Shot 2022-11-01 at 13 39 01

Is this a problem on my computer, or do yo get the same error?

Small error in Gaussian distribution notebook

In the section "Transformations and Sums of Gaussian Variables", the following is written:

... after a linear transformation $z=Ax+b$, no matter how $x$ is distributed, 
the mean and variance of $z$ are given by $\mathbb{E}[z] = \mathbb{E}[x] + b$  
and $\mathrm{var}[z] = A\mathrm{var}[z] A^T$

I think that $\mathbb{E}[z] = \mathbb{E}[x] + b$ should be $\mathbb{E}[z] = A\mathbb{E}[x] + b$ and $\mathrm{var}[z] = A\mathrm{var}[z] A^T$ should be $\mathrm{var}[z] = A\mathrm{var}[x] A^T$.

review Code Example: Bayesian evolution for the coin toss

Towards the bottom of the BML lecture

https://nbviewer.org/github/bertdv/BMLIP/blob/master/lessons/notebooks/Bayesian-Machine-Learning.ipynb ,

there is a Code Example: Bayesian evolution for the coin toss. The code produces 4 plots that illustrate the evolution of priors to posteriors (+ Bayes factor) for 2 models (that differ in their prior).

In principle, the code works and the plots are produced. I have two requests:

  1. The code is not very clean. Please refactor if you can.
  2. I find the evolution of the Bayes factor a bit odd. It makes me question if there is a small bug somewhere. Could you please review if you can find something?

thanks.

5SSD0 landing page for 2021-22 disappeared

Perhaps I did something wrong but I don't know what. I updated the landing page content/teaching/bmlip.md with information about the new 2022-23 class and now the menu for 2021-22 and 2022-23 under the teaching tap at biaslab homepage has disappeared. What did I do wrong?

Print part of algo

In one of the notebooks, I open up the generated algorithm. However, if the cell doesn't encapsulate the output (i.e. give you a scroll bar), the notebook's length increases dramatically.

Can we find a specific line in the algo and print only that?

fix Julia code example in prob theory lesson

Please fix the code examples in PT lesson. There is an error talking about WebIO, see attached. I installed WebIO but it still doesnt work. Probably remove the animation to make it work?

  • Note, also fix this for the Bayesian machine learning lesson, and please check the other lessons as well. This seems to be an issue with the @animate feature in my jupyter notebooks. I have no problem with getting rid of the animations if that solves the problem.

Screenshot

Links in README seems to be broken

Links in README for read-only versions of lecture notes seems to be broken. Some can think that links just refer to wrong file names but I noticed this commit d13c9e0 (month ago) which supposed to be a "fix" for this links?

I can see two options here:

  • links were changed incorrectly for some reason
  • links were changed correctly, but corresponding lecture notes are missing

In first case I can make a simple pull request reverting broken changes.

Refactor code example in Gaussian lesson

In teh Gaussian distributions lesson, I see the following piece of code:

Screen Shot 2022-10-11 at 15 07 17

This should really be refactored to cleaner code. For instance:

  1. Don't use a global t inside a function. Rather, pass t as an argument, but in principle the performKalmanStep function should not even need a time index.
  2. Don't hard-code parameter values of a prior in the performKalmanStep function. (e.g. $$\theta \sim N(0,1000)$$)

Please refactor to clean code.

Fix slide render problems on NBviewer

Not all lessons render. Occasionally we'll hit a 404. This is a placeholder issue to track progress towards fixing this issue.

Known culprits:

  • Machine Learning Overview NB

Remove `ipad-notes`?

There are some files in folders that are perhaps outdated. For example, the folder lessons/notebooks/ipad-notes with 1 small pdf. Shall we remove it?

log p(D|m) should be negative

in the code example in the BML lecture (coin toss), we plot $\log p(D|m)$ and obtain positive values. First, it should be negative, so something odd is going on. Secondly, once that is solved, perhaps we should plot $-\log p(D|m)$, which in some literature is called the surprise.

extend coin toss code example with evidence

The code example in the Bayesian ML lesson (https://nbviewer.org/github/bertdv/BMLIP/blob/master/lessons/notebooks/Intelligent-Agents-and-Active-Inference.ipynb) only computes the posterior for the coin toss.

I have updated the class and derived an expression for both the posterior and evidence.

I would like to extend this example and include model comparison into the code.

So, let's extend the code to:

model 1: prior beta(1,1)
model 2: prior beta(5,1)

plot both posteriors as before but also evidence for both models.

Show parts of MCMCChain

Currently, I'm using the following command to inspect the MCMC chain in the HMM notebook.

describe(chain)

However, this produces a lot of output. I actually just want to inspect the chains for some of the latter states. I need to find a way of indexing the chain, something like:

describe(chain[:x_40 : :x_50])

Legend entry for contour plots

The label= keyword argument in contour is not responding.

MWE:

using Distribution
using Plots
pyplot()

x1 = -5:.1:5
x2 = -5:.1:5

contour(x1, x2, (x1, x2) -> pdf(MvNormal([0., 0.], [1. 0.;0. 1.]), [x1, x2]), label="a")

I'm getting a warning when I try this in the commandline: UserWarning: The following kwargs were not used by contour: 'label'

It seems Julia is ignoring this particular keyword argument. Anyone have any experience with this?

get rid of animation in Bayesian machine learning lesson

lesson: Bayesian evolution of ๐‘(๐œ‡|๐ท) for the coin toss

In the simulation Bayesian evolution of ๐‘(๐œ‡|๐ท) for the coin toss lets get rid of the animation and replace the code by code that generates four small plots that shows the evolution of the posterior, eg after 0, 1, 5, 50 tosses.

Update Project.toml

Is the Project.toml file up to date? I may not understand how Project.toml (and I m sorry if i say nonsense here) but I see dependency on ForneyLab (shouldn't this be removed?), and no dependency on reactiveMP

Screen Shot 2022-10-11 at 15 00 24

Also, in the Gaussian distributions lesson, I see a dependency on the hCubature package, and get an error, but I don't see the hCubature package listed in Project.toml

Screen Shot 2022-10-11 at 15 03 43

In teh Discriminative classification lesson, I get an error since teh Optim package is not found:

Screen Shot 2022-10-11 at 17 17 48

In principle, the notebooks should run for anybody who has installed Julia.
Please update the Project.toml file.

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.