How to set limits on STLF forecast in R I'm running a STLF forecast against a daily rain dataset (8103 tuples). The column i'm trying to forecast is composed of 0's (no rain) and 1's (rain).
Here is the coded i'm running:
train <- df_zero %>%
  filter_index(. ~ "2019-12-31")

validation <- df_zero %>%
  filter_index("2019-12-31" ~ .)

stlf_model <- stlf(ts(train$choveuHoje, frequency=365), s.window=365, biasadj=TRUE)
fc_stlf <- forecast(stlf_model, biasadj=TRUE)
plot(fc_stlf)
RMSE(fc_stlf$mean, validation)

The resulting forecast:

biasadj=TRUE did not work.
Two questions:

*

*Is it possible to limit the predicted values to be higher than zero?

*Is using RMSE(fc_stlf$mean, validation) a viable way to evaluate the model?


+1 to Rob's answer.
To your second question: yes, the RMSE is probably precisely the error measure you want. It will be minimized in expectation by an unbiased prediction of the probability of rain. If you used something like the Mean Absolute Error, you will get a model and forecast biased towards the majority class (Kolassa, 2020), and typically a flat zero forecast will look like it performs "best". This is a very common trap for the unwary in intermittent demand forecasting, but of course also occurs when you forecast binary time series.
