diff options
author | Suraj Yerramilli | 2016-01-07 00:12:29 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2016-01-07 00:12:29 +0530 |
commit | a1e0b37cfb8390188ce717e974b6cc8a5d007b97 (patch) | |
tree | 69eb36329c29fa95d8ae61b6e64c1a2e4dca86f3 | |
parent | 5db5191b832a850d364ccf8c0b047f36d519b034 (diff) | |
download | SysID-R-code-a1e0b37cfb8390188ce717e974b6cc8a5d007b97.tar.gz SysID-R-code-a1e0b37cfb8390188ce717e974b6cc8a5d007b97.tar.bz2 SysID-R-code-a1e0b37cfb8390188ce717e974b6cc8a5d007b97.zip |
added model nrmse in the legend
-rw-r--r-- | R/predict.R | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/R/predict.R b/R/predict.R index 7e02658..1d1b00c 100644 --- a/R/predict.R +++ b/R/predict.R @@ -77,7 +77,9 @@ compare <- function(data,nahead=1,...){ if(is.null(dots)) stop("No model supplied") Y <- sapply(dots,predict,newdata=data,nahead=nahead) - colnames(Y) <- as.character(input_list) + nrmse <- sapply(dots,FUN = function(x) fitch(x)$FitPer) + colnames(Y) <- paste(as.character(input_list),paste(round(nrmse,2),"%",sep=""), + sep=": ") df <- data.frame(Time = as.numeric(time(data)), Actual=as.numeric(outputData(data)[,1]),Y) meltdf <- melt(df,id="Time") |