Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Generated by roxygen2: do not edit by hand

S3method(plot,edObject)
S3method(predict,NeuralNetwork)
S3method(predict,UnivariateForecast)
S3method(print,edObject)
export(buildEDModel)
export(detectEvents)
Expand Down
2 changes: 1 addition & 1 deletion R/detectEvents.R
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ if(length(eventPositions>0))
}

model_name <- function(x, ...){
sub("forecast_", "", class(x)[1])
sub("forecast_", "", tail(class(x),1))
}

#' Print an Event Detection Object
Expand Down
1 change: 1 addition & 0 deletions R/model_Forecast.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ model_UnivariateForecast <- function(x, strName, control){
#' @return predicted value
#' @import stats
#' @keywords internal
#' @exportS3Method predict UnivariateForecast
predict.UnivariateForecast <- function(object,newData = NULL, ...){
## How many points shall be predicted into the future? Default = 10
if(!is.null(newData)){
Expand Down
2 changes: 1 addition & 1 deletion R/model_NeuralNetwork.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ control$threshold <- NULL
#'



#' @exportS3Method predict NeuralNetwork
predict.NeuralNetwork <- function(object,newData = NULL, ...){
## How many points shall be predicted into the future? Default = 10
if(!is.null(newData)){
Expand Down
6 changes: 2 additions & 4 deletions tests/testthat/test-eventClassification.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ test_that("print works",
buildModelAlgo = "ForecastArima")

printRes <- capture.output(print(ed))
expect_equal(printRes[1], "Event Detection Object with 11 ARIMA submodels")
expect_equal(printRes[1], "Event Detection Object with 11 Arima submodels")

ed$modelList <- ed$modelList[1]
printRes <- capture.output(print(ed))
expect_equal(printRes[1], "Event Detection Object with 1 ARIMA submodel")
expect_equal(printRes[1], "Event Detection Object with 1 Arima submodel")

ed$modelList <- NULL
printRes <- capture.output(print(ed))
Expand Down Expand Up @@ -89,5 +89,3 @@ test_that("neural network prediction works",


})