diff --git a/DESCRIPTION b/DESCRIPTION index 3032744..58e8759 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -55,11 +55,11 @@ Maintainer: Victor Maus LazyData: true RoxygenNote: 5.0.1 Collate: + 'class-crossValidation.R' 'class-twdtwTimeSeries.R' 'class-twdtwMatches.R' 'class-twdtwRaster.R' 'createPatterns.R' - 'crossValidation.R' 'data.R' 'dtw.R' 'dwtSat.R' @@ -85,7 +85,6 @@ Collate: 'resampleTimeSeries.R' 'subset.R' 'twdtw.R' - 'twdtwAccuracy.R' 'twdtwApply.R' 'twdtwClassify.R' 'zzz.R' diff --git a/R/twdtwAccuracy.R b/R/twdtwAccuracy.R deleted file mode 100644 index 9f2dc64..0000000 --- a/R/twdtwAccuracy.R +++ /dev/null @@ -1,49 +0,0 @@ -############################################################### -# # -# (c) Victor Maus # -# Institute for Geoinformatics (IFGI) # -# University of Muenster (WWU), Germany # -# # -# Earth System Science Center (CCST) # -# National Institute for Space Research (INPE), Brazil # -# # -# # -# R Package dtwSat - 2016-08-12 # -# # -############################################################### - - -#' @title class "twdtwAccuracy" -#' @name twdtwAccuracy-class -#' @aliases twdtwAccuracy -#' @author Victor Maus, \email{vwmaus1@@gmail.com} -#' -#' @description This class stores the cross-validation. -#' -#' @param object an object of class \code{\link[dtwSat]{twdtwRaster}}. -#' -#' @param x an object of class \code{\link[base]{data.frame}}. -#' -#' @seealso -#' \code{\link[dtwSat]{createPatterns}}, and -#' \code{\link[dtwSat]{twdtwApply}}. -#' -#' @section Slots : -#' \describe{ -#' \item{\code{samples}:}{A data frame with mapped and reference classes.} -#' \item{\code{accuracy}:}{A list with the accuracy metrics.} -#' } -#' -#' @examples -#' \dontrun{ -#' -#' } -NULL - -df = do.call("rbind", lapply(twdtw_res[], function(xx) xx[which.min(xx$distance),]) ) - -data = data.frame(.adjustFactores(ref, pred), df[,!names(df)%in%"labels"]) -# error.matrix = table(Predicted=data$Predicted, Reference=data$Reference) - - - diff --git a/man/getTimeSeries.Rd b/man/getTimeSeries.Rd index 81d94aa..183ffba 100644 --- a/man/getTimeSeries.Rd +++ b/man/getTimeSeries.Rd @@ -28,22 +28,21 @@ \item{labels}{character vector with time series labels. For signature \code{\link[dtwSat]{twdtwRaster}} this argument can be used to set the -labels for each \code{sample}, or it can be combined with \code{id.labels} +labels for each sample in \code{y}, or it can be combined with \code{id.labels} to select samples with a specific label.} \item{y}{a \code{\link[base]{data.frame}} whose attributes are: longitude, latitude, the start ''from'' and the end ''to'' of the time interval for each sample. This can also be a \code{\link[sp]{SpatialPointsDataFrame}} whose attributes are the start ''from'' and the end ''to'' of the time interval. -If missing ''from'' and/or ''to'', their are set to the time range of the object -\code{object}. As additional attribute of \code{samples} can be used as labels -for each sample. See \code{id.labels}.} +If missing ''from'' and/or ''to'', they are set to the time range of the +\code{object}.} \item{proj4string}{projection string, see \code{\link[sp]{CRS-class}}. Used -if \code{samples} is a \code{\link[base]{data.frame}}.} +if \code{y} is a \code{\link[base]{data.frame}}.} -\item{id.labels}{a numeric or character with an attribute of \code{samples} to -be used as labels of the samples. Optional.} +\item{id.labels}{a numeric or character with an column name from \code{y} to +be used as samples labels. Optional.} } \value{ An object of class \code{\link[dtwSat]{twdtwTimeSeries}}. diff --git a/man/plotCrossValidation.Rd b/man/plotCrossValidation.Rd index cb28b0a..67815a0 100644 --- a/man/plotCrossValidation.Rd +++ b/man/plotCrossValidation.Rd @@ -4,10 +4,13 @@ \alias{plotCrossValidation} \title{Plotting cross-validation} \usage{ -plotCrossValidation(x) +plotCrossValidation(x, conf.int = 0.95) } \arguments{ \item{x}{An object of class \code{\link[dtwSat]{plotCrossValidation}}.} + +\item{conf.int}{confidence level (0-1) for interval estimation of the population mean. +for details see \code{\link[Hmisc]{smean.cl.normal}}.} } \value{ A \link[ggplot2]{ggplot} object. @@ -49,7 +52,7 @@ cross_validation = twdtwCrossValidation(field_samples_ts, times=3, p=0.1, summary(cross_validation) -plot(cross_validation) +plot(cross_validation, conf.int=.99) } diff --git a/man/twdtwCrossValidation-class.Rd b/man/twdtwCrossValidation-class.Rd index 1c04256..62aff18 100644 --- a/man/twdtwCrossValidation-class.Rd +++ b/man/twdtwCrossValidation-class.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/crossValidation.R, R/methods.R +% Please edit documentation in R/class-crossValidation.R, R/methods.R \docType{methods} \name{twdtwCrossValidation-class} \alias{show,twdtwCrossValidation-method}