Skip to content

Commit

Permalink
Update to fbprophet 0.4.post2
Browse files Browse the repository at this point in the history
Updated the installation to use the latest version of Facebook Prophet. Solves the issue of incompatibility with new version of numpy.
  • Loading branch information
Nabeel committed Feb 5, 2019
1 parent 236d390 commit 2b8a082
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Qlik-Py-Init.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ echo Installing required packages... & echo.
python -m pip install --upgrade setuptools pip
pip install grpcio grpcio-tools numpy scipy pandas cython
pip install pystan==2.17
pip install fbprophet==0.3.post2
pip install fbprophet
pip install -U scikit-learn
pip install hdbscan
pip install -U skater
Expand Down
2 changes: 1 addition & 1 deletion Qlik-Py-Init.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Write-Output "Installing required packages..."
python -m pip install --upgrade setuptools pip
pip install grpcio grpcio-tools numpy scipy pandas cython
pip install pystan==2.17
pip install fbprophet==0.3.post2
pip install fbprophet
pip install -U scikit-learn
pip install hdbscan
pip install -U skater
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@


## Introduction
Qlik's advanced analytics integration provides a path to making modern algorithms more accessible to the wider business audience. This project is an attempt to show what's possible.
Qlik's advanced analytics integration provides a path to making modern data science algorithms accessible to the wider business audience. This project is an attempt to show what's possible.

This repository provides a server side extension (SSE) for Qlik Sense built using Python. The intention is to provide a set of functions for data science that can be used as expressions in Qlik. Sample Qlik Sense apps are also included and explained so that the techniques shown here can be easily replicated.
This repository provides a server side extension (SSE) for Qlik Sense built using Python. The intention is to provide a set of functions for data science that can be used as expressions in Qlik.

Sample Qlik Sense apps are included and explained so that the techniques shown here can be easily replicated.

The current implementation includes:

Expand Down
8 changes: 4 additions & 4 deletions core/_prophet.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import locale
import numpy as np
import pandas as pd
from fbprophet import Prophet
from fbprophet import Prophet, plot
import _utils as utils
import ServerSideExtension_pb2 as SSE

Expand Down Expand Up @@ -495,7 +495,7 @@ def _forecast(self):
# Prepare the seasonality data frame
# Parameter start needs to be any arbitrary week starting on a Sunday
days = (pd.date_range(start='2017-01-01', periods=7) + pd.Timedelta(days=self.weekly_start))
df_w = self.model.seasonality_plot_df(days)
df_w = plot.seasonality_plot_df(self.model, days)

# Calculate seasonal components
self.forecast = self.model.predict_seasonal_components(df_w)
Expand All @@ -504,7 +504,7 @@ def _forecast(self):
# Prepare the seasonality data frame
# Parameter start needs to be 1st January for any arbitrary year
days = (pd.date_range(start='2017-01-01', periods=365) + pd.Timedelta(days=self.yearly_start))
df_y = self.model.seasonality_plot_df(days)
df_y = plot.seasonality_plot_df(self.model, days)

# Calculate seasonal components
self.forecast = self.model.predict_seasonal_components(df_y)
Expand All @@ -520,7 +520,7 @@ def _forecast(self):
# However, it seems to make more sense to use period given the expected usage in Qlik
intervals = pd.to_datetime(np.linspace(start.value, end.value, period))

df_x = self.model.seasonality_plot_df(intervals)
df_x = plot.seasonality_plot_df(self.model, intervals)

# Calculate seasonal components
self.forecast = self.model.predict_seasonal_components(df_x)
Expand Down
6 changes: 4 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@


## Introduction
Qlik's advanced analytics integration provides a path to making modern algorithms more accessible to the wider business audience. This project is an attempt to show what's possible.
Qlik's advanced analytics integration provides a path to making modern data science algorithms accessible to the wider business audience. This project is an attempt to show what's possible.

This repository provides a server side extension (SSE) for Qlik Sense built using Python. The intention is to provide a set of functions for data science that can be used as expressions in Qlik. Sample Qlik Sense apps are also included and explained so that the techniques shown here can be easily replicated.
This repository provides a server side extension (SSE) for Qlik Sense built using Python. The intention is to provide a set of functions for data science that can be used as expressions in Qlik.

Sample Qlik Sense apps are included and explained so that the techniques shown here can be easily replicated.

The current implementation includes:

Expand Down
2 changes: 1 addition & 1 deletion offline-install/Qlik-Py-Init Offline.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ echo.
echo Installing required packages... & echo.
pip install --no-index --find-links=offline grpcio grpcio-tools numpy scipy pandas cython
pip install --no-index --find-links=offline pystan==2.17
pip install --no-index --find-links=offline fbprophet==0.3.post2
pip install --no-index --find-links=offline fbprophet
pip install --no-index --find-links=offline scikit-learn
pip install --no-index --find-links=offline setuptools wheel hdbscan
pip install --no-index --find-links=offline skater
Expand Down

0 comments on commit 2b8a082

Please sign in to comment.