Time series - can I use any other factor like any numeric factor except date and time for a time series



I have a dataset regrading fees charged for hotel rooms for a period of days mostly 7 - majority of the values have hotel booked for 7 days only and few values have 3 or 2 .

I kind of quite new to Time series and it may sound silly but I have these basic questions.

Can I use other factors like type of rooms(deluxe, super deluxe encoded into 0 and 1) along with data taken out of date such as day, month, wday, ordinal date into building a time series.?

How can I make the time series uniform as some values have days booked for 2 or 3 days where majority have 7 days.

The data provided is actual booking data of the rooms and I am now considering taking different rooms seperately in a time series to build a forecast for each of the rooms.

Please I would appreciate if anyone can throw light on same clearly to help me build a solution for it.


Hi @jatin_raina,

Yes, you can take other features as well while building a time series model. Use the new features along with the data taken out of date and build a regression model. This will help you to get better predictions.

For making a time series model, you have to make your time series stationary, i.e. its mean, variance and covariance should not be a function of time. You can make the time series stationary using differencing. To learn further on how to check the stationarity and make a series stationary, you can refer the below article:


so i can simply consider all the features along with time variables to make it a simple regression problem and it would capture time trends as well so it would mean all I have to do is build a regrssion solution without worrying for gaps like no of days being booked -


Hi @jatin_raina,

This is one approach of solving the problem. Regression model might not give you very accurate predictions for a time series. So, this is just a start point. To make the predictions accurate, you can use models like ARIMA, Holt’s winters method as mentioned in the article. These models will consider the trend and seasonality(if any) automatically and give you better predictions.


in the article the dates are at a proper gap and we are checking for stationarity in target variable and here in my case gaps - difference between two dates is not same - it has booking for diff days for 2, 1, 14 and majorly has week bookings . so that a issue with the time series .


Hi @jatin_raina,

Time series is the collection of data points at a regular time interval and in your case the time interval is not uniform, so you can solve it as a regression problem instead of using time series models.


that is the main issue I was having trouble with since gaps between dates is not uniform.Thanks pulkit thanx a ton for your advice, will msg you for further advice.