{"id":13474251,"url":"https://github.com/linkedin/greykite","last_synced_at":"2025-05-13T20:23:10.246Z","repository":{"id":40515819,"uuid":"362190135","full_name":"linkedin/greykite","owner":"linkedin","description":"A flexible, intuitive and fast forecasting library","archived":false,"fork":false,"pushed_at":"2025-02-20T22:01:53.000Z","size":170958,"stargazers_count":1838,"open_issues_count":12,"forks_count":107,"subscribers_count":39,"default_branch":"master","last_synced_at":"2025-04-28T13:58:41.093Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linkedin.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.rst","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-27T17:05:53.000Z","updated_at":"2025-04-27T15:44:45.000Z","dependencies_parsed_at":"2024-09-21T03:30:35.998Z","dependency_job_id":"763cc0ee-e6e8-4cff-9818-031e48c467aa","html_url":"https://github.com/linkedin/greykite","commit_stats":{"total_commits":22,"total_committers":8,"mean_commits":2.75,"dds":0.7727272727272727,"last_synced_commit":"b6bbba3ea6bee6921ca05832277ce1a9dc7a8144"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkedin%2Fgreykite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkedin%2Fgreykite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkedin%2Fgreykite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkedin%2Fgreykite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linkedin","download_url":"https://codeload.github.com/linkedin/greykite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253908984,"owners_count":21982685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T16:01:10.710Z","updated_at":"2025-05-13T20:23:05.231Z","avatar_url":"https://github.com/linkedin.png","language":"Python","funding_links":[],"categories":["Python","📦 Packages","Time Series","时间序列","Feature Extraction","others"],"sub_categories":["Python","Others","NLP","网络服务_其他","Time Series"],"readme":"﻿Greykite: A flexible, intuitive and fast forecasting and anomaly detection library\n\n.. raw:: html\n\n   \u003cp align=\"center\"\u003e\n   \u003cimg src=\"https://github.com/linkedin/greykite/blob/master/LOGO-C8.png\" width=\"450\" height=\"300\"\u003e\n   \u003c/p\u003e\n\nWhy Greykite?\n-------------\n\nThe Greykite library provides flexible, intuitive and fast forecasts through its flagship algorithm, Silverkite.\n\nSilverkite algorithm works well on most time series, and is especially adept for those with changepoints in trend or seasonality,\nevent/holiday effects, and temporal dependencies.\nIts forecasts are interpretable and therefore useful for trusted decision-making and insights.\n\nThe Greykite library provides a framework that makes it easy to develop a good forecast model,\nwith exploratory data analysis, outlier/anomaly preprocessing, feature extraction and engineering, grid search,\nevaluation, benchmarking, and plotting.\nOther open source algorithms can be supported through Greykite’s interface to take advantage of this framework,\nas listed below.\n\nGreykite AD (Anomaly Detection) is an extension of the Greykite Forecasting library. It provides users with an interpretable, \nfast, robust and easy to use interface to monitor their metrics with minimal effort.\n\nGreykite AD improves upon the out-of-box confidence intervals generated by Silverkite, by automatically tuning the confidence intervals \nand other filters (e.g. based on ``APE``) using expected alert rate information and/ or anomaly labels, if available. \nIt allows the users to define robust objective function, constraints and parameter space to optimize the confidence intervals. \nFor example user can target a minimal recall level of 80% while maximizing precision. Additionally, the users can specify a \nminimum error level to filter out anomalies that are not business relevant. The motivation to include criteria other than \nstatistical significance is to bake in material/ business impact into the detection.\n\nFor a demo, please see our `quickstart \u003chttps://linkedin.github.io/greykite/get_started\u003e`_.\n\nDistinguishing Features\n-----------------------\n\n* Flexible design\n    * Provides time series regressors to capture trend, seasonality, holidays,\n      changepoints, and autoregression, and lets you add your own.\n    * Fits the forecast using a machine learning model of your choice.\n* Intuitive interface\n    * Provides powerful plotting tools to explore seasonality, interactions, changepoints, etc.\n    * Provides model templates (default parameters) that work well based on\n      data characteristics and forecast requirements (e.g. daily long-term forecast).\n    * Produces interpretable output, with model summary to examine individual regressors,\n      and component plots to visually inspect the combined effect of related regressors.\n* Fast training and scoring\n    * Facilitates interactive prototyping, grid search, and benchmarking.\n      Grid search is useful for model selection and semi-automatic forecasting of multiple metrics.\n* Extensible framework\n    * Exposes multiple forecast algorithms in the same interface,\n      making it easy to try algorithms from different libraries and compare results.\n    * The same pipeline provides preprocessing, cross-validation,\n      backtest, forecast, and evaluation with any algorithm.\n\nAlgorithms currently supported within Greykite’s modeling framework:\n\n* Silverkite (Greykite’s flagship forecasting algorithm)\n* Greykite Anomaly Detection (Greykite's flagship anomaly detection algorithm)\n* `Facebook Prophet \u003chttps://facebook.github.io/prophet/\u003e`_\n* `Auto Arima \u003chttps://alkaline-ml.com/pmdarima/\u003e`_\n\nNotable Components\n------------------\n\nGreykite offers components that could be used within other forecasting\nlibraries or even outside the forecasting context.\n\n* ModelSummary() - R-like summaries of `scikit-learn` and `statsmodels` regression models.\n* ChangepointDetector() - changepoint detection based on adaptive lasso, with visualization.\n* SimpleSilverkiteForecast() - Silverkite algorithm with `forecast_simple` and `predict` methods.\n* SilverkiteForecast() - low-level interface to Silverkite algorithm with `forecast` and `predict` methods.\n* ReconcileAdditiveForecasts() - adjust a set of forecasts to satisfy inter-forecast additivity constraints.\n* GreykiteDetector() - simple interface for optimizing anomaly detection performance based on Greykite forecasts.\n\nUsage Examples\n--------------\n\nYou can obtain forecasts with only a few lines of code:\n\n.. code-block:: python\n\n    from greykite.common.data_loader import DataLoader\n    from greykite.framework.templates.autogen.forecast_config import ForecastConfig\n    from greykite.framework.templates.autogen.forecast_config import MetadataParam\n    from greykite.framework.templates.forecaster import Forecaster\n    from greykite.framework.templates.model_templates import ModelTemplateEnum\n\n    # Defines inputs\n    df = DataLoader().load_bikesharing().tail(24*90)  # Input time series (pandas.DataFrame)\n    config = ForecastConfig(\n         metadata_param=MetadataParam(time_col=\"ts\", value_col=\"count\"),  # Column names in `df`\n         model_template=ModelTemplateEnum.AUTO.name,  # AUTO model configuration\n         forecast_horizon=24,   # Forecasts 24 steps ahead\n         coverage=0.95,         # 95% prediction intervals\n     )\n\n    # Creates forecasts\n    forecaster = Forecaster()\n    result = forecaster.run_forecast_config(df=df, config=config)\n\n    # Accesses results\n    result.forecast     # Forecast with metrics, diagnostics\n    result.backtest     # Backtest with metrics, diagnostics\n    result.grid_search  # Time series CV result\n    result.model        # Trained model\n    result.timeseries   # Processed time series with plotting functions\n\nFor a demo, please see our `quickstart \u003chttps://linkedin.github.io/greykite/get_started\u003e`_.\n\nSetup and Installation\n----------------------\n\nGreykite is available on Pypi and can be installed with pip:\n\n.. code-block::\n\n    pip install greykite\n\nFor more installation tips, see `installation \u003chttp://linkedin.github.io/greykite/installation\u003e`_.\n\nDocumentation\n-------------\n\nPlease find our full documentation `here \u003chttp://linkedin.github.io/greykite/docs\u003e`_.\n\nLearn More\n----------\n\n* `Website \u003chttps://linkedin.github.io/greykite\u003e`_\n* `Paper \u003chttps://doi.org/10.1145/3534678.3539165\u003e`_ (KDD '22 Best Paper Runner-up, Applied Data Science Track)\n* `Blog post \u003chttps://engineering.linkedin.com/blog/2021/greykite--a-flexible--intuitive--and-fast-forecasting-library\u003e`_\n\nCitation\n--------\n\nPlease cite Greykite in your publications if it helps your research:\n\n.. code-block::\n\n    @misc{reza2021greykite-github,\n      author = {Reza Hosseini and\n                Albert Chen and\n                Kaixu Yang and\n                Sayan Patra and\n                Yi Su and\n                Rachit Arora},\n      title  = {Greykite: a flexible, intuitive and fast forecasting library},\n      url    = {https://github.com/linkedin/greykite},\n      year   = {2021}\n    }\n\n.. code-block::\n\n    @inproceedings{reza2022greykite-kdd,\n      author = {Hosseini, Reza and Chen, Albert and Yang, Kaixu and Patra, Sayan and Su, Yi and Al Orjany, Saad Eddin and Tang, Sishi and Ahammad, Parvez},\n      title = {Greykite: Deploying Flexible Forecasting at Scale at LinkedIn},\n      year = {2022},\n      isbn = {9781450393850},\n      publisher = {Association for Computing Machinery},\n      address = {New York, NY, USA},\n      url = {https://doi.org/10.1145/3534678.3539165},\n      doi = {10.1145/3534678.3539165},\n      booktitle = {Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining},\n      pages = {3007–3017},\n      numpages = {11},\n      keywords = {forecasting, scalability, interpretable machine learning, time series},\n      location = {Washington DC, USA},\n      series = {KDD '22}\n    }\n\n\nLicense\n-------\n\nCopyright (c) LinkedIn Corporation. All rights reserved. Licensed under the\n`BSD 2-Clause \u003chttps://opensource.org/licenses/BSD-2-Clause\u003e`_ License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkedin%2Fgreykite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinkedin%2Fgreykite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkedin%2Fgreykite/lists"}