{"id":26471397,"url":"https://github.com/adevinta/forecastout","last_synced_at":"2025-03-19T20:54:36.778Z","repository":{"id":240037733,"uuid":"798656846","full_name":"adevinta/forecastout","owner":"adevinta","description":"Python library to forecast univariate time series through backtesting model selection","archived":false,"fork":false,"pushed_at":"2024-06-12T08:17:11.000Z","size":104,"stargazers_count":21,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-12-18T11:41:45.067Z","etag":null,"topics":["arima","daily-forecast","forecast","holt-winters","monthly-forecasts","prophet","python-library","random-forest","time-series-decomposition"],"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/adevinta.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-10T08:06:58.000Z","updated_at":"2024-09-21T11:55:46.000Z","dependencies_parsed_at":"2024-05-21T08:48:29.533Z","dependency_job_id":"37a28935-60e3-4d4c-9569-6e5db370d248","html_url":"https://github.com/adevinta/forecastout","commit_stats":null,"previous_names":["adevinta/forecastout"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adevinta%2Fforecastout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adevinta%2Fforecastout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adevinta%2Fforecastout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adevinta%2Fforecastout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adevinta","download_url":"https://codeload.github.com/adevinta/forecastout/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244506027,"owners_count":20463464,"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":["arima","daily-forecast","forecast","holt-winters","monthly-forecasts","prophet","python-library","random-forest","time-series-decomposition"],"created_at":"2025-03-19T20:54:36.237Z","updated_at":"2025-03-19T20:54:36.771Z","avatar_url":"https://github.com/adevinta.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# forecastout\n\nForecastOut makes predictions for univariate time series using both statistical \nand machine learning approaches.\n\nThe algorithm works for both monthly and daily data.\n\n\nIn the case of monthly data, ForecastOut makes predictions using different \nstatistical models (ARIMA, variations of Holt-Winters, Prophet, etc.) and then \nensembles them using backtesting. A Naive Seasonal model is averaged into the \nresulting prediction in case the latter is not plausible.\n\nFor daily data, ForecastOut first aggregates the data (by summing or averaging) \non a monthly basis and applies the algorithm described above to make a monthly \nforecast. Then, it disaggregates the monthly forecast to a daily basis using \nthe time series and calendar information in a Random Forest.\n\nThe algorithm provides not only the forecast output and 95% confidence bands \nbut also detailed results of each model, backtesting, and time series \ndecomposition.\n\n\n## Installation\n\n```bash\n\npip install forecastout\n\n```\n\n## Quickstart\n\nTo make a prediction, you only need one necessary input: a pandas DataFrame \nwith two columns:\n\n- date: string format \"YYYY-MM-DD\" (e.g., \"2024-01-01\").\n- value: integer or float format (e.g., 1000.0).\n\nIt should contain at least 24 monthly observations (if the data is daily,\nit should cover more than 24 months).\n\n```{python, error=TRUE, include=TRUE}\nimport pandas as pd\nfrom forecastout import ForecastOut\n\nforecastout = ForecastOut(\n    df=pd.DataFrame()\n)\n```\n\nThis will directly execute a prediction for 3 months for the inserted time \nseries input. You can access the results as follows:\n\n```{python, error=TRUE, include=TRUE}\n# -- Monthly forecast output\nprint(forecastout.df_monthly_forecast)\n# -- Monthly forecast predictions by model\nprint(forecastout.df_predictions_by_model) \n# -- Daily forecast output (if daily data)\nprint(forecastout.df_daily_forecast)\n # -- Time series decomposition\nprint(forecastout.df_ts_decomposition)\n # -- Backtesting predictions for each model\nprint(forecastout.df_predictions_bt)\n # -- Daily decomposition percentage (if daily data)\nprint(forecastout.df_daily_shares)\n```\n\n## Inputs\nForecastOut can customize the results through the following parameters. \n\n```{python, error=TRUE, include=TRUE}\nimport pandas as pd\nfrom forecastout import ForecastOut\n\n    forecastout = ForecastOut(\n        df=pd.DataFrame(),\n        sum_aggregation=True,\n        horizon=3,\n        months_to_backtest=3,\n        models_to_use=['autoarima', 'holtwinters', 'prophet'],\n        average_top_models_number=1\n    )\n```\n\n- sum_aggregation (bool): If True, it adds daily data. If False, it averages daily data.\n- horizon (int): Number of periods to forecast.\n- months_to_backtest (int): Number of periods to do the backtesting.\n- models_to_use (list): List of models to be used. ForecastOut has available 'autoarima', 'holtwinters' and 'prophet' (new coming soon).\n- average_top_models_number (int): Number of models to use as average (if 1, it selects the most precise model in the backtesting).\n\n## Remarks\n- Calendar Data available is only for Spain when doing the disaggregation from monthly to daily data (more calendars will be available in the future).\n- In case the input DataFrame contains gaps, they will be assumed to be 0 value.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadevinta%2Fforecastout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadevinta%2Fforecastout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadevinta%2Fforecastout/lists"}