[Depmix-commits] r513 - pkg/depmixS4/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Mar 30 12:44:05 CEST 2012


Author: ingmarvisser
Date: 2012-03-30 12:44:05 +0200 (Fri, 30 Mar 2012)
New Revision: 513

Modified:
   pkg/depmixS4/R/EM.R
Log:
Made generation of gamma values to lead to more extreme values.

Modified: pkg/depmixS4/R/EM.R
===================================================================
--- pkg/depmixS4/R/EM.R	2012-03-29 10:02:43 UTC (rev 512)
+++ pkg/depmixS4/R/EM.R	2012-03-30 10:44:05 UTC (rev 513)
@@ -42,7 +42,7 @@
 		nr <- sum(ntimes(object))
 		#gamma <- matrix(runif(nr*ns,min=.0001,max=.9999),nrow=nr,ncol=ns)
 		#gamma <- matrix(rbeta(nr*ns,alpha=.1,beta=.1),nrow=nr,ncol=ns)
-		gamma <- rdirichlet(nr,alpha=rep(.1,ns))
+		gamma <- rdirichlet(nr,alpha=rep(.01,ns))
 		#gamma <- gamma/rowSums(gamma)
 		LL <- -1e10
 		
@@ -156,7 +156,7 @@
 		nr <- sum(ntimes(object))
 		#gamma <- matrix(runif(nr*ns,min=.0001,max=.9999),nrow=nr,ncol=ns)
 		#gamma <- gamma/rowSums(gamma)
-		gamma <- rdirichlet(nr,alpha=rep(.1,ns))
+		gamma <- rdirichlet(nr,alpha=rep(.01,ns))
 		LL <- -1e10
 		
 		for(i in 1:ns) {



More information about the depmix-commits mailing list