Can i use fb-prophet for multivariate time series forecasting? - time-series

I have dataset with below listed columns. It is monthly dataset.
Run_date
Actauls_Sales
Actual_gross_profit
Actual_Revenue
I need to forecast all 3 values over given time period(lets say for next 1 year), can i use Facebook prophet for above use case ?
Please share your valuable inputs here.

I've recently started working on multivariate time series analysis. You can use fb prophet for multivariate analysis by adding the extra features to the model with the help of add_regressor() method.
Here is the reference.

Related

How can i predict Time Series of more than one product using LSTM?

I made a LSTM model that predict total value per day, but i need to do a forecasting of sales per product. Someone can help me with some example?
This can be helpful: https://unit8co.github.io/darts/examples/01-multi-time-series-and-covariates.html#Training-a-Model-on-Multiple-Time-Series. You can change your code accordingly.

Forecasting Value in time series data with multiple independent variables

I have a data set attributes are (Date, Value, Variable-1, Variable-2, Variable-3, Variable-4, Variable-5), I have 100k plus rows. I wanted to predict the "Value" in the future based on 5 variables trained in time series manners, there will be seasonal trends and low and high scores in "Value". Can someone suggest to me some statistical or machine learning/deep learning solution for this?
Here is Dataset Screenshot, I wanted to forecast Value Variable
This is very interesting problem and you can use "Vector auto regression (VAR)" method to solve this problem. Packages are available in both R and Python to solve this problem.

Impute time series using similar time series

I have a problem where I have a lot of data about 1 year recordings of thermostats where every hour it gives me the mean temperature in that household. But a lot of data is not available due to they only installed the thermostat in the middle of the year or they put out the thermostat for a week or ... But a lot of this thermostat data is really similar. What I want to do is impute the missing data using similar timeseries.
So lets say house A only started in july but from there they are very similar to household B I would want to then use the info from household B to predict what the data dould be before july in house A.
I was thinking about training a Recurrent Neural Network that could do this for me but I am not shure what is out there to do this and when I search for papers and such they almost exclusively work on data sets over multiple years and impute the data using the data of previous years. I do not have this data, so that is not an option.
Does anyone have a clue how to tackle this problem or a refference I could use that solves a similar problem ?
As I understand it you want to impute the data using cross-sectional data rather than time series information.
There are actually quite a lot of imputation packages that can do this for you in R. (if you are using R)
You'd need equally spaced data. So 1 values per hour and if it is not present, then it needs to be NA. So ideally you have then multiple time series of qual length.
Then you merge these time series according to the time stamp / hour.
Afterwards you can apply an imputation package like e.g. mice, missForest, imputeR with basically one line of code. These packages will use the correlations between the different time series to estimate the missing values in these series.

Python - How to predict feature sales value by feeding other parameters? Using LSTM or?

I am new to this Regression world and I have a nerd question, you may say.
Actually I was trying to solve a problem to predict future sales in my organization.
I have collected all the data for last year. My data includes (for each day):
Total Sales(count)
Temperature
Wind Direction
Precipitation
Day of week (i.e 1 or 2 or 3.. or 7)
Whether a working day or not.
etc.
My goal :
1. I will train a model so that if I give the input of all the values of 2 to 7 (i.e of data, of the day that I want to predict, which is neither in test nor test data) and it will give me the predicted value of 1 (i.e Total Sales).
I Tried :
1. 1st I tried with a Univariate LSTM model(i.e with total sales from past one year data, predict the next data). But, I couldn't feed the other data as input.
Then I tried a Multivariate LSTM model, but this would predict all of the data for the next series.
Then I searched for many tutorials to solve the problem. Such as : This video tutorial which uses LSTM for electricity bill consumption, but it only shows the model building and not how to implement it.
I came with another question : from stack overflow. But here, the user seems to be moving to reinforcement learning.
Conclusion : What should i do to solve such problems? How to predict future sales count by feeding the data for that day?

Similarity of trends in time series analysis

I am new in time series analysis. I am trying to find the trend of a short (1 day) temperature time series and tried to different approximations. Moreover, sampling frequency is 2 minute. The data were collocated for different stations. And I will compare different trends to see whether they are similar or not.
I am facing three challenges in doing this:
Q1 - How I can extract the pattern?
Q2 - How I can quantify the trend since I will compare trends belong to two different places?
Q3 - When can I say two trends are similar or not similar?
Q1 -How I can extract the pattern?
You would start by performing time series analysis on both your data sets. You will need a statistical library to do the tests and comparisons.
If you can use Python, pandas is a good option.
In R, the forecast package is great. Start by running ets on both data sets.
Q2 - How I can quantify the trend since I will compare trends belong to two different places?
The idea behind quantifying trend is to start by looking for a (linear) trend line. All stats packages can assist with this. For example, if you are assuming a linear trend, then the line that minimizes the squared deviation from your data points.
The Wikipedia article on trend estimation is quite accessible.
Also, keep in mind that trend can be linear, exponential or damped. Different trending parameters can be tried to take care of these.
Q3 - When can I say two trends are similar or not similar?
Run ARIMA on both data sets. (The basic idea here is to see if the same set of parameters (which make up the ARIMA model) can describe both your temp time series. If you run auto.arima() in forecast (R), then it will select the parameters p,d,q for your data, a great convenience.
Another thought is to perform a 2-sample t-test of both your series and check the p-value for significance. (Caveat: I am not a statistician, so I am not sure if there is any theory against doing this for time series.)
While researching I came across the Granger Test – where the basic idea is to see if one time series can help in forecasting another. Seems very applicable to your case.
So these are just a few things to get you started. Hope that helps.

Resources