fbprophet免安装包.zip
fbprophet免安装包, 如图为作者将服务器中的fbprophet包直接拷贝到Win10系统中,经测试有效。
有需要的直接百度云下载就可以了,下载后解压到python的包的路径下“site-packages”这个文件夹下面
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-08-02 15:06 fbprophet-0.5.dist-info
文件 4 2019-08-02 15:06 fbprophet-0.5.dist-infoINSTALLER
文件 953 2019-08-02 15:06 fbprophet-0.5.dist-infometaDATA
文件 629 2019-08-02 15:06 fbprophet-0.5.dist-infoPKG-INFO~
文件 2088 2019-08-02 15:06 fbprophet-0.5.dist-infoRECORD
文件 11 2019-08-02 15:06 fbprophet-0.5.dist-info op_level.txt
文件 93 2019-08-02 15:06 fbprophet-0.5.dist-infoWHEEL
目录 0 2019-08-02 15:06 fbprophet
文件 369 2019-08-02 15:05 fbprophet\__init__.py
目录 0 2019-08-02 15:06 fbprophet\__pycache__
文件 222 2019-08-02 15:06 fbprophet\__pycache__\__init__.cpython-35.pyc
文件 12845 2019-08-02 15:06 fbprophet\__pycache__diagnostics.cpython-35.pyc
文件 48035 2019-08-02 15:06 fbprophet\__pycache__forecaster.cpython-35.pyc
文件 29347 2019-08-02 15:06 fbprophet\__pycache__hdays.cpython-35.pyc
文件 1937 2019-08-02 15:06 fbprophet\__pycache__make_holidays.cpython-35.pyc
文件 624 2019-08-02 15:06 fbprophet\__pycache__models.cpython-35.pyc
文件 20000 2019-08-02 15:06 fbprophet\__pycache__plot.cpython-35.pyc
文件 15178 2019-08-02 15:05 fbprophetdiagnostics.py
文件 62216 2019-08-02 15:05 fbprophetforecaster.py
文件 42219 2019-08-02 15:05 fbprophethdays.py
文件 2196 2019-08-02 15:05 fbprophetmake_holidays.py
文件 748 2019-08-02 15:05 fbprophetmodels.py
文件 24335 2019-08-02 15:05 fbprophetplot.py
目录 0 2019-08-02 15:05 fbprophetstan_model
文件 25946888 2019-08-02 15:06 fbprophetstan_modelprophet_model.pkl
目录 0 2019-08-02 15:06 fbprophet ests
文件 0 2019-08-02 15:05 fbprophet ests\__init__.py
目录 0 2019-08-02 15:06 fbprophet ests\__pycache__
文件 146 2019-08-02 15:06 fbprophet ests\__pycache__\__init__.cpython-35.pyc
文件 8466 2019-08-02 15:06 fbprophet ests\__pycache__ est_diagnostics.cpython-35.pyc
文件 22197 2019-08-02 15:06 fbprophet ests\__pycache__ est_prophet.cpython-35.pyc
............此处省略4个文件信息
# -*- coding: utf-8 -*-
# Copyright (c) 2017-present Facebook Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
from __future__ import absolute_import division print_function
import logging
from copy import deepcopy
from functools import reduce
import numpy as np
import pandas as pd
logger = logging.getLogger(‘fbprophet‘)
def generate_cutoffs(df horizon initial period):
“““Generate cutoff dates
Parameters
----------
df: pd.Dataframe with historical data.
horizon: pd.Timedelta forecast horizon.
initial: pd.Timedelta window of the initial forecast period.
period: pd.Timedelta simulated forecasts are done with this period.
Returns
-------
list of pd.Timestamp
“““
# Last cutoff is ‘latest date in data - horizon‘ date
cutoff = df[‘ds‘].max() - horizon
if cutoff < df[‘ds‘].min():
raise ValueError(‘Less data than horizon.‘)
result = [cutoff]
while result[-1] >= min(df[‘ds‘]) + initial:
cutoff -= period
# If data does not exist in data range (cutoff cutoff + horizon]
if not (((df[‘ds‘] > cutoff) & (df[‘ds‘] <= cutoff + horizon)).any()):
# Next cutoff point is ‘last date before cutoff in data - horizon‘
if cutoff > df[‘ds‘].min():
closest_date = df[df[‘ds‘] <= cutoff].max()[‘ds‘]
cutoff = closest_date - horizon
# else no data left leave cutoff as is it will be dropped.
result.append(cutoff)
result = result[:-1]
if len(result) == 0:
raise ValueError(
‘Less data than horizon after initial window. ‘
‘Make horizon or initial shorter.‘
)
logger.info(‘Making {} forecasts with cutoffs between {} and {}‘.format(
len(result) result[-1] result[0]
))
return reversed(result)
def cross_validation(model horizon period=None initial=None):
“““Cross-Validation for time series.
Computes forecasts from historical cutoff points. Beginning from
(end - horizon) works backwards making cutoffs with a spacing of period
until initial is reached.
When period is equal to the time interval of the data this is the
technique described in https://robjhyndman.com/hyndsight/tscv/ .
Parameters
----------
model: Prophet class object. Fitted Prophet model
horizon: string with pd.Timedelta compatible style e.g. ‘5 days‘
‘3 hours‘ ‘10 seconds‘.
period: string with pd.Timedelta compatible style. Simulated forecast will
be done at every this period. If not provided 0.5 * horizon is used.
initial: string with pd.Timedelta compatible style. The first training
period will begin h
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-08-02 15:06 fbprophet-0.5.dist-info
文件 4 2019-08-02 15:06 fbprophet-0.5.dist-infoINSTALLER
文件 953 2019-08-02 15:06 fbprophet-0.5.dist-infome
文件 629 2019-08-02 15:06 fbprophet-0.5.dist-infoPKG-INFO~
文件 2088 2019-08-02 15:06 fbprophet-0.5.dist-infoRECORD
文件 11 2019-08-02 15:06 fbprophet-0.5.dist-info op_level.txt
文件 93 2019-08-02 15:06 fbprophet-0.5.dist-infoWHEEL
目录 0 2019-08-02 15:06 fbprophet
文件 369 2019-08-02 15:05 fbprophet\__init__.py
目录 0 2019-08-02 15:06 fbprophet\__pycache__
文件 222 2019-08-02 15:06 fbprophet\__pycache__\__init__.cpython-35.pyc
文件 12845 2019-08-02 15:06 fbprophet\__pycache__diagnostics.cpython-35.pyc
文件 48035 2019-08-02 15:06 fbprophet\__pycache__forecaster.cpython-35.pyc
文件 29347 2019-08-02 15:06 fbprophet\__pycache__hdays.cpython-35.pyc
文件 1937 2019-08-02 15:06 fbprophet\__pycache__make_holidays.cpython-35.pyc
文件 624 2019-08-02 15:06 fbprophet\__pycache__models.cpython-35.pyc
文件 20000 2019-08-02 15:06 fbprophet\__pycache__plot.cpython-35.pyc
文件 15178 2019-08-02 15:05 fbprophetdiagnostics.py
文件 62216 2019-08-02 15:05 fbprophetforecaster.py
文件 42219 2019-08-02 15:05 fbprophethdays.py
文件 2196 2019-08-02 15:05 fbprophetmake_holidays.py
文件 748 2019-08-02 15:05 fbprophetmodels.py
文件 24335 2019-08-02 15:05 fbprophetplot.py
目录 0 2019-08-02 15:05 fbprophetstan_model
文件 25946888 2019-08-02 15:06 fbprophetstan_modelprophet_model.pkl
目录 0 2019-08-02 15:06 fbprophet ests
文件 0 2019-08-02 15:05 fbprophet ests\__init__.py
目录 0 2019-08-02 15:06 fbprophet ests\__pycache__
文件 146 2019-08-02 15:06 fbprophet ests\__pycache__\__init__.cpython-35.pyc
文件 8466 2019-08-02 15:06 fbprophet ests\__pycache__ est_diagnostics.cpython-35.pyc
文件 22197 2019-08-02 15:06 fbprophet ests\__pycache__ est_prophet.cpython-35.pyc
............此处省略4个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)