Giter Club home page Giter Club logo

htsprophet's People

Contributors

collinrooney12 avatar rayz90 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

htsprophet's Issues

runHTS.py does not work

When trying to run the example script I get the following error:

INFO:matplotlib.font_manager:font search path ['/opt/conda/lib/python3.6/site-packages/matplotlib/mpl-data/fonts/ttf', '/opt/conda/lib/python3.6/site-packages/matplotlib/mpl-data/fonts/afm', '/opt/conda/lib/python3.6/site-packages/matplotlib/mpl-data/fonts/pdfcorefonts']
INFO:matplotlib.font_manager:generated new fontManager

TypeError Traceback (most recent call last)
in
44 # NOTE: CVselect takes a while, so if you want results in minutes instead of half-hours pick a different method
45 ##
---> 46 myDict = hts(data2, 52, nodes, holidays = holidays, method = "FP", transform = "BoxCox")
47 ##
48 # This output is a dictionary of dataframes, so you can do any further analysis that you may want. It also allows you to plot the forecasts.

/opt/conda/lib/python3.6/site-packages/htsprophet/hts.py in hts(y, h, nodes, method, freq, transform, include_history, cap, capF, changepoints, n_changepoints, yearly_seasonality, weekly_seasonality, holidays, seasonality_prior_scale, holidays_prior_scale, changepoint_prior_scale, mcmc_samples, interval_width, uncertainty_samples, skipFitting, numThreads)
270 ynew = fitForecast(y, h, sumMat, nodes, method, freq, include_history, cap, capF, changepoints, n_changepoints,
271 yearly_seasonality, weekly_seasonality, holidays, seasonality_prior_scale, holidays_prior_scale,
--> 272 changepoint_prior_scale, mcmc_samples, interval_width, uncertainty_samples, boxcoxT, skipFitting)
273 ##
274 # Inverse boxcox the data

/opt/conda/lib/python3.6/site-packages/htsprophet/fitForecast.py in fitForecast(y, h, sumMat, nodes, method, freq, include_history, cap, capF, changepoints, n_changepoints, yearly_seasonality, weekly_seasonality, holidays, seasonality_prior_scale, holidays_prior_scale, changepoint_prior_scale, mcmc_samples, interval_width, uncertainty_samples, boxcoxT, skipFitting)
72 growth = 'linear'
73 m = Prophet(growth, changepoints1, n_changepoints1, yearly_seasonality, weekly_seasonality, holidays, seasonality_prior_scale,
---> 74 holidays_prior_scale, changepoint_prior_scale, mcmc_samples, interval_width, uncertainty_samples)
75 else:
76 growth = 'logistic'

/opt/conda/lib/python3.6/site-packages/fbprophet/forecaster.py in init(self, growth, changepoints, n_changepoints, changepoint_range, yearly_seasonality, weekly_seasonality, daily_seasonality, holidays, seasonality_mode, seasonality_prior_scale, holidays_prior_scale, changepoint_prior_scale, mcmc_samples, interval_width, uncertainty_samples)
140 self.component_modes = None
141 self.train_holiday_names = None
--> 142 self.validate_inputs()
143
144 def validate_inputs(self):

/opt/conda/lib/python3.6/site-packages/fbprophet/forecaster.py in validate_inputs(self)
147 raise ValueError(
148 "Parameter 'growth' should be 'linear' or 'logistic'.")
--> 149 if ((self.changepoint_range < 0) or (self.changepoint_range > 1)):
150 raise ValueError("Parameter 'changepoint_range' must be in [0, 1]")
151 if self.holidays is not None:

TypeError: '<' not supported between instances of 'str' and 'int'

can the nodes values not be same ?

in your post the nodes has this structure :[[3],[2,2,2],[4,4,4,4,4,4]] which is a strict rules
in general we will have bottom layer not same leaf values

like [[3],[2,1,3],[4,1,1,1,1,4]] ?? can this be possible ???

Already have forecasts how to generate a set of revised forecasts that would aggregate consistently with the hierarchical structure

I already generated independent base forecast for each series in the hierarchy, As these base forecasts are independently generated they will not be aggregate consistent" (i.e.,
they will not add up according to the hierarchical structure).I just want to generates a
set of revised forecasts that would aggregate consistently with the hierarchical structure. Can use you py funciton? I looking forward to hearing from u , thanks

Problem dataframe

d = {'Total': [100],'GP48_1': [100], 'GP48_2': [100]
, 'GP48_1_GP48_cogenpct': [100], 'GP48_1_GP48_coalpct': [100]
, 'GP48_1_GP48_CCpct': [100], 'GP48_2_GP48_windpct': [100]
, 'GP48_2_GP48_biomasspct': [100],'GP48_2_GP48_thermosolarpct': [100]
, 'GP48_2_GP48_PVpct': [100], 'GP48_2_GP48_nuclearpct': [100]
, 'GP48_2_GP48_hydrototalpct': [100]
}
capDataset=pd.DataFrame(d,columns=['Total','GP48_1', 'GP48_2', 'GP48_1_GP48_cogenpct', 'GP48_1_GP48_coalpct',
'GP48_1_GP48_CCpct', 'GP48_2_GP48_windpct', 'GP48_2_GP48_biomasspct', 'GP48_2_GP48_thermosolarpct',
'GP48_2_GP48_PVpct', 'GP48_2_GP48_nuclearpct', 'GP48_2_GP48_hydrototalpct'])

pred = hts(data3, 1, nodes, method = "BU",cap=100,capF=capDataset)

Issue With runHTS.py

Hi,

Seems to be a bug when running runHTS.py in python 3. There is an issue with holidays producing ValueError: holidays must be a DataFrame with 'ds' and 'holiday' columns, despite it being clearly defined.

Breaks with fbprophet 0.2 update

Hi Collin, great work, wanted to point out the fit function breaks with our without holidays input with an error related to holidays dataframe.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.