Skip to content

Instantly share code, notes, and snippets.

@bdatko
bdatko / MPE_and_MAP.ipynb
Last active September 10, 2023 18:25
playing around with MPE and MAP queries using pyAgrum
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bdatko
bdatko / sdp.ipynb
Created July 3, 2023 01:01
same-decision probability using pyAgrum
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bdatko
bdatko / pyAgrum_EM_algorithm.ipynb
Last active July 1, 2023 23:37
proof of concept for EM algorithm using pyAgrum
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bdatko
bdatko / bayesian_network_multinomial.ipynb
Last active July 1, 2023 22:56
Creating a multinomial with a discrete Bayesian network using pyAgrum
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bdatko
bdatko / sum_to_one_node.ipynb
Created July 1, 2023 22:38
Show casing a sum-to-one constraint node using a discrete Bayesian network with pyAgrum
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bdatko
bdatko / factorizing.py
Created July 1, 2023 19:07
All Factorizing Joint Distributions
from itertools import permutations
def chain_rule(permutation):
"""Compute factorization for a given permutation of variables."""
n = len(permutation)
if n == 1:
return [f'P({permutation[0]})']
else:
conditional = ','.join(permutation[1:])
return [f'P({permutation[0]}|{conditional})'] + chain_rule(permutation[1:])
@bdatko
bdatko / beta_reparameterization_coin.ipynb
Last active July 18, 2022 01:36
pyAgrum inference of the bias of a coin from observed coin flips using a re-parameterization of the Beta distribution
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bdatko
bdatko / potential_fillWith.ipynb
Created July 18, 2022 01:15
playing around with pyAgrum potentials
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bdatko
bdatko / filling_cpt_beta.ipynb
Created July 18, 2022 00:14
filling conditional probability tables, broadcasting, and tensors
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bdatko
bdatko / reparameterize_beta.ipynb
Created July 17, 2022 01:05
playing around with reparam beta distribution in pyAgrum
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.