Using time series analysis by prophet

 I got the dataset from Kaggle for practicing time series analysis. 

 https://www.kaggle.com/felixzhao/productdemandforecasting  

This dataset includes historical product demand by products and warehouses between 2011 and 2017. 

I used time series analysis in Incorta notebooks using Facebook Prophet. The Prophet library is designed to make predictions on univariate time series data sets. It is easy to use and is designed to automatically find a good set of hyperparameters for the model, and make proficient predictions on data with the trend and seasonal structure. 

First, I put the dataset into Spark, and then converted it into a Pandas data frame, and used the Prophet model to train the data. 


The picture below is displayed on Incorta's dashboard, we can see the successful prediction of the 2018 trend.

In this Prophet model, the challenge I encountered was that I had no way to save prophet.fit(monthly_npdf), so I can only predict the order demand for one product for now.

Using the Prophet library, I successfully predicted the data. In the next blog, I will describe how to use the pickle library to save the model and use the model in a separate Incorta MV.  https://suziepyspark.blogspot.com/2021/03/using-pickle-to-save-model-in-incorta.html


Reference: 

Brownlee, Jason. "Time Series Forecasting With Prophet In Python". Machine Learning Mastery, 2021, https://machinelearningmastery.com/time-series-forecasting-with-prophet-in-python/.


Comments

Popular posts from this blog

How to create histogram in Incorta use bin function.

Using Github to version and manage notebooks(Jupyter notebooks)

Using Incorta and PySpark Linear Regression ML package to predict eCommerce Customer