{
  "id": "task_libraries:time-series/python",
  "path": "/exapedia/python-time-series-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python time-series libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python time series libraries store, transform, and analyze observations indexed by time. Analysis libraries add seasonal decomposition, change point detection, and automatic feature extraction on top of time-indexed tables. These libraries let analysts, monitoring tools, and AI agents find trends and changes in metrics and sensor data."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python time-series libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#pandas",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F137"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F138"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F141"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#statsmodels",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F156"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F157"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F160"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F158"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#prophet",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F175"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F176"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F177"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#ruptures",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F197"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F204"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F201"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#arch",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F213"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F217"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#sktime",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F231"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F232"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F240"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#stumpy",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F245"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F254"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F249"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F247"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#tsfresh",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F263"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F264"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F270"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F267"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F265"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "PyPI"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#pandas",
          "label": [
            {
              "t": "text",
              "text": "pandas"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F138"
        },
        {
          "t": "text",
          "text": ", a count that covers all its data analysis work."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Native forecasting estimators",
            "Regime or change-point models"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#pandas",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F137"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F145"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#statsmodels",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F156"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#prophet",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F175"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F185"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#ruptures",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F197"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#arch",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F213"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#sktime",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F231"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#stumpy",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F245"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F255"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#tsfresh",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F263"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F271"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F272"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "pandas",
          "name": [
            {
              "t": "fact",
              "fact": "F137"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/pandas-dev/pandas"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/pandas"
            },
            {
              "label": "Docs",
              "href": "https://pandas.pydata.org/docs/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F13"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F138"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F140"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pandas.pydata.org/docs/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F137"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F20"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F21"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/freqtrade/freqtrade",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F154"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def ohlcv_fill_up_missing_data(\n    dataframe: DataFrame,\n    timeframe: str,\n    pair: str,\n    candle_type: CandleType = CandleType.SPOT,\n) -> DataFrame:\n    \"\"\"\n    Fills up missing data with 0 volume rows,\n    using the previous close as price for \"open\", \"high\", \"low\" and \"close\", volume is set to 0\n\n    Candle types that carry a single value (e.g. funding rates) have no candle to fabricate -\n    inventing one would silently make up rates - so they are returned unchanged.\n    \"\"\"\n    if not candle_type_is_ohlcv(candle_type):\n        logger.debug(f\"Skipping fillup for {pair}, {timeframe} - not applicable to {candle_type}.\")\n        return dataframe\n\n    from freqtrade.exchange import timeframe_to_resample_freq\n\n    ohlcv_dict = {\"open\": \"first\", \"high\": \"max\", \"low\": \"min\", \"close\": \"last\", \"volume\": \"sum\"}\n    resample_interval = timeframe_to_resample_freq(timeframe)\n    # Resample to create \"NAN\" values\n    df = dataframe.resample(resample_interval, on=\"date\").agg(ohlcv_dict)\n\n    # Forwardfill close for missing columns\n    df[\"close\"] = df[\"close\"].ffill()\n    # Use close for \"open, high, low\"\n    df.loc[:, [\"open\", \"high\", \"low\"]] = df[[\"open\", \"high\", \"low\"]].fillna(\n        value={\n            \"open\": df[\"close\"],\n            \"high\": df[\"close\"],\n            \"low\": df[\"close\"],\n        }\n    )\n    df = df.reset_index()\n    len_before = len(dataframe)\n    len_after = len(df)\n    pct_missing = (len_after - len_before) / len_before if len_before > 0 else 0\n    if len_before != len_after:\n        message = (\n            f\"Missing data fillup for {pair}, {timeframe}: \"\n            f\"before: {len_before} - after: {len_after} - {pct_missing:.2%}\"\n        )\n        if pct_missing > 0.01:\n            logger.info(message)\n        else:\n            # Don't be verbose if only a small amount is missing\n            logger.debug(message)\n    return df\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/freqtrade/freqtrade/blob/b6d30da09b6745065bf60d464286ebb1b889ccbe/freqtrade/data/converter/converter.py#L128-L176",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F153"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Projects%20using%20pandas%20for%20time-series%20analysis&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F137"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import pandas as pd\n\nindex = pd.date_range('2026-01-01', periods=4, freq='h', tz='UTC')\nseries = pd.Series([1.0, 3.0, 5.0, 7.0], index=index)\nprint(series.resample('2h').mean())\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pandas.pydata.org/docs/user_guide/timeseries.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "timeseries.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F142"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "statsmodels",
          "name": [
            {
              "t": "fact",
              "fact": "F156"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/statsmodels/statsmodels"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/statsmodels"
            },
            {
              "label": "Docs",
              "href": "https://www.statsmodels.org/stable/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F38"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F157"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F159"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F158"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://www.statsmodels.org/stable/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F156"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F45"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F46"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/unit8co/darts",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F173"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def extract_trend_and_seasonality(\n    ts: TimeSeries,\n    freq: int | Sequence[int] | None = None,\n    model: Literal[\"additive\", \"multiplicative\"] = MULTIPLICATIVE,\n    method: str = \"naive\",\n    return_residual: bool = False,\n    **kwargs,\n) -> tuple[TimeSeries, TimeSeries] | tuple[TimeSeries, TimeSeries, TimeSeries]:\n    \"\"\"\n    Extracts trend, seasonality and residual from a TimeSeries instance using `statsmodels.tsa`.\n\n    Parameters\n    ----------\n    ts\n        The series to decompose\n    freq\n        The seasonality period to use.\n    model\n        The type of decomposition to use: ``\"additive\"`` or ``\"multiplicative\"``. Defaults to ``\"multiplicative\"``.\n    method\n        The method to be used to decompose the series.\n        - \"naive\" : Seasonal decomposition using moving averages [1]_.\n        - \"STL\" : Season-Trend decomposition using LOESS [2]_. Only compatible with ``ADDITIVE`` model type.\n        - \"MSTL\" : Season-Trend decomposition using LOESS with multiple seasonalities [3]_.\n        Only compatible with ``ADDITIVE`` model type.\n    return_residual\n        If ``False`` (default), return only the trend and seasonal parts. If ``True``, also return the residual\n        part as a third time series.\n    kwargs\n        Other keyword arguments are passed down to the decomposition method.\n\n    Returns\n    -------\n    Tuple[TimeSeries, TimeSeries] | Tuple[TimeSeries, TimeSeries, TimeSeries]\n        A tuple ``(trend, seasonal)`` when ``return_residual=False``, otherwise\n        ``(trend, seasonal, residual)``.\n\n    References\n    ----------\n    .. [1] https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.seasonal_decompose.html\n    .. [2] https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.STL.html\n    .. [3] https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.MSTL.html\n    \"\"\"\n    model = validate_mode(model, param=\"model\", allowed={ADDITIVE, MULTIPLICATIVE})\n\n    if isinstance(freq, Sequence) and method != \"MSTL\":\n        raise_log(\n            ValueError(\n                f\"{method} decomposition cannot be performed with more than one seasonality, received {freq}.\"\n            ),\n        )\n\n    values = ts.to_series(copy=False)\n    if np.isnan(values).any():\n        raise_log(ValueError(\"`ts` must not contain missing values.\"))\n\n    if method == \"naive\":\n        decomp = seasonal_decompose(\n            values, period=freq, model=model, extrapolate_trend=\"period\"\n        )\n    elif method == \"STL\":\n        if model != ADDITIVE:\n            raise_log(\n                ValueError(\n                    f\"Only ADDITIVE model is compatible with the STL method. Current model is {model}.\"\n                ),\n            )\n        decomp = STL(endog=values, period=freq, **kwargs).fit()\n    elif method == \"MSTL\":\n        if model != ADDITIVE:\n            raise_log(\n                ValueError(\n                    f\"Only ADDITIVE model is compatible with the MSTL method. Current model is {model}.\"\n                ),\n            )\n        decomp = MSTL(endog=values, periods=freq, **kwargs).fit()\n    else:\n        raise_log(ValueError(f\"Unknown value for `method`: {method}.\"))\n\n    # keep components, ... only if the number of components matches\n    season_shape = decomp.seasonal.shape\n    if len(season_shape) == 1:\n        season_shape = (season_shape[0], 1)\n    if season_shape[1] == ts.n_components:\n        components = ts.components\n        static_covariates = ts.static_covariates\n        hierarchy = ts.hierarchy\n    else:\n        components = None\n        static_covariates = None\n        hierarchy = None\n\n    season = TimeSeries(\n        times=ts.time_index,\n        values=decomp.seasonal,\n        components=components,\n        static_covariates=static_covariates,\n        hierarchy=hierarchy,\n        metadata=ts.metadata,\n        copy=False,\n    )\n    trend = TimeSeries(\n        times=ts.time_index,\n        values=decomp.trend,\n        components=ts.components,\n        copy=False,\n        **ts._attrs,\n    )\n    if not return_residual:\n        return trend, season\n\n    residual = TimeSeries(\n        times=ts.time_index,\n        values=decomp.resid,\n        components=ts.components,\n        copy=False,\n        **ts._attrs,\n    )\n    return trend, season, residual\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/unit8co/darts/blob/f33f30239c358c877f6bdabce7c0aa33ba4202cf/darts/utils/statistics.py#L163-L281",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F172"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Projects%20using%20statsmodels%20for%20time-series%20analysis&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F156"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from statsmodels.tsa.seasonal import seasonal_decompose\n\nresult = seasonal_decompose([1.0, 2.0, 3.0, 4.0] * 3, period=4)\nprint(result.trend, result.seasonal, result.resid)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://www.statsmodels.org/stable/generated/statsmodels.tsa.seasonal.seasonal_decompose.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "vector_ar.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F161"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "prophet",
          "name": [
            {
              "t": "fact",
              "fact": "F175"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/meta/prophet"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/prophet"
            },
            {
              "label": "Docs",
              "href": "https://facebook.github.io/prophet/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F182"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F176"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F177"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://facebook.github.io/prophet/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F175"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F196"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/apache/superset",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F195"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _prophet_fit_and_predict(  # pylint: disable=too-many-arguments\n    df: DataFrame,\n    confidence_interval: float,\n    yearly_seasonality: Union[bool, str, int],\n    weekly_seasonality: Union[bool, str, int],\n    daily_seasonality: Union[bool, str, int],\n    periods: int,\n    freq: str,\n) -> DataFrame:\n    \"\"\"\n    Fit a prophet model and return a DataFrame with predicted results.\n    \"\"\"\n    try:\n        # `prophet` complains about `plotly` not being installed\n        with suppress_logging(\"prophet.plot\"):\n            # pylint: disable=import-outside-toplevel\n            from prophet import Prophet\n\n        prophet_logger = logging.getLogger(\"prophet.plot\")\n        prophet_logger.setLevel(logging.CRITICAL)\n        prophet_logger.setLevel(logging.NOTSET)\n    except ModuleNotFoundError as ex:\n        raise InvalidPostProcessingError(_(\"`prophet` package not installed\")) from ex\n    model = Prophet(\n        interval_width=confidence_interval,\n        yearly_seasonality=yearly_seasonality,\n        weekly_seasonality=weekly_seasonality,\n        daily_seasonality=daily_seasonality,\n    )\n    if df[\"ds\"].dt.tz:\n        df[\"ds\"] = df[\"ds\"].dt.tz_convert(None)\n    try:\n        model.fit(df)\n        future = model.make_future_dataframe(periods=periods, freq=freq)\n        forecast = model.predict(future)[[\"ds\", \"yhat\", \"yhat_lower\", \"yhat_upper\"]]\n    except Exception as ex:  # noqa: BLE001\n        raise InvalidPostProcessingError(\n            _(\n                \"Unable to generate forecast: %(error)s\",\n                error=str(ex),\n            )\n        ) from ex\n    return forecast.join(df.set_index(\"ds\"), on=\"ds\").set_index([\"ds\"])\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/apache/superset/blob/18430a95f7da90dd848bc4ed988db58dd8c3362d/superset/utils/pandas_postprocessing/prophet.py#L43-L85",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F194"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=prophet%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F175"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "# Python\nimport pandas as pd\nfrom prophet import Prophet\n\n# Python\ndf = pd.read_csv('https://raw.githubusercontent.com/facebook/prophet/main/examples/example_wp_log_peyton_manning.csv')\ndf.head()\n\n# Python\nm = Prophet()\nm.fit(df)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/meta/prophet/blob/f57c4e13a29d18f927f2516f04990a3540711694/docs/_docs/quick_start.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "quick_start.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F180"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "ruptures",
          "name": [
            {
              "t": "fact",
              "fact": "F197"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/deepcharles/ruptures"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/ruptures"
            },
            {
              "label": "Docs",
              "href": "https://centre-borelli.github.io/ruptures-docs/code-reference/detection/binseg-reference/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F62"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F204"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://centre-borelli.github.io/ruptures-docs/code-reference/detection/binseg-reference/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F197"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F63"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F64"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F69"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F70"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/aeon-toolkit/aeon",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F211"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _run_binseg(self, X):\n    import ruptures as rpt\n\n    binseg = rpt.Binseg(\n        model=self.model, min_size=self.min_size, jump=self.jump\n    ).fit(X)\n    found_cps = np.array(binseg.predict(n_bkps=self.n_cps)[:-1], dtype=np.int64)\n\n    return found_cps\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/aeon-toolkit/aeon/blob/6d5ef3cdf463e08bafc6d95314c23323c7a1d468/aeon/segmentation/_binseg.py#L96-L104",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F210"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Projects%20using%20ruptures%20for%20time-series%20analysis&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F197"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import numpy as np\nimport ruptures as rpt\n\nsignal = np.r_[np.zeros(20), np.ones(20)]\nmodel = rpt.Binseg(model='l2').fit(signal)\nbreakpoints = model.predict(n_bkps=1)\nprint(breakpoints)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://centre-borelli.github.io/ruptures-docs/code-reference/detection/binseg-reference/",
                  "label": [
                    {
                      "t": "text",
                      "text": "binseg-reference.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F202"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "arch",
          "name": [
            {
              "t": "fact",
              "fact": "F213"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/bashtage/arch"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/arch"
            },
            {
              "label": "Docs",
              "href": "https://bashtage.github.io/arch/univariate/introduction.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F220"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F216"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://bashtage.github.io/arch/univariate/introduction.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F213"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F229"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F230"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/dcajasn/Riskfolio-Lib",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F229"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def bootstrapping(\n    X,\n    kind=\"stationary\",\n    q=0.05,\n    n_sim=6000,\n    window=3,\n    diag=False,\n    threshold=1e-15,\n    seed=0,\n):\n    r\"\"\"\n    Estimates the uncertainty sets of mean and covariance matrix through the selected\n    bootstrapping method.\n\n    Parameters\n    ----------\n    X : DataFrame of shape (n_samples, n_assets)\n        Assets returns DataFrame, where n_samples is the number of\n        observations and n_assets is the number of assets.\n    kind : str, optional\n        The bootstrapping method. The default value is 'stationary'. Possible values are:\n\n        - 'stationary': stationary bootstrapping method, see `StationaryBootstrap <https://bashtage.github.io/arch/bootstrap/generated/arch.bootstrap.StationaryBootstrap.html#arch.bootstrap.StationaryBootstrap>`_ for more details.\n        - 'circular': circular bootstrapping method, see `CircularBlockBootstrap <https://bashtage.github.io/arch/bootstrap/generated/arch.bootstrap.CircularBlockBootstrap.html#arch.bootstrap.CircularBlockBootstrap>`_ for more details.\n        - 'moving': moving bootstrapping method, see `MovingBlockBootstrap <https://bashtage.github.io/arch/bootstrap/generated/arch.bootstrap.MovingBlockBootstrap.html#arch.bootstrap.MovingBlockBootstrap>`_ for more details.\n    q : float, optional\n        Significance level for box and elliptical constraints.\n        The default is 0.05.\n    n_sim : int, optional\n        Number of simulations of the bootstrapping method.\n        The default is 6000.\n    window : int, optional\n        Block size of the bootstrapping method. Must be greather than 1\n        and lower than the n_samples - n_factors + 1\n        The default is 3.\n    diag : bool, optional\n        If consider only the main diagonal of covariance matrices of estimation\n        errors following :cite:`b-fabozzi2007robust`. The default is False.\n    threshold : float, optional\n        Parameter used to fix covariance matrices in case they are not positive semidefinite.\n        The default is 1e-15.\n    seed : int, optional\n        Seed used to generate random numbers for bootstrapping method.\n        The default is 0.\n\n    Returns\n    -------\n    mu_l : DataFrame\n        The q/2 percentile of mean vector obtained through the selected\n        bootstrapping method.\n    mu_u : DataFrame\n        The 1-q/2 percentile of mean vector obtained through the selected\n        bootstrapping method.\n    cov_l : DataFrame\n        The q/2 percentile of covariance matrix obtained through the selected\n        bootstrapping method.\n    cov_u : DataFrame\n        The 1-q/2 percentile of covariance matrix obtained through the selected\n        bootstrapping method.\n    cov_mu : DataFrame\n        The covariance matrix of estimation errors of mean vector obtained\n        through the selected bootstrapping method.\n    cov_sigma : DataFrame\n        The covariance matrix of estimation errors of covariance matrix\n        obtained through the selected bootstrapping method.\n    k_mu : DataFrame\n        The square root of size of elliptical constraint of mean vector\n        estimation error based on 1-q percentile.\n    k_sigma : DataFrame\n        The square root of size of elliptical constraint of covariance matrix\n        estimation error based on 1-q percentile.\n\n    Raises\n    ------\n    ValueError\n        When the value cannot be calculated.\n\n    \"\"\"\n\n    if not isinstance(X, pd.DataFrame):\n        raise TypeError(\"X must be a DataFrame\")\n\n    if window >= X.shape[0] - window + 1:\n        raise ValueError(\"block must be lower than  n_samples - window + 1\")\n    elif window <= 1:\n        raise ValueError(\"block must be greather than 1\")\n\n    cols = X.columns.tolist()\n    cols_2 = [i + \"-\" + j for i in cols for j in cols]\n    T, n = X.shape\n\n    mu = X.mean().to_numpy().reshape(1, n)\n    vec_Sigma = X.cov().to_numpy().reshape((1, n**2), order=\"F\")\n\n    mus = np.zeros((n_sim, 1, n))\n    covs = np.zeros((n_sim, n, n))\n\n    if kind == \"stationary\":\n        gen = bs.StationaryBootstrap(window, X, seed=seed)\n    elif kind == \"circular\":\n        gen = bs.CircularBlockBootstrap(window, X, seed=seed)\n    elif kind == \"moving\":\n        gen = bs.MovingBlockBootstrap(window, X, seed=seed)\n    else:\n        raise ValueError(\"kind only can be 'stationary', 'circular' or 'moving'\")\n\n    i = 0\n    for data in gen.bootstrap(n_sim):\n        A = data[0][0]\n        mus[i] = A.mean().to_numpy().reshape(1, n)\n        covs[i] = A.cov().to_numpy()\n        i += 1\n\n    # Box Constraint for Mean\n    mu_l = np.percentile(mus, q=q / 2 * 100, axis=0, keepdims=True).reshape(1, n)\n    mu_u = np.percentile(mus, q=(1 - q / 2) * 100, axis=0, keepdims=True).reshape(1, n)\n    mu_l = pd.DataFrame(mu_l, index=[0], columns=cols)\n    mu_u = pd.DataFrame(mu_u, index=[0], columns=cols)\n\n    # Box Constraint for Covariance\n    cov_l = np.percentile(covs, q=q / 2 * 100, axis=0, keepdims=True).reshape(n, n)\n    cov_u = np.percentile(covs, q=(1 - q / 2) * 100, axis=0, keepdims=True).reshape(\n        n, n\n    )\n    cov_l = pd.DataFrame(cov_l, index=cols, columns=cols)\n    cov_u = pd.DataFrame(cov_u, index=cols, columns=cols)\n\n    # Check and fix if upper and lower bound for Covariance are positive\n    # semidefinite and fix when they are not\n    if af.is_pos_def(cov_l) is False:\n        cov_l = af.cov_fix(cov_l, method=\"clipped\", threshold=threshold)\n    if af.is_pos_def(cov_u) is False:\n        cov_u = af.cov_fix(cov_u, method=\"clipped\", threshold=threshold)\n\n    # Elliptical Constraint for Mean\n    A_mu = mus.reshape(n_sim, n) - np.repeat(mu, n_sim, axis=0)\n    cov_mu = np.cov(A_mu, rowvar=False)\n    if diag is True:\n        cov_mu = np.diag(np.diag(cov_mu))\n    k_mus = np.diag(A_mu @ inv(cov_mu) @ A_mu.T)\n    k_mu = np.percentile(k_mus, q=(1 - q) * 100) ** 0.5\n    cov_mu = pd.DataFrame(cov_mu, index=cols, columns=cols)\n\n    # Elliptical Constraint for Covariance\n    A_Sigma = covs.reshape((n_sim, n**2), order=\"F\")\n    A_Sigma = A_Sigma - np.repeat(vec_Sigma, n_sim, axis=0)\n    cov_sigma = np.cov(A_Sigma, rowvar=False)\n    cov_sigma = af.cov_fix(cov_sigma, method=\"clipped\", threshold=threshold)\n    if diag is True:\n        cov_sigma = np.diag(np.diag(cov_sigma))\n    if af.is_pos_def(cov_sigma) is False:\n        cov_sigma = af.cov_fix(cov_sigma, method=\"clipped\", threshold=threshold)\n    k_sigmas = np.diag(A_Sigma @ inv(cov_sigma) @ A_Sigma.T)\n    k_sigma = np.percentile(k_sigmas, q=(1 - q) * 100) ** 0.5\n    cov_sigma = pd.DataFrame(cov_sigma, index=cols_2, columns=cols_2)\n\n    return mu_l, mu_u, cov_l, cov_u, cov_mu, cov_sigma, k_mu, k_sigma\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/dcajasn/Riskfolio-Lib/blob/344b899eb72e5636330647f08e3c5d88a8f71a84/riskfolio/src/ParamsEstimation.py#L1827-L1983",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F228"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=arch%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F213"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import arch.data.sp500\nfrom arch import arch_model\n\nsp500 = arch.data.sp500.load()\nsp500 = sp500.loc['2000-01-01':'2014-01-01']\nreturns = 100 * sp500['Adj Close'].pct_change().dropna()\nmodel = arch_model(returns)\nresult = model.fit()\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://bashtage.github.io/arch/univariate/introduction.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "introduction.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F218"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "sktime",
          "name": [
            {
              "t": "fact",
              "fact": "F231"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/sktime/sktime"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/sktime"
            },
            {
              "label": "Docs",
              "href": "https://www.sktime.net/en/stable/examples/01_forecasting.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F238"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F232"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F240"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://www.sktime.net/en/stable/examples/01_forecasting.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F231"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from sktime.datasets import load_airline\nfrom sktime.forecasting.naive import NaiveForecaster\n\ny = load_airline()\nforecaster = NaiveForecaster(strategy='last')\nforecaster.fit(y)\nforecast = forecaster.predict(fh=[1, 2, 3])\nprint(forecast)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://www.sktime.net/en/stable/examples/01_forecasting.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=sktime%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F231"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F236"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "stumpy",
          "name": [
            {
              "t": "fact",
              "fact": "F245"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/stumpy-dev/stumpy"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/stumpy"
            },
            {
              "label": "Docs",
              "href": "https://github.com/stumpy-dev/stumpy/blob/main/README.rst"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F252"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F254"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F248"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F247"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/stumpy-dev/stumpy/blob/main/README.rst",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F245"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F262"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/aeon-toolkit/aeon",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F261"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _predict(self, X: np.ndarray) -> np.ndarray:\n    import stumpy\n\n    self._check_params(X)\n    mp = stumpy.stump(\n        X[:, 0],\n        m=self.window_size,\n        ignore_trivial=self.ignore_trivial,\n        normalize=self.normalize,\n        p=self.p,\n        k=self.k,\n    )\n    point_anomaly_scores = reverse_windowing(mp[:, 0], self.window_size)\n    return point_anomaly_scores\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/aeon-toolkit/aeon/blob/6d5ef3cdf463e08bafc6d95314c23323c7a1d468/aeon/anomaly_detection/series/distance_based/_stomp.py#L84-L97",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F260"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=stumpy%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F245"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import stumpy\nimport numpy as np\n\nif __name__ == \"__main__\":\n    your_time_series = np.random.rand(10000)\n    window_size = 50  # Approximately, how many data points might be found in a pattern \n\n    matrix_profile = stumpy.stump(your_time_series, m=window_size)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/stumpy-dev/stumpy/blob/main/README.rst",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F250"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "tsfresh",
          "name": [
            {
              "t": "fact",
              "fact": "F263"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/blue-yonder/tsfresh"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/tsfresh"
            },
            {
              "label": "Docs",
              "href": "https://tsfresh.readthedocs.io/en/latest/text/quick_start.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F88"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F264"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F270"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F266"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F265"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://tsfresh.readthedocs.io/en/latest/text/quick_start.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F263"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F89"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F90"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F91"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F92"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F93"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F94"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F95"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F96"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F277"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F278"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/aeon-toolkit/aeon",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F277"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _transform(self, X, y=None):\n    \"\"\"Transform X and return a transformed version.\n\n    private _transform containing core logic, called from transform\n\n    Parameters\n    ----------\n    X : 3D np.ndarray of shape (n_cases, n_channels, n_timepoints)\n        or list of np.ndarray of shape [n_cases], where each array is a\n        2D np.ndarray of shape = [n_channels, n_timepoints_i]\n        input time series collection.\n    y : ignored argument for interface compatibility\n\n    Returns\n    -------\n    Xt : np.ndarray of shape (n_cases, n_features)\n        Transformed data.\n    \"\"\"\n    Xt = _from_collection_to_long(X)\n\n    # lazy imports to avoid hard dependency\n    from tsfresh import extract_features\n\n    Xt = extract_features(\n        Xt,\n        column_id=\"index\",\n        column_value=\"value\",\n        column_kind=\"column\",\n        column_sort=\"time_index\",\n        **self.default_fc_parameters_,\n    )\n    return Xt.to_numpy()\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/aeon-toolkit/aeon/blob/6d5ef3cdf463e08bafc6d95314c23323c7a1d468/aeon/transformations/collection/feature_based/_tsfresh.py#L280-L311",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F276"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Projects%20using%20tsfresh%20for%20time-series%20analysis&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F263"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from tsfresh.examples.robot_execution_failures import (\n    download_robot_execution_failures, load_robot_execution_failures,\n)\nfrom tsfresh import extract_features\n\ndownload_robot_execution_failures()\ntimeseries, y = load_robot_execution_failures()\nfeatures = extract_features(timeseries, column_id='id', column_sort='time')\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://tsfresh.readthedocs.io/en/latest/text/quick_start.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "quick_start.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F268"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python time series library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#pandas",
          "label": [
            {
              "t": "text",
              "text": "pandas"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits time-indexed data, resampling, and rolling calculations. "
        },
        {
          "t": "link",
          "href": "#statsmodels",
          "label": [
            {
              "t": "text",
              "text": "statsmodels"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits seasonal decomposition and models of related series. "
        },
        {
          "t": "link",
          "href": "#ruptures",
          "label": [
            {
              "t": "text",
              "text": "ruptures"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits change point detection. "
        },
        {
          "t": "link",
          "href": "#tsfresh",
          "label": [
            {
              "t": "text",
              "text": "tsfresh"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits automatic feature extraction."
        }
      ]
    },
    {
      "q": "What is STUMPY?",
      "a": [
        {
          "t": "link",
          "href": "#stumpy",
          "label": [
            {
              "t": "text",
              "text": "STUMPY"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a library for a variety of time series data mining tasks."
        }
      ]
    },
    {
      "q": "How do I resample a time series in pandas?",
      "a": [
        {
          "t": "link",
          "href": "#pandas",
          "label": [
            {
              "t": "text",
              "text": "pandas"
            }
          ]
        },
        {
          "t": "text",
          "text": " resamples timestamped observations to another frequency. Rolling windows can also apply an arbitrary function to each window."
        }
      ]
    },
    {
      "q": "What is tsfresh?",
      "a": [
        {
          "t": "link",
          "href": "#tsfresh",
          "label": [
            {
              "t": "text",
              "text": "tsfresh"
            }
          ]
        },
        {
          "t": "text",
          "text": " automates feature engineering from time series and other ordered data and selects features against target labels."
        }
      ]
    },
    {
      "q": "What is sktime?",
      "a": [
        {
          "t": "link",
          "href": "#sktime",
          "label": [
            {
              "t": "text",
              "text": "sktime"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a unified framework for machine learning with time series."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, pandas",
      "display": "pandas",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, pandas",
      "display": "688.5M",
      "asOf": "2026-11-17"
    },
    "F3": {
      "label": "License, pandas",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, pandas",
      "display": "3.1.1, Nov 2026",
      "asOf": "2026-11-04"
    },
    "F5": {
      "label": "Package release date, pandas",
      "display": "Nov 2026",
      "asOf": "2026-11-04"
    },
    "F6": {
      "label": "Repository stars, pandas",
      "display": "49.6K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Multivariate input, pandas",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Custom calculations, pandas",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Parallel processing, pandas",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Time sorting, pandas",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Output formats, pandas",
      "display": "CSV",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "Install, pandas",
      "display": "pip install pandas",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "What it does, pandas",
      "display": "Provides time-indexed data structures, frequency conversion, and resampling.",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths lead, pandas",
      "display": "Resamples timestamped observations",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths, pandas",
      "display": "Use resample to group a time series into another frequency.",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths lead, pandas",
      "display": "Adds custom rolling calculations",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "strengths, pandas",
      "display": "Apply a custom aggregation function to each rolling window.",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations lead, pandas",
      "display": "Clock changes need explicit handling",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations, pandas",
      "display": "Set nonexistent when localizing timestamps that fall inside a skipped hour.",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "limitations lead, pandas",
      "display": "Numba windows need array inputs",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "limitations, pandas",
      "display": "Use raw=True with the Numba rolling engine instead of Series-only attributes.",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Quickstart, pandas",
      "display": "import numpy as np\n\nimport pandas as pd\n\n\nidx = pd.date_range(\"2018-01-01\", periods=5, freq=\"h\")\nts = pd.Series(range(len(idx)), index=idx)\nts\nts.resample(\"2h\").mean()\n",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project function, pandas",
      "display": "def ohlcv_fill_up_missing_data(\n    dataframe: DataFrame,\n    timeframe: str,\n    pair: str,\n    candle_type: CandleType = CandleType.SPOT,\n) -> DataFrame:\n    \"\"\"\n    Fills up missing data with 0 volume rows,\n    using the previous close as price for \"open\", \"high\", \"low\" and \"close\", volume is set to 0\n\n    Candle types that carry a single value (e.g. funding rates) have no candle to fabricate -\n    inventing one would silently make up rates - so they are returned unchanged.\n    \"\"\"\n    if not candle_type_is_ohlcv(candle_type):\n        logger.debug(f\"Skipping fillup for {pair}, {timeframe} - not applicable to {candle_type}.\")\n        return dataframe\n\n    from freqtrade.exchange import timeframe_to_resample_freq\n\n    ohlcv_dict = {\"open\": \"first\", \"high\": \"max\", \"low\": \"min\", \"close\": \"last\", \"volume\": \"sum\"}\n    resample_interval = timeframe_to_resample_freq(timeframe)\n    # Resample to create \"NAN\" values\n    df = dataframe.resample(resample_interval, on=\"date\").agg(ohlcv_dict)\n\n    # Forwardfill close for missing columns\n    df[\"close\"] = df[\"close\"].ffill()\n    # Use close for \"open, high, low\"\n    df.loc[:, [\"open\", \"high\", \"low\"]] = df[[\"open\", \"high\", \"low\"]].fillna(\n        value={\n            \"open\": df[\"close\"],\n            \"high\": df[\"close\"],\n            \"low\": df[\"close\"],\n        }\n    )\n    df = df.reset_index()\n    len_before = len(dataframe)\n    len_after = len(df)\n    pct_missing = (len_after - len_before) / len_before if len_before > 0 else 0\n    if len_before != len_after:\n        message = (\n            f\"Missing data fillup for {pair}, {timeframe}: \"\n            f\"before: {len_before} - after: {len_after} - {pct_missing:.2%}\"\n        )\n        if pct_missing > 0.01:\n            logger.info(message)\n        else:\n            # Don't be verbose if only a small amount is missing\n            logger.debug(message)\n    return df\n",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project function reference, pandas",
      "display": "converter.py · ohlcv_fill_up_missing_data()",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project repository, pandas",
      "display": "freqtrade/freqtrade",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Project stars, freqtrade/freqtrade",
      "display": "57.0K",
      "asOf": "2026-11-17"
    },
    "F27": {
      "label": "Project push date, freqtrade/freqtrade",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F28": {
      "label": "Library name, statsmodels",
      "display": "statsmodels",
      "asOf": "2026-11-17"
    },
    "F29": {
      "label": "Monthly downloads, statsmodels",
      "display": "38.4M",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "License, statsmodels",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-17"
    },
    "F31": {
      "label": "Package release, statsmodels",
      "display": "0.15.0, Aug 2026",
      "asOf": "2026-08-27"
    },
    "F32": {
      "label": "Package release date, statsmodels",
      "display": "Aug 2026",
      "asOf": "2026-08-27"
    },
    "F33": {
      "label": "Repository stars, statsmodels",
      "display": "11.8K",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Multivariate input, statsmodels",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Custom calculations, statsmodels",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Output formats, statsmodels",
      "display": "CSV",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "Install, statsmodels",
      "display": "pip install statsmodels",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "What it does, statsmodels",
      "display": "Provides statistical methods for modeling and analyzing related time series.",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths lead, statsmodels",
      "display": "Separates seasonal components",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths, statsmodels",
      "display": "Return trend, seasonal, and residual components with seasonal_decompose.",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths lead, statsmodels",
      "display": "Models related series together",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "strengths, statsmodels",
      "display": "Use VAR to estimate relationships between series and their lagged values.",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations lead, statsmodels",
      "display": "VAR expects stationary series",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations, statsmodels",
      "display": "Transform trending series before fitting a standard stable VAR model.",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "limitations lead, statsmodels",
      "display": "Classical decomposition needs complete cycles",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "limitations, statsmodels",
      "display": "Provide complete seasonal cycles before calling seasonal_decompose.",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Quickstart, statsmodels",
      "display": "# some example data\nimport numpy as np\n\nimport pandas\n\nimport statsmodels.api as sm\n\nfrom statsmodels.tsa.api import VAR\n\nmdata = sm.datasets.macrodata.load_pandas().data\n\n# prepare the dates index\ndates = mdata[['year', 'quarter']].astype(int).astype(str)\n\nquarterly = dates[\"year\"] + \"Q\" + dates[\"quarter\"]\n\nfrom statsmodels.tsa.base.datetools import dates_from_str\n\nquarterly = dates_from_str(quarterly)\n\nmdata = mdata[['realgdp','realcons','realinv']]\n\nmdata.index = pandas.DatetimeIndex(quarterly)\n\ndata = np.log(mdata).diff().dropna()\n\n# make a VAR model\nmodel = VAR(data)\n\n\nresults = model.fit(2)\n\nresults.summary()\n",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project function, statsmodels",
      "display": "def extract_trend_and_seasonality(\n    ts: TimeSeries,\n    freq: int | Sequence[int] | None = None,\n    model: Literal[\"additive\", \"multiplicative\"] = MULTIPLICATIVE,\n    method: str = \"naive\",\n    return_residual: bool = False,\n    **kwargs,\n) -> tuple[TimeSeries, TimeSeries] | tuple[TimeSeries, TimeSeries, TimeSeries]:\n    \"\"\"\n    Extracts trend, seasonality and residual from a TimeSeries instance using `statsmodels.tsa`.\n\n    Parameters\n    ----------\n    ts\n        The series to decompose\n    freq\n        The seasonality period to use.\n    model\n        The type of decomposition to use: ``\"additive\"`` or ``\"multiplicative\"``. Defaults to ``\"multiplicative\"``.\n    method\n        The method to be used to decompose the series.\n        - \"naive\" : Seasonal decomposition using moving averages [1]_.\n        - \"STL\" : Season-Trend decomposition using LOESS [2]_. Only compatible with ``ADDITIVE`` model type.\n        - \"MSTL\" : Season-Trend decomposition using LOESS with multiple seasonalities [3]_.\n        Only compatible with ``ADDITIVE`` model type.\n    return_residual\n        If ``False`` (default), return only the trend and seasonal parts. If ``True``, also return the residual\n        part as a third time series.\n    kwargs\n        Other keyword arguments are passed down to the decomposition method.\n\n    Returns\n    -------\n    Tuple[TimeSeries, TimeSeries] | Tuple[TimeSeries, TimeSeries, TimeSeries]\n        A tuple ``(trend, seasonal)`` when ``return_residual=False``, otherwise\n        ``(trend, seasonal, residual)``.\n\n    References\n    ----------\n    .. [1] https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.seasonal_decompose.html\n    .. [2] https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.STL.html\n    .. [3] https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.MSTL.html\n    \"\"\"\n    model = validate_mode(model, param=\"model\", allowed={ADDITIVE, MULTIPLICATIVE})\n\n    if isinstance(freq, Sequence) and method != \"MSTL\":\n        raise_log(\n            ValueError(\n                f\"{method} decomposition cannot be performed with more than one seasonality, received {freq}.\"\n            ),\n        )\n\n    values = ts.to_series(copy=False)\n    if np.isnan(values).any():\n        raise_log(ValueError(\"`ts` must not contain missing values.\"))\n\n    if method == \"naive\":\n        decomp = seasonal_decompose(\n            values, period=freq, model=model, extrapolate_trend=\"period\"\n        )\n    elif method == \"STL\":\n        if model != ADDITIVE:\n            raise_log(\n                ValueError(\n                    f\"Only ADDITIVE model is compatible with the STL method. Current model is {model}.\"\n                ),\n            )\n        decomp = STL(endog=values, period=freq, **kwargs).fit()\n    elif method == \"MSTL\":\n        if model != ADDITIVE:\n            raise_log(\n                ValueError(\n                    f\"Only ADDITIVE model is compatible with the MSTL method. Current model is {model}.\"\n                ),\n            )\n        decomp = MSTL(endog=values, periods=freq, **kwargs).fit()\n    else:\n        raise_log(ValueError(f\"Unknown value for `method`: {method}.\"))\n\n    # keep components, ... only if the number of components matches\n    season_shape = decomp.seasonal.shape\n    if len(season_shape) == 1:\n        season_shape = (season_shape[0], 1)\n    if season_shape[1] == ts.n_components:\n        components = ts.components\n        static_covariates = ts.static_covariates\n        hierarchy = ts.hierarchy\n    else:\n        components = None\n        static_covariates = None\n        hierarchy = None\n\n    season = TimeSeries(\n        times=ts.time_index,\n        values=decomp.seasonal,\n        components=components,\n        static_covariates=static_covariates,\n        hierarchy=hierarchy,\n        metadata=ts.metadata,\n        copy=False,\n    )\n    trend = TimeSeries(\n        times=ts.time_index,\n        values=decomp.trend,\n        components=ts.components,\n        copy=False,\n        **ts._attrs,\n    )\n    if not return_residual:\n        return trend, season\n\n    residual = TimeSeries(\n        times=ts.time_index,\n        values=decomp.resid,\n        components=ts.components,\n        copy=False,\n        **ts._attrs,\n    )\n    return trend, season, residual\n",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project function reference, statsmodels",
      "display": "statistics.py · extract_trend_and_seasonality()",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project repository, statsmodels",
      "display": "unit8co/darts",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Project stars, unit8co/darts",
      "display": "9.6K",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Project push date, unit8co/darts",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F53": {
      "label": "Library name, ruptures",
      "display": "ruptures",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Monthly downloads, ruptures",
      "display": "1.3M",
      "asOf": "2026-11-17"
    },
    "F55": {
      "label": "License, ruptures",
      "display": "BSD-2-Clause",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Package release, ruptures",
      "display": "1.1.10, Sep 2025",
      "asOf": "2025-09-10"
    },
    "F57": {
      "label": "Package release date, ruptures",
      "display": "Sep 2025",
      "asOf": "2025-09-10"
    },
    "F58": {
      "label": "Repository stars, ruptures",
      "display": "2.1K",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Multivariate input, ruptures",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Custom calculations, ruptures",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Install, ruptures",
      "display": "pip install ruptures matplotlib",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "What it does, ruptures",
      "display": "Detects change points and segments non-stationary signals offline.",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "strengths lead, ruptures",
      "display": "Detects changes in signal regimes",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths, ruptures",
      "display": "Use the consistent estimator interface to segment non-stationary signals.",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths lead, ruptures",
      "display": "Accepts custom change costs",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "strengths, ruptures",
      "display": "Subclass BaseCost to define the kind of change being detected.",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "limitations lead, ruptures",
      "display": "Works on offline signals",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "limitations, ruptures",
      "display": "Use another approach when change detection must update continuously.",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations lead, ruptures",
      "display": "Candidate spacing changes the search",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "limitations, ruptures",
      "display": "Set jump to control which sample positions are considered.",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Quickstart, ruptures",
      "display": "import matplotlib.pyplot as plt\nimport ruptures as rpt\n\n# generate signal\nn_samples, dim, sigma = 1000, 3, 4\nn_bkps = 4  # number of breakpoints\nsignal, bkps = rpt.pw_constant(n_samples, dim, n_bkps, noise_std=sigma)\n\n# detection\nalgo = rpt.Pelt(model=\"rbf\").fit(signal)\nresult = algo.predict(pen=10)\n\n# display\nrpt.display(signal, bkps, result)\nplt.show()\n\n",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Project function, ruptures",
      "display": "def _run_binseg(self, X):\n    import ruptures as rpt\n\n    binseg = rpt.Binseg(\n        model=self.model, min_size=self.min_size, jump=self.jump\n    ).fit(X)\n    found_cps = np.array(binseg.predict(n_bkps=self.n_cps)[:-1], dtype=np.int64)\n\n    return found_cps\n",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Project function reference, ruptures",
      "display": "_binseg.py · _run_binseg()",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project repository, ruptures",
      "display": "aeon-toolkit/aeon",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Project stars, aeon-toolkit/aeon",
      "display": "1.5K",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Project push date, aeon-toolkit/aeon",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F77": {
      "label": "Library name, tsfresh",
      "display": "tsfresh",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Monthly downloads, tsfresh",
      "display": "193.9K",
      "asOf": "2026-11-17"
    },
    "F79": {
      "label": "License, tsfresh",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Package release, tsfresh",
      "display": "0.21.2, May 2026",
      "asOf": "2026-05-31"
    },
    "F81": {
      "label": "Package release date, tsfresh",
      "display": "May 2026",
      "asOf": "2026-05-31"
    },
    "F82": {
      "label": "Repository stars, tsfresh",
      "display": "9.5K",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Multivariate input, tsfresh",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "Custom calculations, tsfresh",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "Parallel processing, tsfresh",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "Time sorting, tsfresh",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "Install, tsfresh",
      "display": "pip install tsfresh",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "What it does, tsfresh",
      "display": "Automates feature engineering from time-series and other ordered data.",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "strengths lead, tsfresh",
      "display": "Extracts features automatically",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "strengths, tsfresh",
      "display": "Calculate signal characteristics instead of writing each feature calculation.",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "strengths lead, tsfresh",
      "display": "Selects features against target labels",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "strengths, tsfresh",
      "display": "Use select_features to retain features relevant to the supplied target.",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "limitations lead, tsfresh",
      "display": "Designed for offline data",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "limitations, tsfresh",
      "display": "Use another approach for online streaming feature calculation.",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "limitations lead, tsfresh",
      "display": "Irregular intervals need feature selection",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "limitations, tsfresh",
      "display": "Some features assume equal spacing even though timestamps only order observations.",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "Quickstart, tsfresh",
      "display": "from tsfresh.examples.robot_execution_failures import download_robot_execution_failures, \\\n    load_robot_execution_failures\ndownload_robot_execution_failures()\ntimeseries, y = load_robot_execution_failures()\n\n\nfrom tsfresh import extract_features\nextracted_features = extract_features(timeseries, column_id=\"id\", column_sort=\"time\")\n\n\nfrom tsfresh import select_features\nfrom tsfresh.utilities.dataframe_functions import impute\n\nimpute(extracted_features)\nfeatures_filtered = select_features(extracted_features, y)\n\n",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Project function, tsfresh",
      "display": "def _get_extraction_params(self):\n    \"\"\"Set default parameters from tsfresh.\"\"\"\n    # make n_jobs compatible with scikit-learn. disaster area that needs reworking\n    n_jobs = self.n_jobs\n    self.n_jobs = check_n_jobs(self.n_jobs)\n    self._n_jobs = check_n_jobs(self.n_jobs)\n\n    # lazy imports to avoid hard dependency\n    from tsfresh.defaults import (\n        CHUNKSIZE,\n        DISABLE_PROGRESSBAR,\n        N_PROCESSES,\n        PROFILING,\n        PROFILING_FILENAME,\n        PROFILING_SORTING,\n        SHOW_WARNINGS,\n    )\n    from tsfresh.feature_extraction.settings import (\n        ComprehensiveFCParameters,\n        EfficientFCParameters,\n        MinimalFCParameters,\n        from_columns,\n    )\n    from tsfresh.utilities.dataframe_functions import impute\n\n    # Set defaults from tsfresh\n    extraction_params = {\n        \"n_jobs\": N_PROCESSES,\n        \"chunksize\": CHUNKSIZE,\n        \"show_warnings\": SHOW_WARNINGS,\n        \"disable_progressbar\": DISABLE_PROGRESSBAR,\n        \"impute_function\": impute,\n        \"profiling_sorting\": PROFILING_SORTING,\n        \"profiling_filename\": PROFILING_FILENAME,\n        \"profile\": PROFILING,\n    }\n\n    # Replace defaults with user defined parameters\n    for name in extraction_params.keys():\n        if hasattr(self, name):\n            value = getattr(self, name)\n            if value is not None:\n                extraction_params[name] = value\n\n    self.n_jobs = n_jobs\n\n    # Convert convenience string arguments to tsfresh parameters classes\n    fc_param_lookup = {\n        \"minimal\": MinimalFCParameters(),\n        \"efficient\": EfficientFCParameters(),\n        \"comprehensive\": ComprehensiveFCParameters(),\n    }\n    if isinstance(self.default_fc_parameters, str):\n        if self.default_fc_parameters not in fc_param_lookup:\n            raise ValueError(\n                f\"If `default_fc_parameters` is passed as a \"\n                f\"string, \"\n                f\"it must be one of\"\n                f\" {fc_param_lookup.keys()}, but found: \"\n                f\"{self.default_fc_parameters}\"\n            )\n        else:\n            fc_parameters = fc_param_lookup[self.default_fc_parameters]\n    else:\n        fc_parameters = self.default_fc_parameters\n    extraction_params[\"default_fc_parameters\"] = fc_parameters\n\n    # creates mapping from kind names to fc_parameter objects\n    if self.kind_to_fc_parameters is not None:\n        self.kind_to_fc_parameters_ = from_columns(self.kind_to_fc_parameters)\n    else:\n        self.kind_to_fc_parameters_ = self.kind_to_fc_parameters\n    extraction_params[\"kind_to_fc_parameters\"] = self.kind_to_fc_parameters_\n\n    return extraction_params\n",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Project function reference, tsfresh",
      "display": "_tsfresh.py · _get_extraction_params()",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Project repository, tsfresh",
      "display": "aeon-toolkit/aeon",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Project stars, aeon-toolkit/aeon",
      "display": "1.5K",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Project push date, aeon-toolkit/aeon",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F103": {
      "label": "Developer need",
      "display": "Resampling timestamped observations",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Why choose pandas",
      "display": "frequency conversion on a time index",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Developer need in introduction",
      "display": "resampling timestamped observations",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "When to consider statsmodels",
      "display": "seasonal decomposition is the next task",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Developer need",
      "display": "Separating seasonal patterns from trends",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Why choose statsmodels",
      "display": "decomposition result components",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Developer need in introduction",
      "display": "separating seasonal patterns from trends",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "When to consider tsfresh",
      "display": "automatic signal features are required",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Developer need",
      "display": "Building signal features for learning",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "Why choose tsfresh",
      "display": "automatic feature engineering",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "Developer need in introduction",
      "display": "building signal features for learning",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "When to consider ruptures",
      "display": "change-point segmentation is the task",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "Developer need",
      "display": "Finding signal regime changes",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "Why choose ruptures",
      "display": "offline change-point detection",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "Developer need in introduction",
      "display": "finding signal regime changes",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "When to consider pandas",
      "display": "observations need resampling first",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "Page introduction",
      "display": "Python time-series libraries let data developers analyze time-indexed observations.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Which Python time-series library fits each analysis task?",
      "display": "pandas resamples observations to another frequency.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Which Python time-series library fits each analysis task?",
      "display": "statsmodels returns seasonal, trend, and residual decomposition components.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: Which Python time-series library fits each analysis task?",
      "display": "tsfresh automates feature engineering.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: Which Python time-series library fits each analysis task?",
      "display": "ruptures detects change points offline.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: Does multivariate input mean identical modeling behavior?",
      "display": "statsmodels VAR analyzes relationships among multiple time series.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: Does multivariate input mean identical modeling behavior?",
      "display": "tsfresh feature chunks each represent one signal kind for one id.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "FAQ: Can pandas apply a custom function to time windows?",
      "display": "Rolling.apply applies an arbitrary function to each rolling window.",
      "asOf": "2026-11-17"
    },
    "F127": {
      "label": "FAQ: Does pandas parallel rolling processing require an extra engine?",
      "display": "The Numba engine accepts a parallel setting.",
      "asOf": "2026-11-17"
    },
    "F128": {
      "label": "FAQ: Does pandas parallel rolling processing require an extra engine?",
      "display": "That engine requires raw=True array inputs.",
      "asOf": "2026-11-17"
    },
    "F129": {
      "label": "FAQ: Can a standard VAR model fit trending data directly?",
      "display": "A standard stable VAR model is inappropriate for direct analysis of non-stationary series.",
      "asOf": "2026-11-17"
    },
    "F130": {
      "label": "FAQ: What does classical seasonal decomposition require?",
      "display": "Input must contain complete seasonal cycles, with individual series in columns.",
      "asOf": "2026-11-17"
    },
    "F131": {
      "label": "FAQ: Is tsfresh suitable for online streaming?",
      "display": "Its stated scope excludes online streaming feature calculation.",
      "asOf": "2026-11-17"
    },
    "F132": {
      "label": "FAQ: Does tsfresh account for unequal time intervals?",
      "display": "Timestamps order observations; some feature calculations assume equal spacing.",
      "asOf": "2026-11-17"
    },
    "F133": {
      "label": "FAQ: How does tsfresh order a signal?",
      "display": "column_sort supplies ordering; omitting it assumes an already sorted input.",
      "asOf": "2026-11-17"
    },
    "F134": {
      "label": "FAQ: Can ruptures detect a custom kind of change?",
      "display": "Subclass BaseCost to define a custom cost for segmentation.",
      "asOf": "2026-11-17"
    },
    "F135": {
      "label": "FAQ: What do the CSV cells represent?",
      "display": "pandas exports data frames to comma-separated values.",
      "asOf": "2026-11-17"
    },
    "F136": {
      "label": "FAQ: What do the CSV cells represent?",
      "display": "statsmodels Summary.as_csv serializes summary tables.",
      "asOf": "2026-11-17"
    },
    "F137": {
      "label": "Library name, pandas",
      "display": "pandas",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Monthly downloads, pandas",
      "display": "706.0M",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "License, pandas",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Package release, pandas",
      "display": "3.1.1",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Package release date, pandas",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Install, pandas",
      "display": "pip install pandas",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Quickstart, pandas",
      "display": "import pandas as pd\n\nindex = pd.date_range('2026-01-01', periods=4, freq='h', tz='UTC')\nseries = pd.Series([1.0, 3.0, 5.0, 7.0], index=index)\nprint(series.resample('2h').mean())\n",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Repository stars, pandas",
      "display": "49.6K",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Native forecasting estimators, pandas",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Regime or change-point models, pandas",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Native analysis role, pandas",
      "display": "Labelled time-indexed observations, resampling, gap filling, and named-zone conversion. Example repairs OHLCV candles using a domain-specific filling policy.",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "First-call prerequisites, pandas",
      "display": "Illustrative UTC hourly observations. Calendar bins aggregate rows; this does not interpolate a band-limited waveform.",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Whole project function contract, pandas",
      "display": "{\"arguments\": {\"status\": \"verified\", \"arguments\": \"Freqtrade imports pandas.DataFrame and supplies OHLCV numeric columns plus a datetime-like date column. Current resample accepts rule and on=\\\"date\\\"; aggregate accepts dict column-name to string-function mapping (first/max/min/last/sum). ffill propagates the previous close; fillna accepts a dictionary of aligned Series for open/high/low, then reset_index restores date as a column. Actual frequency helper uses valid current 300s/1W-MON/1MS/1YS forms for common 5m/1w/1M/1y inputs. Scope is those valid supported candle intervals, not arbitrary timeframe strings; multi-year suffixes and multi-week normalization must not be generalized. Non-OHLCV candle types bypass resampling.\", \"return_shape\": \"Resample aggregation returns a DataFrame indexed by date; ffill returns a Series, fillna a DataFrame, and reset_index a DataFrame with date restored. Missing prices are imputed from the previous close; these are not observed trades. No runtime missing-data percentage is presented as a measured article statistic.\"}, \"returns\": \"\"}",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Core task role, pandas",
      "display": "Time-index alignment, calendar/zone handling, resampling, and rolling preparation.",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "First-call prerequisites, pandas",
      "display": "Illustrative UTC hourly observations. Calendar bins aggregate rows; this does not interpolate a band-limited waveform.",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Project function, pandas",
      "display": "def ohlcv_fill_up_missing_data(\n    dataframe: DataFrame,\n    timeframe: str,\n    pair: str,\n    candle_type: CandleType = CandleType.SPOT,\n) -> DataFrame:\n    \"\"\"\n    Fills up missing data with 0 volume rows,\n    using the previous close as price for \"open\", \"high\", \"low\" and \"close\", volume is set to 0\n\n    Candle types that carry a single value (e.g. funding rates) have no candle to fabricate -\n    inventing one would silently make up rates - so they are returned unchanged.\n    \"\"\"\n    if not candle_type_is_ohlcv(candle_type):\n        logger.debug(f\"Skipping fillup for {pair}, {timeframe} - not applicable to {candle_type}.\")\n        return dataframe\n\n    from freqtrade.exchange import timeframe_to_resample_freq\n\n    ohlcv_dict = {\"open\": \"first\", \"high\": \"max\", \"low\": \"min\", \"close\": \"last\", \"volume\": \"sum\"}\n    resample_interval = timeframe_to_resample_freq(timeframe)\n    # Resample to create \"NAN\" values\n    df = dataframe.resample(resample_interval, on=\"date\").agg(ohlcv_dict)\n\n    # Forwardfill close for missing columns\n    df[\"close\"] = df[\"close\"].ffill()\n    # Use close for \"open, high, low\"\n    df.loc[:, [\"open\", \"high\", \"low\"]] = df[[\"open\", \"high\", \"low\"]].fillna(\n        value={\n            \"open\": df[\"close\"],\n            \"high\": df[\"close\"],\n            \"low\": df[\"close\"],\n        }\n    )\n    df = df.reset_index()\n    len_before = len(dataframe)\n    len_after = len(df)\n    pct_missing = (len_after - len_before) / len_before if len_before > 0 else 0\n    if len_before != len_after:\n        message = (\n            f\"Missing data fillup for {pair}, {timeframe}: \"\n            f\"before: {len_before} - after: {len_after} - {pct_missing:.2%}\"\n        )\n        if pct_missing > 0.01:\n            logger.info(message)\n        else:\n            # Don't be verbose if only a small amount is missing\n            logger.debug(message)\n    return df\n",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Project source file, pandas",
      "display": "freqtrade/data/converter/converter.py",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Project full_name, pandas",
      "display": "freqtrade/freqtrade",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Project stargazers_count, pandas",
      "display": "56.9K",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Library name, statsmodels",
      "display": "Statsmodels",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Monthly downloads, statsmodels",
      "display": "40.4M",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "License, statsmodels",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Package release, statsmodels",
      "display": "0.15.0",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Package release date, statsmodels",
      "display": "Aug 2026",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Install, statsmodels",
      "display": "pip install statsmodels",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Quickstart, statsmodels",
      "display": "from statsmodels.tsa.seasonal import seasonal_decompose\n\nresult = seasonal_decompose([1.0, 2.0, 3.0, 4.0] * 3, period=4)\nprint(result.trend, result.seasonal, result.resid)\n",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Repository stars, statsmodels",
      "display": "11.8K",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Native forecasting estimators, statsmodels",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Regime or change-point models, statsmodels",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Native analysis role, statsmodels",
      "display": "Classical seasonal decomposition, STL, and MSTL algorithms. Retained as a fully researched ninth eligible row below the selected download cutoff, not hidden for source convenience.",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "First-call prerequisites, statsmodels",
      "display": "At least two complete finite seasonal cycles and a positive period. This simple additive decomposition differs from robust STL and multiseason MSTL.",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Whole project function contract, statsmodels",
      "display": "{\"arguments\": \"Original Darts branches select classical decomposition, STL, or MSTL. Current period/periods/endog/model keyword roles are preserved, including caller-supplied kwargs. Series/cycle, integer/multiple seasonal-period, positive multiplicative input, and Darts univariate/enum/index preconditions remain actual host requirements. No model fit ran.\", \"returns\": \"Consumes native seasonal/trend and optional resid attributes and passes them into Darts TimeSeries. MSTL seasonal columns are retained; component names/static covariates/hierarchy are preserved only when component count matches, otherwise cleared. return_residual controls a third returned series. There is no sum across MSTL seasonalities. Naive branch does not forward kwargs; it explicitly uses extrapolate_trend=\\\"period\\\", documented in current0.15.0. Statistical validity and an entire Darts upgrade are not asserted.\"}",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Core task role, statsmodels",
      "display": "Statistical decomposition, forecasting, and regime-switching models.",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "First-call prerequisites, statsmodels",
      "display": "At least two complete finite seasonal cycles and a positive period. This simple additive decomposition differs from robust STL and multiseason MSTL.",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Project function, statsmodels",
      "display": "def extract_trend_and_seasonality(\n    ts: TimeSeries,\n    freq: int | Sequence[int] | None = None,\n    model: Literal[\"additive\", \"multiplicative\"] = MULTIPLICATIVE,\n    method: str = \"naive\",\n    return_residual: bool = False,\n    **kwargs,\n) -> tuple[TimeSeries, TimeSeries] | tuple[TimeSeries, TimeSeries, TimeSeries]:\n    \"\"\"\n    Extracts trend, seasonality and residual from a TimeSeries instance using `statsmodels.tsa`.\n\n    Parameters\n    ----------\n    ts\n        The series to decompose\n    freq\n        The seasonality period to use.\n    model\n        The type of decomposition to use: ``\"additive\"`` or ``\"multiplicative\"``. Defaults to ``\"multiplicative\"``.\n    method\n        The method to be used to decompose the series.\n        - \"naive\" : Seasonal decomposition using moving averages [1]_.\n        - \"STL\" : Season-Trend decomposition using LOESS [2]_. Only compatible with ``ADDITIVE`` model type.\n        - \"MSTL\" : Season-Trend decomposition using LOESS with multiple seasonalities [3]_.\n        Only compatible with ``ADDITIVE`` model type.\n    return_residual\n        If ``False`` (default), return only the trend and seasonal parts. If ``True``, also return the residual\n        part as a third time series.\n    kwargs\n        Other keyword arguments are passed down to the decomposition method.\n\n    Returns\n    -------\n    Tuple[TimeSeries, TimeSeries] | Tuple[TimeSeries, TimeSeries, TimeSeries]\n        A tuple ``(trend, seasonal)`` when ``return_residual=False``, otherwise\n        ``(trend, seasonal, residual)``.\n\n    References\n    ----------\n    .. [1] https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.seasonal_decompose.html\n    .. [2] https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.STL.html\n    .. [3] https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.MSTL.html\n    \"\"\"\n    model = validate_mode(model, param=\"model\", allowed={ADDITIVE, MULTIPLICATIVE})\n\n    if isinstance(freq, Sequence) and method != \"MSTL\":\n        raise_log(\n            ValueError(\n                f\"{method} decomposition cannot be performed with more than one seasonality, received {freq}.\"\n            ),\n        )\n\n    values = ts.to_series(copy=False)\n    if np.isnan(values).any():\n        raise_log(ValueError(\"`ts` must not contain missing values.\"))\n\n    if method == \"naive\":\n        decomp = seasonal_decompose(\n            values, period=freq, model=model, extrapolate_trend=\"period\"\n        )\n    elif method == \"STL\":\n        if model != ADDITIVE:\n            raise_log(\n                ValueError(\n                    f\"Only ADDITIVE model is compatible with the STL method. Current model is {model}.\"\n                ),\n            )\n        decomp = STL(endog=values, period=freq, **kwargs).fit()\n    elif method == \"MSTL\":\n        if model != ADDITIVE:\n            raise_log(\n                ValueError(\n                    f\"Only ADDITIVE model is compatible with the MSTL method. Current model is {model}.\"\n                ),\n            )\n        decomp = MSTL(endog=values, periods=freq, **kwargs).fit()\n    else:\n        raise_log(ValueError(f\"Unknown value for `method`: {method}.\"))\n\n    # keep components, ... only if the number of components matches\n    season_shape = decomp.seasonal.shape\n    if len(season_shape) == 1:\n        season_shape = (season_shape[0], 1)\n    if season_shape[1] == ts.n_components:\n        components = ts.components\n        static_covariates = ts.static_covariates\n        hierarchy = ts.hierarchy\n    else:\n        components = None\n        static_covariates = None\n        hierarchy = None\n\n    season = TimeSeries(\n        times=ts.time_index,\n        values=decomp.seasonal,\n        components=components,\n        static_covariates=static_covariates,\n        hierarchy=hierarchy,\n        metadata=ts.metadata,\n        copy=False,\n    )\n    trend = TimeSeries(\n        times=ts.time_index,\n        values=decomp.trend,\n        components=ts.components,\n        copy=False,\n        **ts._attrs,\n    )\n    if not return_residual:\n        return trend, season\n\n    residual = TimeSeries(\n        times=ts.time_index,\n        values=decomp.resid,\n        components=ts.components,\n        copy=False,\n        **ts._attrs,\n    )\n    return trend, season, residual\n",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Project source file, statsmodels",
      "display": "darts/utils/statistics.py",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Project full_name, statsmodels",
      "display": "unit8co/darts",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Project stargazers_count, statsmodels",
      "display": "9.6K",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Library name, prophet",
      "display": "Prophet",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Monthly downloads, prophet",
      "display": "4.1M",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "License, prophet",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Package release, prophet",
      "display": "1.5.0",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Package release date, prophet",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Install, prophet",
      "display": "pip install prophet",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Quickstart, prophet",
      "display": "# Python\nimport pandas as pd\nfrom prophet import Prophet\n\n# Python\ndf = pd.read_csv('https://raw.githubusercontent.com/facebook/prophet/main/examples/example_wp_log_peyton_manning.csv')\ndf.head()\n\n# Python\nm = Prophet()\nm.fit(df)\n",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Official description, prophet",
      "display": "Runs an automatic forecasting procedure.",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Quickstart source file, prophet",
      "display": "quick_start.html",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Repository stars, prophet",
      "display": "20.5K",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Native forecasting estimators, prophet",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Regime or change-point models, prophet",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Statistical task and abstraction, prophet",
      "display": "Statistical time-series forecasting with trend, seasonality, and optional full Bayesian sampling.",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Python requirement, prophet",
      "display": ">=3.10",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "First-call prerequisites, prophet",
      "display": "[\"Official Python quickstart fragments combined, retaining source segments. Example CSV must be fetched from the public URL if not cached; Prophet fitting requires its packaged Stan backend. No fetching of dataset or fitting executed here.\"]",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Default versus full Bayesian fit, prophet",
      "display": "Default MAP fit; mcmc_samples>0 enables full Bayesian sampling using Stan NUTS.",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Core task role, prophet",
      "display": "Seasonal univariate forecasting with trend changepoints and configurable intervals.",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "First-call prerequisites, prophet",
      "display": "[\"Official Python quickstart fragments combined, retaining source segments. Example CSV must be fetched from the public URL if not cached; Prophet fitting requires its packaged Stan backend. No fetching of dataset or fitting executed here.\"]",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Project function, prophet",
      "display": "def _prophet_fit_and_predict(  # pylint: disable=too-many-arguments\n    df: DataFrame,\n    confidence_interval: float,\n    yearly_seasonality: Union[bool, str, int],\n    weekly_seasonality: Union[bool, str, int],\n    daily_seasonality: Union[bool, str, int],\n    periods: int,\n    freq: str,\n) -> DataFrame:\n    \"\"\"\n    Fit a prophet model and return a DataFrame with predicted results.\n    \"\"\"\n    try:\n        # `prophet` complains about `plotly` not being installed\n        with suppress_logging(\"prophet.plot\"):\n            # pylint: disable=import-outside-toplevel\n            from prophet import Prophet\n\n        prophet_logger = logging.getLogger(\"prophet.plot\")\n        prophet_logger.setLevel(logging.CRITICAL)\n        prophet_logger.setLevel(logging.NOTSET)\n    except ModuleNotFoundError as ex:\n        raise InvalidPostProcessingError(_(\"`prophet` package not installed\")) from ex\n    model = Prophet(\n        interval_width=confidence_interval,\n        yearly_seasonality=yearly_seasonality,\n        weekly_seasonality=weekly_seasonality,\n        daily_seasonality=daily_seasonality,\n    )\n    if df[\"ds\"].dt.tz:\n        df[\"ds\"] = df[\"ds\"].dt.tz_convert(None)\n    try:\n        model.fit(df)\n        future = model.make_future_dataframe(periods=periods, freq=freq)\n        forecast = model.predict(future)[[\"ds\", \"yhat\", \"yhat_lower\", \"yhat_upper\"]]\n    except Exception as ex:  # noqa: BLE001\n        raise InvalidPostProcessingError(\n            _(\n                \"Unable to generate forecast: %(error)s\",\n                error=str(ex),\n            )\n        ) from ex\n    return forecast.join(df.set_index(\"ds\"), on=\"ds\").set_index([\"ds\"])\n",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Project source file, prophet",
      "display": "superset/utils/pandas_postprocessing/prophet.py",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Project full_name, prophet",
      "display": "apache/superset",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Project stargazers_count, prophet",
      "display": "75.5K",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Library name, ruptures",
      "display": "ruptures",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "Monthly downloads, ruptures",
      "display": "1.3M",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "License, ruptures",
      "display": "BSD-2-Clause",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Package release, ruptures",
      "display": "1.1.10",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Package release date, ruptures",
      "display": "Sep 2025",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Install, ruptures",
      "display": "pip install ruptures",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Quickstart, ruptures",
      "display": "import numpy as np\nimport ruptures as rpt\n\nsignal = np.r_[np.zeros(20), np.ones(20)]\nmodel = rpt.Binseg(model='l2').fit(signal)\nbreakpoints = model.predict(n_bkps=1)\nprint(breakpoints)\n",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Repository stars, ruptures",
      "display": "2.1K",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Native forecasting estimators, ruptures",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Regime or change-point models, ruptures",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Core task role, ruptures",
      "display": "Offline segmentation into change-point endpoints.",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "First-call prerequisites, ruptures",
      "display": "Local synthetic one-dimensional fixture; predict(1) requests one change point. The terminal sample index is also returned; it is not an extra estimated change point.",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Project function, ruptures",
      "display": "def _run_binseg(self, X):\n    import ruptures as rpt\n\n    binseg = rpt.Binseg(\n        model=self.model, min_size=self.min_size, jump=self.jump\n    ).fit(X)\n    found_cps = np.array(binseg.predict(n_bkps=self.n_cps)[:-1], dtype=np.int64)\n\n    return found_cps\n",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Project source file, ruptures",
      "display": "aeon/segmentation/_binseg.py",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Project full_name, ruptures",
      "display": "aeon-toolkit/aeon",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Project stargazers_count, ruptures",
      "display": "1.5K",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Library name, arch",
      "display": "ARCH",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Monthly downloads, arch",
      "display": "1.1M",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "License, arch",
      "display": "NCSA",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Package release, arch",
      "display": "9.0.0",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Package release date, arch",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Install, arch",
      "display": "pip install arch",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Quickstart, arch",
      "display": "import arch.data.sp500\nfrom arch import arch_model\n\nsp500 = arch.data.sp500.load()\nsp500 = sp500.loc['2000-01-01':'2014-01-01']\nreturns = 100 * sp500['Adj Close'].pct_change().dropna()\nmodel = arch_model(returns)\nresult = model.fit()\n",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Official description, arch",
      "display": "Implements ARCH models in Python.",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Quickstart source file, arch",
      "display": "univariate/introduction.html",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Repository stars, arch",
      "display": "1.7K",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Native forecasting estimators, arch",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Regime or change-point models, arch",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Core task role, arch",
      "display": "Conditional volatility models plus dependent-data bootstrap and financial econometrics.",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "First-call prerequisites, arch",
      "display": "Uses the bundled official S&P500 fixture and the default univariate GARCH model. Only original variable names am/res are clarified in this disclosed recipe; no fitted result or performance statistic is asserted.",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Project function, arch",
      "display": "def bootstrapping(\n    X,\n    kind=\"stationary\",\n    q=0.05,\n    n_sim=6000,\n    window=3,\n    diag=False,\n    threshold=1e-15,\n    seed=0,\n):\n    r\"\"\"\n    Estimates the uncertainty sets of mean and covariance matrix through the selected\n    bootstrapping method.\n\n    Parameters\n    ----------\n    X : DataFrame of shape (n_samples, n_assets)\n        Assets returns DataFrame, where n_samples is the number of\n        observations and n_assets is the number of assets.\n    kind : str, optional\n        The bootstrapping method. The default value is 'stationary'. Possible values are:\n\n        - 'stationary': stationary bootstrapping method, see `StationaryBootstrap <https://bashtage.github.io/arch/bootstrap/generated/arch.bootstrap.StationaryBootstrap.html#arch.bootstrap.StationaryBootstrap>`_ for more details.\n        - 'circular': circular bootstrapping method, see `CircularBlockBootstrap <https://bashtage.github.io/arch/bootstrap/generated/arch.bootstrap.CircularBlockBootstrap.html#arch.bootstrap.CircularBlockBootstrap>`_ for more details.\n        - 'moving': moving bootstrapping method, see `MovingBlockBootstrap <https://bashtage.github.io/arch/bootstrap/generated/arch.bootstrap.MovingBlockBootstrap.html#arch.bootstrap.MovingBlockBootstrap>`_ for more details.\n    q : float, optional\n        Significance level for box and elliptical constraints.\n        The default is 0.05.\n    n_sim : int, optional\n        Number of simulations of the bootstrapping method.\n        The default is 6000.\n    window : int, optional\n        Block size of the bootstrapping method. Must be greather than 1\n        and lower than the n_samples - n_factors + 1\n        The default is 3.\n    diag : bool, optional\n        If consider only the main diagonal of covariance matrices of estimation\n        errors following :cite:`b-fabozzi2007robust`. The default is False.\n    threshold : float, optional\n        Parameter used to fix covariance matrices in case they are not positive semidefinite.\n        The default is 1e-15.\n    seed : int, optional\n        Seed used to generate random numbers for bootstrapping method.\n        The default is 0.\n\n    Returns\n    -------\n    mu_l : DataFrame\n        The q/2 percentile of mean vector obtained through the selected\n        bootstrapping method.\n    mu_u : DataFrame\n        The 1-q/2 percentile of mean vector obtained through the selected\n        bootstrapping method.\n    cov_l : DataFrame\n        The q/2 percentile of covariance matrix obtained through the selected\n        bootstrapping method.\n    cov_u : DataFrame\n        The 1-q/2 percentile of covariance matrix obtained through the selected\n        bootstrapping method.\n    cov_mu : DataFrame\n        The covariance matrix of estimation errors of mean vector obtained\n        through the selected bootstrapping method.\n    cov_sigma : DataFrame\n        The covariance matrix of estimation errors of covariance matrix\n        obtained through the selected bootstrapping method.\n    k_mu : DataFrame\n        The square root of size of elliptical constraint of mean vector\n        estimation error based on 1-q percentile.\n    k_sigma : DataFrame\n        The square root of size of elliptical constraint of covariance matrix\n        estimation error based on 1-q percentile.\n\n    Raises\n    ------\n    ValueError\n        When the value cannot be calculated.\n\n    \"\"\"\n\n    if not isinstance(X, pd.DataFrame):\n        raise TypeError(\"X must be a DataFrame\")\n\n    if window >= X.shape[0] - window + 1:\n        raise ValueError(\"block must be lower than  n_samples - window + 1\")\n    elif window <= 1:\n        raise ValueError(\"block must be greather than 1\")\n\n    cols = X.columns.tolist()\n    cols_2 = [i + \"-\" + j for i in cols for j in cols]\n    T, n = X.shape\n\n    mu = X.mean().to_numpy().reshape(1, n)\n    vec_Sigma = X.cov().to_numpy().reshape((1, n**2), order=\"F\")\n\n    mus = np.zeros((n_sim, 1, n))\n    covs = np.zeros((n_sim, n, n))\n\n    if kind == \"stationary\":\n        gen = bs.StationaryBootstrap(window, X, seed=seed)\n    elif kind == \"circular\":\n        gen = bs.CircularBlockBootstrap(window, X, seed=seed)\n    elif kind == \"moving\":\n        gen = bs.MovingBlockBootstrap(window, X, seed=seed)\n    else:\n        raise ValueError(\"kind only can be 'stationary', 'circular' or 'moving'\")\n\n    i = 0\n    for data in gen.bootstrap(n_sim):\n        A = data[0][0]\n        mus[i] = A.mean().to_numpy().reshape(1, n)\n        covs[i] = A.cov().to_numpy()\n        i += 1\n\n    # Box Constraint for Mean\n    mu_l = np.percentile(mus, q=q / 2 * 100, axis=0, keepdims=True).reshape(1, n)\n    mu_u = np.percentile(mus, q=(1 - q / 2) * 100, axis=0, keepdims=True).reshape(1, n)\n    mu_l = pd.DataFrame(mu_l, index=[0], columns=cols)\n    mu_u = pd.DataFrame(mu_u, index=[0], columns=cols)\n\n    # Box Constraint for Covariance\n    cov_l = np.percentile(covs, q=q / 2 * 100, axis=0, keepdims=True).reshape(n, n)\n    cov_u = np.percentile(covs, q=(1 - q / 2) * 100, axis=0, keepdims=True).reshape(\n        n, n\n    )\n    cov_l = pd.DataFrame(cov_l, index=cols, columns=cols)\n    cov_u = pd.DataFrame(cov_u, index=cols, columns=cols)\n\n    # Check and fix if upper and lower bound for Covariance are positive\n    # semidefinite and fix when they are not\n    if af.is_pos_def(cov_l) is False:\n        cov_l = af.cov_fix(cov_l, method=\"clipped\", threshold=threshold)\n    if af.is_pos_def(cov_u) is False:\n        cov_u = af.cov_fix(cov_u, method=\"clipped\", threshold=threshold)\n\n    # Elliptical Constraint for Mean\n    A_mu = mus.reshape(n_sim, n) - np.repeat(mu, n_sim, axis=0)\n    cov_mu = np.cov(A_mu, rowvar=False)\n    if diag is True:\n        cov_mu = np.diag(np.diag(cov_mu))\n    k_mus = np.diag(A_mu @ inv(cov_mu) @ A_mu.T)\n    k_mu = np.percentile(k_mus, q=(1 - q) * 100) ** 0.5\n    cov_mu = pd.DataFrame(cov_mu, index=cols, columns=cols)\n\n    # Elliptical Constraint for Covariance\n    A_Sigma = covs.reshape((n_sim, n**2), order=\"F\")\n    A_Sigma = A_Sigma - np.repeat(vec_Sigma, n_sim, axis=0)\n    cov_sigma = np.cov(A_Sigma, rowvar=False)\n    cov_sigma = af.cov_fix(cov_sigma, method=\"clipped\", threshold=threshold)\n    if diag is True:\n        cov_sigma = np.diag(np.diag(cov_sigma))\n    if af.is_pos_def(cov_sigma) is False:\n        cov_sigma = af.cov_fix(cov_sigma, method=\"clipped\", threshold=threshold)\n    k_sigmas = np.diag(A_Sigma @ inv(cov_sigma) @ A_Sigma.T)\n    k_sigma = np.percentile(k_sigmas, q=(1 - q) * 100) ** 0.5\n    cov_sigma = pd.DataFrame(cov_sigma, index=cols_2, columns=cols_2)\n\n    return mu_l, mu_u, cov_l, cov_u, cov_mu, cov_sigma, k_mu, k_sigma\n",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Project source file, arch",
      "display": "riskfolio/src/ParamsEstimation.py",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Project full_name, arch",
      "display": "dcajasn/Riskfolio-Lib",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Project stargazers_count, arch",
      "display": "4.6K",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Library name, sktime",
      "display": "sktime",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Monthly downloads, sktime",
      "display": "678.5K",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "License, sktime",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Package release, sktime",
      "display": "1.3.0",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Package release date, sktime",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Install, sktime",
      "display": "pip install sktime",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Quickstart, sktime",
      "display": "from sktime.datasets import load_airline\nfrom sktime.forecasting.naive import NaiveForecaster\n\ny = load_airline()\nforecaster = NaiveForecaster(strategy='last')\nforecaster.fit(y)\nforecast = forecaster.predict(fh=[1, 2, 3])\nprint(forecast)\n",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Official description, sktime",
      "display": "Provides a unified framework for machine learning with time series.",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Quickstart source file, sktime",
      "display": "examples/01_forecasting.html",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Repository stars, sktime",
      "display": "10.1K",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Native forecasting estimators, sktime",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Regime or change-point models, sktime",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Core task role, sktime",
      "display": "Unified time-series estimator, forecasting, detection, and model-selection interfaces.",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "First-call prerequisites, sktime",
      "display": "Bundled univariate airline fixture with a regular monthly index. Relative integer forecasting horizon means the next three periods; this simple baseline is not a model-selection benchmark.",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "Library name, stumpy",
      "display": "STUMPY",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Monthly downloads, stumpy",
      "display": "292.1K",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "License, stumpy",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Package release, stumpy",
      "display": "1.14.1",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "Package release date, stumpy",
      "display": "Feb 2026",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Install, stumpy",
      "display": "pip install stumpy",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "Quickstart, stumpy",
      "display": "import stumpy\nimport numpy as np\n\nif __name__ == \"__main__\":\n    your_time_series = np.random.rand(10000)\n    window_size = 50  # Approximately, how many data points might be found in a pattern \n\n    matrix_profile = stumpy.stump(your_time_series, m=window_size)\n",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Official description, stumpy",
      "display": "Mines time series data for a variety of tasks.",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "Quickstart source file, stumpy",
      "display": "README.rst",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "Repository stars, stumpy",
      "display": "4.2K",
      "asOf": "2026-11-20"
    },
    "F255": {
      "label": "Native forecasting estimators, stumpy",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F256": {
      "label": "Regime or change-point models, stumpy",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F257": {
      "label": "Core task role, stumpy",
      "display": "Matrix-profile motif/discord analysis and semantic regime segmentation.",
      "asOf": "2026-11-20"
    },
    "F258": {
      "label": "First-call prerequisites, stumpy",
      "display": "Original native STUMP README starter; main guard and random fixture are preserved. Computes a self-join matrix profile, not a forecast. Numba JIT startup and hardware-specific performance are not measured.",
      "asOf": "2026-11-20"
    },
    "F259": {
      "label": "Project function, stumpy",
      "display": "def _predict(self, X: np.ndarray) -> np.ndarray:\n    import stumpy\n\n    self._check_params(X)\n    mp = stumpy.stump(\n        X[:, 0],\n        m=self.window_size,\n        ignore_trivial=self.ignore_trivial,\n        normalize=self.normalize,\n        p=self.p,\n        k=self.k,\n    )\n    point_anomaly_scores = reverse_windowing(mp[:, 0], self.window_size)\n    return point_anomaly_scores\n",
      "asOf": "2026-11-20"
    },
    "F260": {
      "label": "Project source file, stumpy",
      "display": "aeon/anomaly_detection/series/distance_based/_stomp.py",
      "asOf": "2026-11-20"
    },
    "F261": {
      "label": "Project full_name, stumpy",
      "display": "aeon-toolkit/aeon",
      "asOf": "2026-11-20"
    },
    "F262": {
      "label": "Project stargazers_count, stumpy",
      "display": "1.5K",
      "asOf": "2026-11-20"
    },
    "F263": {
      "label": "Library name, tsfresh",
      "display": "tsfresh",
      "asOf": "2026-11-20"
    },
    "F264": {
      "label": "Monthly downloads, tsfresh",
      "display": "189.2K",
      "asOf": "2026-11-20"
    },
    "F265": {
      "label": "License, tsfresh",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F266": {
      "label": "Package release, tsfresh",
      "display": "0.21.2",
      "asOf": "2026-11-20"
    },
    "F267": {
      "label": "Package release date, tsfresh",
      "display": "May 2026",
      "asOf": "2026-11-20"
    },
    "F268": {
      "label": "Install, tsfresh",
      "display": "pip install tsfresh",
      "asOf": "2026-11-20"
    },
    "F269": {
      "label": "Quickstart, tsfresh",
      "display": "from tsfresh.examples.robot_execution_failures import (\n    download_robot_execution_failures, load_robot_execution_failures,\n)\nfrom tsfresh import extract_features\n\ndownload_robot_execution_failures()\ntimeseries, y = load_robot_execution_failures()\nfeatures = extract_features(timeseries, column_id='id', column_sort='time')\n",
      "asOf": "2026-11-20"
    },
    "F270": {
      "label": "Repository stars, tsfresh",
      "display": "9.5K",
      "asOf": "2026-11-20"
    },
    "F271": {
      "label": "Native forecasting estimators, tsfresh",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F272": {
      "label": "Regime or change-point models, tsfresh",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F273": {
      "label": "Core task role, tsfresh",
      "display": "Grouped sensor/time-series feature extraction for downstream machine learning.",
      "asOf": "2026-11-20"
    },
    "F274": {
      "label": "First-call prerequisites, tsfresh",
      "display": "Official quick-start dataset download needs network access when a reader executes it; no download or SDK ran during research. Grouped sensor measurements produce one feature row per id, not an already-fitted classifier.",
      "asOf": "2026-11-20"
    },
    "F275": {
      "label": "Project function, tsfresh",
      "display": "def _transform(self, X, y=None):\n    \"\"\"Transform X and return a transformed version.\n\n    private _transform containing core logic, called from transform\n\n    Parameters\n    ----------\n    X : 3D np.ndarray of shape (n_cases, n_channels, n_timepoints)\n        or list of np.ndarray of shape [n_cases], where each array is a\n        2D np.ndarray of shape = [n_channels, n_timepoints_i]\n        input time series collection.\n    y : ignored argument for interface compatibility\n\n    Returns\n    -------\n    Xt : np.ndarray of shape (n_cases, n_features)\n        Transformed data.\n    \"\"\"\n    Xt = _from_collection_to_long(X)\n\n    # lazy imports to avoid hard dependency\n    from tsfresh import extract_features\n\n    Xt = extract_features(\n        Xt,\n        column_id=\"index\",\n        column_value=\"value\",\n        column_kind=\"column\",\n        column_sort=\"time_index\",\n        **self.default_fc_parameters_,\n    )\n    return Xt.to_numpy()\n",
      "asOf": "2026-11-20"
    },
    "F276": {
      "label": "Project source file, tsfresh",
      "display": "aeon/transformations/collection/feature_based/_tsfresh.py",
      "asOf": "2026-11-20"
    },
    "F277": {
      "label": "Project full_name, tsfresh",
      "display": "aeon-toolkit/aeon",
      "asOf": "2026-11-20"
    },
    "F278": {
      "label": "Project stargazers_count, tsfresh",
      "display": "1.5K",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best Python time series libraries pandas statsmodels tsfresh ruptures code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
