sGMRFmix {sGMRFmix} | R Documentation |
Sparse Gaussian Markov Random Field Mixtures
Description
Sparse Gaussian Markov Random Field Mixtures
Usage
sGMRFmix(x, K, rho, kmeans = FALSE, m0 = rep(0, M), lambda0 = 1,
alpha = NULL, pi_threshold = 1/K/100, max_iter = 500, tol = 0.1,
verbose = TRUE)
Arguments
x |
data.frame. A training data. |
K |
integer. Number of mixture components. Set a large enough number because the algorithm identifies major dependency patterns from the data via the sparse mixture model. |
rho |
double. Constant that multiplies the penalty term. An optimal value should be determined together with the threshold on the anomaly score, so the performance of anomaly detection is maximized. |
kmeans |
logical. If TRUE, initialize parameters with k-means method. You should set TRUE for non-time series data. Default FALSE. |
m0 |
a numeric vector. Location parameter of Gauss-Laplace prior. Keep default if no prior information is available. Default 0. |
lambda0 |
double. Coefficient for scale parameter of Gauss-Laplace prior. Keep default if no prior information is available. Default 1. |
alpha |
double. Concentration parameter of Dirichlet prior. Keep default if no prior information is available. Default 1. |
pi_threshold |
double. Threshold to decide a number of states. If pi < pi_threshold, the states are rejected in the sense of sparse estimation. |
max_iter |
integer. Maximum number of iterations. |
tol |
double. The tolerance to declare convergence. |
verbose |
logical. |
Value
sGMRFmix object
Examples
library(sGMRFmix)
set.seed(314)
train_data <- generate_train_data()
fit <- sGMRFmix(train_data, K = 7, rho = 10)
fit