[Vegan-commits] r2338 - in pkg/vegan: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Dec 13 16:14:52 CET 2012


Author: jarioksa
Date: 2012-12-13 16:14:52 +0100 (Thu, 13 Dec 2012)
New Revision: 2338

Modified:
   pkg/vegan/R/metaMDSiter.R
   pkg/vegan/inst/ChangeLog
Log:
metaMDS checks harder the convergence in parallel processing

Modified: pkg/vegan/R/metaMDSiter.R
===================================================================
--- pkg/vegan/R/metaMDSiter.R	2012-12-12 17:47:35 UTC (rev 2337)
+++ pkg/vegan/R/metaMDSiter.R	2012-12-13 15:14:52 UTC (rev 2338)
@@ -115,6 +115,9 @@
                     plot(pro)
                 if (stry[[i]]$stress < s0$stress) {
                     s0 <- stry[[i]]
+                    ## New best solution has not converged unless
+                    ## proved later
+                    converged <- FALSE
                     if (trace) 
                         cat("... New best solution\n")
                 }

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2012-12-12 17:47:35 UTC (rev 2337)
+++ pkg/vegan/inst/ChangeLog	2012-12-13 15:14:52 UTC (rev 2338)
@@ -12,6 +12,20 @@
 	to scores beyond those calculated instead of failing, and
 	scores.metaMDS() does not drop dimensions.
 
+	* metaMDS: Iteration sometimes finds a false convergence, or an
+	identical solution to the previous best although a better solution
+	can exist. These are undetected except sometimes in parallel
+	processing. Therefore we first label convergence false when we
+	find a new best solution, and then study if it really
+	converged. This is a rare effect, and can only be seen with
+	parallel processing. An example is
+
+	set.seed(7)
+	metaMDS(BCI, k=4, parallel=2)
+
+	which will converge in run 7 with the old code although run 8
+	would be better, but converges in run 18 with the new code.
+	
 	* nestednodf: added plot() method modelled after
 	plot.nestedtemp().
 	



More information about the Vegan-commits mailing list