先知模型 facebook_使用Facebook先知进行犯罪率预测

这篇博客介绍了如何利用Facebook的先知(Prophet)模型进行犯罪率预测。通过Python实现,该模型展示了在数据科学领域,特别是机器学习和人工智能中,时间序列分析的应用。
摘要由CSDN通过智能技术生成

先知模型 facebook

Time series prediction is one of the must-know techniques for any data scientist. Questions like predicting the weather, product sales, customer visit in the shopping center, or amount of inventory to maintain, etc - all about time series forecasting, making it a valuable addition to a data scientist’s skillsets.

时间序列预测是任何数据科学家都必须了解的技术之一。 诸如预测天气,产品销售,购物中心的顾客来访或要维护的库存量之类的问题都与时间序列预测有关,这使其成为数据科学家技能的宝贵补充。

In this article, I will introduce how to use Facebook Prophet to predict the crime rate in Chicago. Split into 5 parts:

在本文中,我将介绍如何使用Facebook Prophet预测芝加哥的犯罪率。 分为5部分:

1. Prophet Introduction

1.先知介绍

2. EDA

2. EDA

3. Data processing

3.数据处理

4. Model prediction

4.模型预测

5. Takeaways

5.外卖

Let’s begin the journey.

让我们开始旅程。

1. Prophet Introduction

1.先知介绍

In 2017, Facebook Core Data Science Team open-sourced Prophet. As stated on its Github page, Prophet is:

2017年,Facebook核心数据科学团队开源了Prophet。 如其Github页所述,先知是:

  • a procedure for forecasting time series data;

    预测时间序列数据的程序;
  • based on additive models;

    基于加性模型;
  • fit non-linear trends with yearly, weekly, and daily seasonality, plus holiday effect.

    使非线性趋势与每年,每周和每天的季节性相适应,再加上假期影响。

Prophet uses a decomposable model with three main components, including trend, seasonality, and holidays, as combined below:

先知使用具有三个主要组成部分的可分解模型,包括趋势,季节性和假日,如下所示:

Image for post

Where:

哪里:

  • g(t) is the trend function which models non-periodic changes;

    g(t)是模拟非周期性变化的趋势函数;

  • s(t) represents periodic changes (e.g., weekly and yearly seasonality);

    s(t)代表周期性变化(例如,每周和每年的季节性变化);

  • h(t) represents the effects of holidays which occur on potentially irregular schedules;

    h(t)表示假期可能在不定期的时间表上发生的影响;

  • the error term represents any idiosyncratic changes which are not accommodated by the model.

    错误项表示模型不适应的任何特有变化。

So using time as a regressor, Prophet tries to fit linear and non-linear functions of time as components. In effect, Prophet frames the forecasting problem as a curve-fitting exercise, instead of looki

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值