[Zooimage-commits] r210 - pkg/zooimage/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jun 20 10:36:30 CEST 2012


Author: kevin
Date: 2012-06-20 10:36:30 +0200 (Wed, 20 Jun 2012)
New Revision: 210

Modified:
   pkg/zooimage/R/ZIClass.R
Log:
Modification of predict.ZIClass to accept predictions returned by algorithms included in party package

Modified: pkg/zooimage/R/ZIClass.R
===================================================================
--- pkg/zooimage/R/ZIClass.R	2012-06-20 08:33:41 UTC (rev 209)
+++ pkg/zooimage/R/ZIClass.R	2012-06-20 08:36:30 UTC (rev 210)
@@ -136,7 +136,12 @@
 	if (isTRUE(na.rm)) na.omit(data)
 	
 	if (type != "prob") {
-		Ident <- predict(object, newdata = data, type = type)
+	   # modification to accept algoritms from party package
+	   if (package == "party") {
+            Ident <- predict(object, newdata = data, type = "response", OOB = FALSE)
+		} else {
+            Ident <- predict(object, newdata = data, type = type)
+		}
 	} else {
 		if (inherits(object, "randomForest")) {
 			Ident <- predict(object, newdata = data, type = type)



More information about the Zooimage-commits mailing list