Forum Discussion
predictive analytics
can you please tell me wat function i need to create?
I have the data for july month1 to 31 (data is about tickets).
i want to predict the no of tickets for next month.
below are the code which i executed.
i cretaed a measure called count_id. created_time is the field(date)
library(forecast)
data2<-data.frame(dataset)
# group searches by date
dataset <- aggregate(Count_Id ~Created_Time , data = data2, FUN= sum)
summary(dataset)
# create a time series based on day of week
ts <- ts(data2$Count_Id, frequency=4)
# pull out the seasonal, trend, and irregular components from the time series (train the forecast model)
decom <- stl(ts, s.window = "periodic")
# predict the next 7 days of searches
pred <- forecast(decom, h = 3)
# plot the predicted searches
plot(pred)