diff --git a/R/plotMapSamples.R b/R/plotMapSamples.R index b672314..40359fb 100644 --- a/R/plotMapSamples.R +++ b/R/plotMapSamples.R @@ -34,12 +34,13 @@ plotMapSamples = function(x, samples="all", ...){ incorrect = x@data[x@data$Predicted != x@data$Reference, ]) gp = plot(x@map, type="maps") + df = data.frame(x.sp) df$variable = gp$data[match(df$Period, gp$data$rast.layer),"variable"] df$variable = as.numeric(format(as.Date(df$to), "%Y")) - gp = gp + geom_point(data = df, aes_string(x = "longitude", y = "latitude", shape = "*")) + + gp = gp + geom_point(shape = 1, data = df, aes_string(x = "longitude", y = "latitude")) + scale_shape(solid = FALSE) gp diff --git a/R/twdtwApply.R b/R/twdtwApply.R index 267e8b2..ae7769b 100644 --- a/R/twdtwApply.R +++ b/R/twdtwApply.R @@ -172,8 +172,7 @@ twdtwApply.twdtwTimeSeries = function(x, y, weight.fun, dist.method, step.matrix #' log_fun = weight.fun=logisticWeight(-0.1,50) #' #' r_twdtw = twdtwApply(x=rts, y=patt, weight.fun=log_fun, breaks=time_interval, -#' filepath="~/test_twdtw", overwrite=TRUE, format="GTiff", mc.cores=3, -#' chunk.size=1000) +#' filepath="~/test_twdtw", overwrite=TRUE, format="GTiff") #' #' plot(r_twdtw, type="distance") #' diff --git a/R/twdtwAssess.R b/R/twdtwAssess.R index 2598126..4d823c0 100644 --- a/R/twdtwAssess.R +++ b/R/twdtwAssess.R @@ -111,7 +111,7 @@ setGeneric("twdtwAssess", #' plot(twdtw_assess, type="area") #' plot(twdtw_assess, type="map", samples = "all") #' plot(twdtw_assess, type="map", samples = "incorrect") -#' +#' plot(twdtw_assess, type="map", samples = "correct") #' #' # Create latex tables #' twdtwXtable(twdtw_assess, table.type="matrix") @@ -359,11 +359,11 @@ twdtwAssess.twdtwRaster = function(object, y, labels, id.labels, proj4string, co # Accuracy UA = as.numeric(diag(as.matrix(prop_matrix[cnames,cnames])) / prop_matrix[cnames,"Total"]) - UA[total_map==0] = 1 + # UA[total_map==0] = 1 names(UA) = cnames PA = as.numeric(diag(as.matrix(prop_matrix[cnames,cnames])) / prop_matrix["Total",cnames]) - PA[total_ref==0] = 1 + # PA[total_ref==0] = 1 names(PA) = cnames OA = sum(diag(as.matrix(prop_matrix[cnames,cnames])), na.rm = TRUE) diff --git a/data/MOD13Q1.MT.yearly.patterns.RData b/data/MOD13Q1.MT.yearly.patterns.RData index f8ccb8e..372833d 100644 Binary files a/data/MOD13Q1.MT.yearly.patterns.RData and b/data/MOD13Q1.MT.yearly.patterns.RData differ