{"id":13570925,"url":"https://github.com/MBrouns/timeseers","last_synced_at":"2025-04-04T07:32:24.022Z","repository":{"id":46126353,"uuid":"235797616","full_name":"MBrouns/timeseers","owner":"MBrouns","description":"Time should be taken seer-iously","archived":false,"fork":false,"pushed_at":"2023-03-17T15:35:30.000Z","size":507,"stargazers_count":314,"open_issues_count":18,"forks_count":37,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-30T17:12:03.120Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MBrouns.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-01-23T13:12:37.000Z","updated_at":"2025-03-14T02:01:54.000Z","dependencies_parsed_at":"2022-08-30T16:42:39.488Z","dependency_job_id":"7195506d-092a-4f16-9fa1-fcf9ee00dd87","html_url":"https://github.com/MBrouns/timeseers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MBrouns%2Ftimeseers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MBrouns%2Ftimeseers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MBrouns%2Ftimeseers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MBrouns%2Ftimeseers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MBrouns","download_url":"https://codeload.github.com/MBrouns/timeseers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247139108,"owners_count":20890171,"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-08-01T14:00:56.575Z","updated_at":"2025-04-04T07:32:18.991Z","avatar_url":"https://github.com/MBrouns.png","language":"Python","funding_links":[],"categories":["📦 Packages"],"sub_categories":["Python"],"readme":"![Unit Tests](https://github.com/MBrouns/timeseers/workflows/Unit%20Tests/badge.svg?branch=master)\n\n\u003cimg src=\"images/timeseers.png\" width=\"35%\" height=\"35%\" align=\"right\" /\u003e\n\n# TimeSeers\n\n\u003e seers - (Noun) plural form of seer - A person who foretells future events by or as if by supernatural means\n\nTimeSeers is an hierarchical Bayesian Time Series model based on [Facebooks Prophet](https://facebook.github.io/prophet/), written in PyMC3.\n\nThe goal of the TimeSeers project is to provide an easily extensible alternative to Prophet for timeseries modelling when\nmultiple time series are expected to share parts of their parameters.\n \n \n## Usage\nTimeSeers is designed as a language for building time series models. It offers a toolbox of various components which\ncan be arranged in a formula. We can compose these components in various ways to best fit our problem. \n\nTimeSeers strongly encourages using uncertainty estimates, and will by default use MCMC to get full posterior estimates.\n\n\n```python\nfrom timeseers import LinearTrend, FourierSeasonality\nimport pandas as pd\n\nmodel = LinearTrend() + FourierSeasonality(period=pd.Timedelta(days=365)) + FourierSeasonality(period=pd.Timedelta(days=365))\nmodel.fit(data[['t']], data['value'])\n```\n\n### Multiplicative seasonality\n```python\nfrom timeseers import LinearTrend, FourierSeasonality\nimport pandas as pd\n\npassengers = pd.read_csv('AirPassengers.csv').reset_index().assign(\n    t=lambda d: pd.to_datetime(d['Month']),\n    value=lambda d: d['#Passengers']\n)\n\nmodel = LinearTrend(n_changepoints=10) * FourierSeasonality(n=5, period=pd.Timedelta(days=365))\nmodel.fit(passengers[['t']], passengers['value'], tune=2000)\n\nmodel.plot_components(X_true=passengers, y_true=passengers['value']);\n```\n\n    Auto-assigning NUTS sampler...\n    Initializing NUTS using jitter+adapt_diag...\n    Multiprocess sampling (4 chains in 4 jobs)\n    NUTS: [sigma, beta, m, delta, k]\n    Sampling 4 chains, 0 divergences: 100%|██████████| 10000/10000 [00:57\u003c00:00, 173.30draws/s]\n\n\n\n![png](images/airline_passengers.png)\n\n\n# Contributing\n\nPR's and suggestions are always welcome. Please open an issue on the issue list before submitting though in order to\navoid doing unnecessary work. I try to adhere to the `scikit-learn` style as much as possible. This means:\n\n- Fitted parameters have a trailing underscore\n- No parameter modification is done in `__init__` methods of model components\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMBrouns%2Ftimeseers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMBrouns%2Ftimeseers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMBrouns%2Ftimeseers/lists"}