Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using the CAVI algorithm on a (Bayesian) GMM example | |
library(mvtnorm) # for multivariate normal density | |
library(extraDistr) # for Categorical distribution | |
library(pracma) # for 2d-integral, sqrtm | |
library(matlib) # for solving linear equations | |
library(ggplot2) # for plotting | |
# Hyper Parameters | |
sigma = 3 # Variance of mu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Expectation Maximization - Gaussian Mixture Model | |
library(ks) # for kde | |
library(mvtnorm) # for MVNormal | |
library(extraDistr) # for Categorical & Dirichlet distribution | |
library(ggplot2) # for plotting | |
library(pracma) # for sqrtm | |
###################### | |
# 1D, 2-components # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(gganimate) | |
library(plotly) | |
########### | |
# General # | |
########### | |
# Set the Kenrel function | |
# Uniform Kernel | |
f = function(u) as.numeric((u<=0.5) & (u>=-0.5)) | |
# Normal Kernel |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder