# Generate example data
set.seed(123)
y <- c(rnorm(100),rnorm(100,5))
g <- rep(1:2,rep(100,2))
plot(y,col=g)
# Fitting fiSAN via variational inference
est <- fit_fiSAN(y,g,vi_param= list(n_runs = 10))
est
summary(est)
# Estimate posterior atoms and weights
G <- estimate_G(est)
summary(G)
Run the code above in your browser using DataLab