Many businesses are interested in knowing the utilization of conference rooms at their premises. Audio devices in these conference rooms can be used to measure that utilization. When plotted, the audio activity detected by the microphone shows a bimodal characteristic with one mode representing when room is occupied and the other mode when room is not occupied. Here, I show an image of a bimodal graph generated through R-code.
Here is the R-code:
x <- c(rnorm(5000,1,1),rnorm(10000,9,1))
ggplot(data.frame(x=x))+geom_density(aes(x=x))
Our goal is to identify the mean and standard deviation of each mode. Following R code will tell the mean, standard deviation and proportion of data belonging to each node.
set.seed(50)
> bimodal <- normalmixEM(x, k = 2)
number of iterations= 9
> bimodal$mu
[1] 0.9992427 9.0070292
> bimodal$sigma
[1] 0.9922105 0.9964136
> bimodal$lambda
[1] 0.3332021 0.6667979
>

Comments
Post a Comment