{
  "id": "task_libraries:statistics/python",
  "path": "/exapedia/python-statistics-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python statistics libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python statistics libraries compute descriptive statistics, run hypothesis tests, and fit statistical models to data. Some libraries specialize in one family of models, such as survival analysis, Bayesian inference, or time series forecasting. These libraries let analysts, researchers, and AI agents test hypotheses and fit models in Python."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python statistics libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#scipy",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F125"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F126"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F132"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#statsmodels",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F144"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F145"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F148"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#cmdstanpy",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F163"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#prophet",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F184"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F185"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F193"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#arviz",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F205"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F209"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#lifelines",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F226"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F230"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#statsforecast",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F247"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F248"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F251"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F249"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pmdarima",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F268"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F269"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F277"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F272"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F270"
                }
              ]
            ]
          ],
          "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": "#scipy",
          "label": [
            {
              "t": "text",
              "text": "SciPy"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F126"
        },
        {
          "t": "text",
          "text": ", a count that covers all its scientific computing."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "NUTS sampler",
            "Cox PH regression",
            "Forecasting API"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#scipy",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F125"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F133"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#statsmodels",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F144"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#cmdstanpy",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F163"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#prophet",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F184"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F196"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#arviz",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F205"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F216"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F217"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#lifelines",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F226"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#statsforecast",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F247"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F257"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F258"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F259"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pmdarima",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F268"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F278"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F279"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F280"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "scipy",
          "name": [
            {
              "t": "fact",
              "fact": "F125"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/scipy/scipy"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/scipy"
            },
            {
              "label": "Docs",
              "href": "https://docs.scipy.org/doc/scipy/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F12"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F126"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F132"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.scipy.org/doc/scipy/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F125"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F20"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F142"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/mwaskom/seaborn",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F142"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _fit(self, fit_data, weights=None):\n    \"\"\"Fit the scipy kde while adding bw_adjust logic and version check.\"\"\"\n    fit_kws = {\"bw_method\": self.bw_method}\n    if weights is not None:\n        fit_kws[\"weights\"] = weights\n\n    kde = gaussian_kde(fit_data, **fit_kws)\n    kde.set_bandwidth(kde.factor * self.bw_adjust)\n\n    return kde\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/mwaskom/seaborn/blob/c1cb287835852406691aed60ea0c62710f2c6b18/seaborn/_statistics.py#L137-L146",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F141"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20scipy%20to%20fit%20statistical%20models%2C%20compare%20groups%20and%20generate%20predictions&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": "F125"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import numpy as np\nfrom scipy import stats\nrng = np.random.default_rng()\nrvs1 = stats.norm.rvs(loc=5, scale=10, size=500, random_state=rng)\nrvs2 = stats.norm.rvs(loc=5, scale=10, size=500, random_state=rng)\nstats.ttest_ind(rvs1, rvs2)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.ttest_ind.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "scipy.stats.ttest_ind.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F130"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "statsmodels",
          "name": [
            {
              "t": "fact",
              "fact": "F144"
            }
          ],
          "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": "F145"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F147"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://www.statsmodels.org/stable/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F144"
                    },
                    {
                      "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": "F161"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/mwaskom/seaborn",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F161"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def fit_statsmodels(self, grid, model, **kwargs):\n    \"\"\"More general regression function using statsmodels objects.\"\"\"\n    import statsmodels.tools.sm_exceptions as sme\n    X, y = np.c_[np.ones(len(self.x)), self.x], self.y\n    grid = np.c_[np.ones(len(grid)), grid]\n\n    def reg_func(_x, _y):\n        err_classes = (sme.PerfectSeparationError,)\n        try:\n            with warnings.catch_warnings():\n                if hasattr(sme, \"PerfectSeparationWarning\"):\n                    # statsmodels>=0.14.0\n                    warnings.simplefilter(\"error\", sme.PerfectSeparationWarning)\n                    err_classes = (*err_classes, sme.PerfectSeparationWarning)\n                yhat = model(_y, _x, **kwargs).fit().predict(grid)\n        except err_classes:\n            yhat = np.empty(len(grid))\n            yhat.fill(np.nan)\n        return yhat\n\n    yhat = reg_func(X, y)\n    if self.ci is None:\n        return yhat, None\n\n    yhat_boots = algo.bootstrap(X, y,\n                                func=reg_func,\n                                n_boot=self.n_boot,\n                                units=self.units,\n                                seed=self.seed)\n    return yhat, yhat_boots\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/mwaskom/seaborn/blob/c1cb287835852406691aed60ea0c62710f2c6b18/seaborn/regression.py#L275-L304",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F160"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20statsmodels%20to%20fit%20statistical%20models%2C%20compare%20groups%20and%20generate%20predictions&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": "F144"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import numpy as np\nimport statsmodels.api as sm\nimport statsmodels.formula.api as smf\n# Load data\ndat = sm.datasets.get_rdataset(\"Guerry\", \"HistData\").data\n# Fit regression model (using the natural log of one of the regressors)\nresults = smf.ols('Lottery ~ Literacy + np.log(Pop1831)', data=dat).fit()\n# Inspect the results\nprint(results.summary())\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://www.statsmodels.org/stable/index.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "index.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F149"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "cmdstanpy",
          "name": [
            {
              "t": "fact",
              "fact": "F163"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/stan-dev/cmdstanpy"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/cmdstanpy"
            },
            {
              "label": "Docs",
              "href": "https://mc-stan.org/cmdstanpy/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F170"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://mc-stan.org/cmdstanpy/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F163"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F183"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/meta/prophet",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F182"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def sampling(\n    self,\n    stan_init: dict[str, float],\n    stan_data: dict[str, Any],\n    samples: int,\n    **kwargs: Any,\n) -> OrderedDict[str, np.ndarray]:\n    if 'inits' not in kwargs and 'init' in kwargs:\n        stan_init = self.sanitize_custom_inits(stan_init, kwargs['init'])\n        del kwargs['init']\n\n    inits_list, data_list = self.prepare_data(stan_init, stan_data)\n    args = dict(\n        data=data_list,\n        inits=inits_list,\n    )\n    if 'chains' not in kwargs:\n        kwargs['chains'] = 4\n    iter_half = samples // 2\n    kwargs['iter_sampling'] = iter_half\n    if 'iter_warmup' not in kwargs:\n        kwargs['iter_warmup'] = iter_half\n    args.update(kwargs)\n\n    self.stan_fit = self.model.sample(**args)\n    res = self.stan_fit.draws()\n    (samples, c, columns) = res.shape\n    res = res.reshape((samples * c, columns))\n    params = self.stan_to_dict_numpy(self.stan_fit.column_names, res)\n\n    for par in params:\n        s = params[par].shape\n        if s[1] == 1:\n            params[par] = params[par].reshape((s[0],))\n\n        if par in ['delta', 'beta'] and len(s) < 2:\n            params[par] = params[par].reshape((-1, 1))\n\n    return params\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/meta/prophet/blob/5cf15c0f6e5d5259d9dd8d511fb4e15a45884cdc/python/prophet/models.py#L186-L224",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F181"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=cmdstanpy%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F163"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import os\nfrom cmdstanpy import cmdstan_path, CmdStanModel\n\n# specify locations of Stan program file and data\nstan_file = os.path.join(cmdstan_path(), 'examples', 'bernoulli', 'bernoulli.stan')\ndata_file = os.path.join(cmdstan_path(), 'examples', 'bernoulli', 'bernoulli.data.json')\n\n# instantiate a model; compiles the Stan program by default\nmodel = CmdStanModel(stan_file=stan_file)\n\n# obtain a posterior sample from the model conditioned on the data\nfit = model.sample(chains=4, data=data_file)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/stan-dev/cmdstanpy/blob/develop/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F168"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "prophet",
          "name": [
            {
              "t": "fact",
              "fact": "F184"
            }
          ],
          "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": "F191"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F185"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F193"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F187"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://facebook.github.io/prophet/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F184"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F204"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/apache/superset",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F203"
                    }
                  ]
                },
                {
                  "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": "F202"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=prophet%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F184"
                    },
                    {
                      "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": "F189"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "arviz",
          "name": [
            {
              "t": "fact",
              "fact": "F205"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/arviz-devs/arviz"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/arviz"
            },
            {
              "label": "Docs",
              "href": "https://python.arviz.org/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F212"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://python.arviz.org/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F205"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/pymc-labs/pymc-marketing",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F224"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _create_get_hdi_plot_data(hdi_kwargs) -> GetPlotData:\n    def get_plot_data(data: xr.DataArray) -> xr.DataArray:\n        hdi = az.hdi(data, **hdi_kwargs)\n        if isinstance(hdi, xr.Dataset) and data.name is not None:\n            return hdi[data.name]\n        return hdi  # DataArray case\n\n    return get_plot_data\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/pymc-labs/pymc-marketing/blob/93a9bd1626c777285463a535c43ec9c94f672359/pymc_marketing/plot.py#L266-L273",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F223"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=arviz%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F205"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import arviz as az\nimport numpy as np\n\ndata = np.random.default_rng().normal(size=2000)\naz.hdi(data, 0.68)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/arviz-devs/arviz-stats/blob/main/src/arviz_stats/visualization.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "visualization.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F210"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "lifelines",
          "name": [
            {
              "t": "fact",
              "fact": "F226"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/CamDavidsonPilon/lifelines"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/lifelines"
            },
            {
              "label": "Docs",
              "href": "https://lifelines.readthedocs.io/en/latest/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F233"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F229"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://lifelines.readthedocs.io/en/latest/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F226"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/autonlab/auton-survival",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F245"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _fit_cph(features, outcomes, val_data, random_seed, **hyperparams):\n  \"\"\"Fit a linear Cox Proportional Hazards model to a given dataset.\n\n  Parameters\n  -----------\n  features : pd.DataFrame\n      A pandas dataframe with rows corresponding to individual samples and\n      columns as covariates.\n  outcomes : pd.DataFrame\n      A pandas dataframe with columns 'time' and 'event'.\n  val_data : tuple\n      A tuple of the validation dataset features and outcomes of\n      'time' and 'event'.\n  random_seed : int\n      Controls the reproducibility of called functions.\n  hyperparams : Optional arguments\n      Options include:\n      - 'l2' : float, default=1e-3\n          Penalizer\n\n  Returns\n  -----------\n  Trained instance of the Cox Proportional Hazards model.\n\n  \"\"\"\n\n  from lifelines import CoxPHFitter\n\n  data = outcomes.join(features)\n  penalizer = hyperparams.get('l2', 1e-3)\n\n  return CoxPHFitter(penalizer=penalizer).fit(data,\n                                              duration_col='time',\n                                              event_col='event')\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/autonlab/auton-survival/blob/5dde465f7223601717abddc1d075e837707c403b/auton_survival/estimators.py#L236-L269",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F244"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=lifelines%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F226"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from lifelines.datasets import load_waltons\ndf = load_waltons() # returns a Pandas DataFrame\n\nT = df['T']\nE = df['E']\n\nfrom lifelines import KaplanMeierFitter\nkmf = KaplanMeierFitter()\nkmf.fit(T, event_observed=E)  # or, more succinctly, kmf.fit(T, E)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://lifelines.readthedocs.io/en/latest/Quickstart.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "Quickstart.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F231"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "statsforecast",
          "name": [
            {
              "t": "fact",
              "fact": "F247"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/Nixtla/statsforecast"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/statsforecast"
            },
            {
              "label": "Docs",
              "href": "https://nixtlaverse.nixtla.io/statsforecast/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F254"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F248"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F250"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F249"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://nixtlaverse.nixtla.io/statsforecast/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F247"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F266"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F267"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/unit8co/darts",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F266"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _fit(\n    self,\n    series: TimeSeries,\n    future_covariates: TimeSeries | None = None,\n    verbose: bool | None = None,\n):\n    super()._fit(series, future_covariates, verbose=verbose)\n    self._assert_univariate(series)\n    series = self.training_series\n\n    if self._supports_native_future_covariates or future_covariates is None:\n        target = series.values(copy=False).flatten()\n    else:\n        # perform OLS and get in-sample residuals\n        self._linreg = LinearRegressionModel(\n            lags_future_covariates=[0],\n            use_static_covariates=False,\n        )\n        self._linreg.fit(\n            series, future_covariates=future_covariates, verbose=verbose\n        )\n        target = self._get_target_residuals(series, future_covariates)\n\n    self.model.fit(\n        target,\n        X=(\n            future_covariates.values(copy=False)\n            if future_covariates is not None\n            and self._supports_native_future_covariates\n            else None\n        ),\n    )\n    return self\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/unit8co/darts/blob/1a040e78687468d926bbbae12f5befcd72d294e8/darts/models/forecasting/sf_model.py#L187-L219",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F265"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=statsforecast%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F247"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from statsforecast import StatsForecast\nfrom statsforecast.models import AutoARIMA\nfrom statsforecast.utils import AirPassengersDF\n\ndf = AirPassengersDF\nsf = StatsForecast(\n    models=[AutoARIMA(season_length=12)],\n    freq='ME',\n)\nsf.fit(df)\nsf.predict(h=12, level=[95])\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/Nixtla/statsforecast/blob/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F252"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "pmdarima",
          "name": [
            {
              "t": "fact",
              "fact": "F268"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/alkaline-ml/pmdarima"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/pmdarima"
            },
            {
              "label": "Docs",
              "href": "https://alkaline-ml.com/pmdarima/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F275"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F269"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F277"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F271"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F270"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://alkaline-ml.com/pmdarima/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F268"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F287"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F288"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/sktime/sktime",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F287"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _fit(self, y, X, fh):\n    \"\"\"Fit to training data.\n\n    Parameters\n    ----------\n    y : pd.Series\n        Target time series to which to fit the forecaster.\n    fh : int, list, np.array or ForecastingHorizon, optional (default=None)\n        The forecasters horizon with the steps ahead to predict.\n    X : pd.DataFrame, optional (default=None)\n        Exogenous variables are ignored\n\n    Returns\n    -------\n    self : returns an instance of self.\n    \"\"\"\n    self._cur_y = y\n    self._cur_X = X\n    if X is not None:\n        X = X.loc[y.index]\n    # statsmodels >= 0.15 raises on out-of-sample prediction if the index\n    # is not supported, e.g., an integer index not starting at 0,\n    # so we pass a RangeIndex in this case. Predictions are re-indexed in _predict.\n    y_fit = y\n    if pd.api.types.is_integer_dtype(y.index) and not isinstance(\n        y.index, pd.RangeIndex\n    ):\n        y_fit = y.reset_index(drop=True)\n        if X is not None:\n            X = X.reset_index(drop=True)\n    self._forecaster = self._instantiate_model()\n    self._forecaster.fit(y_fit, X=X)\n    self._y_name = y.name\n    return self\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/sktime/sktime/blob/7304dab8a5c5c071c990687a5e5993033e8adbc2/sktime/forecasting/base/adapters/_pmdarima.py#L48-L81",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F286"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=pmdarima%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F268"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import pmdarima as pm\nfrom pmdarima.model_selection import train_test_split\n\n# Load/split your data\ny = pm.datasets.load_wineind()\ntrain, test = train_test_split(y, train_size=150)\n\n# Fit your model\nmodel = pm.auto_arima(train, seasonal=True, m=12)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/alkaline-ml/pmdarima/blob/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F273"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python statistics library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#scipy",
          "label": [
            {
              "t": "text",
              "text": "SciPy"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits probability distributions, correlations, and statistical tests. "
        },
        {
          "t": "link",
          "href": "#statsmodels",
          "label": [
            {
              "t": "text",
              "text": "statsmodels"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits regression, time series, and survival models with inference. "
        },
        {
          "t": "link",
          "href": "#lifelines",
          "label": [
            {
              "t": "text",
              "text": "lifelines"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits survival analysis. "
        },
        {
          "t": "link",
          "href": "#prophet",
          "label": [
            {
              "t": "text",
              "text": "Prophet"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits forecasts with trend and seasonality."
        }
      ]
    },
    {
      "q": "What is statsmodels?",
      "a": [
        {
          "t": "link",
          "href": "#statsmodels",
          "label": [
            {
              "t": "text",
              "text": "statsmodels"
            }
          ]
        },
        {
          "t": "text",
          "text": " estimates statistical models and runs hypothesis tests, with formula-based regression workflows. Its array-based OLS interface leaves the intercept out by default."
        }
      ]
    },
    {
      "q": "What is StatsForecast?",
      "a": [
        {
          "t": "link",
          "href": "#statsforecast",
          "label": [
            {
              "t": "text",
              "text": "StatsForecast"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a time series forecasting suite of statistical models, with automatic ARIMA and ETS model selection."
        }
      ]
    },
    {
      "q": "SciPy vs statsmodels: which should I use?",
      "a": [
        {
          "t": "link",
          "href": "#scipy",
          "label": [
            {
              "t": "text",
              "text": "SciPy"
            }
          ]
        },
        {
          "t": "text",
          "text": " covers probability distributions, correlations, and statistical tests. "
        },
        {
          "t": "link",
          "href": "#statsmodels",
          "label": [
            {
              "t": "text",
              "text": "statsmodels"
            }
          ]
        },
        {
          "t": "text",
          "text": " adds model estimation and formula-based regression."
        }
      ]
    },
    {
      "q": "What is Prophet?",
      "a": [
        {
          "t": "link",
          "href": "#prophet",
          "label": [
            {
              "t": "text",
              "text": "Prophet"
            }
          ]
        },
        {
          "t": "text",
          "text": " forecasts time series with trend and seasonality components. Its default fit is a point estimate, with optional full Bayesian sampling through Stan."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, scipy",
      "display": "SciPy",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, scipy",
      "display": "379.9M",
      "asOf": "2026-11-16"
    },
    "F3": {
      "label": "License, scipy",
      "display": "BSD",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, scipy",
      "display": "1.18.1, Aug 2026",
      "asOf": "2026-08-21"
    },
    "F5": {
      "label": "Package release date, scipy",
      "display": "Aug 2026",
      "asOf": "2026-08-21"
    },
    "F6": {
      "label": "Repository stars, scipy",
      "display": "15.2K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "T-tests, scipy",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Classical ANOVA, scipy",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "P-value correction, scipy",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Bayesian model building, scipy",
      "display": "Unsupported",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Install, scipy",
      "display": "pip install scipy",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "What it does, scipy",
      "display": "Provides statistical tests, probability distributions, and numerical routines.",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths lead, scipy",
      "display": "Covers tests and distributions",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths, scipy",
      "display": "Use distributions, correlations, and hypothesis tests from the same package.",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths lead, scipy",
      "display": "Controls false discovery rates",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths, scipy",
      "display": "Adjust p-values with false_discovery_control().",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations lead, scipy",
      "display": "ttest_ind assumes equal variances",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations, scipy",
      "display": "Set equal_var=False to compare groups with unequal variances.",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations lead, scipy",
      "display": "Missing values propagate by default",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "limitations, scipy",
      "display": "Choose a nan_policy when inputs contain missing values.",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Quickstart, scipy",
      "display": "import numpy as np\nfrom scipy import stats\nrng = np.random.default_rng()\nrvs1 = stats.norm.rvs(loc=5, scale=10, size=500, random_state=rng)\nrvs2 = stats.norm.rvs(loc=5, scale=10, size=500, random_state=rng)\nstats.ttest_ind(rvs1, rvs2)\nstats.ttest_ind(rvs1, rvs2, equal_var=False)\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function, scipy",
      "display": "def _fit(self, fit_data, weights=None):\n    \"\"\"Fit the scipy kde while adding bw_adjust logic and version check.\"\"\"\n    fit_kws = {\"bw_method\": self.bw_method}\n    if weights is not None:\n        fit_kws[\"weights\"] = weights\n\n    kde = gaussian_kde(fit_data, **fit_kws)\n    kde.set_bandwidth(kde.factor * self.bw_adjust)\n\n    return kde\n",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project function reference, scipy",
      "display": "_statistics.py · _fit()",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project repository, scipy",
      "display": "mwaskom/seaborn",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project stars, mwaskom/seaborn",
      "display": "14.1K",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Project push date, mwaskom/seaborn",
      "display": "Oct 2026",
      "asOf": "2026-10-08"
    },
    "F27": {
      "label": "Library name, statsmodels",
      "display": "Statsmodels",
      "asOf": "2026-11-17"
    },
    "F28": {
      "label": "Monthly downloads, statsmodels",
      "display": "38.4M",
      "asOf": "2026-11-16"
    },
    "F29": {
      "label": "License, statsmodels",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "Package release, statsmodels",
      "display": "0.15.0, Aug 2026",
      "asOf": "2026-08-27"
    },
    "F31": {
      "label": "Package release date, statsmodels",
      "display": "Aug 2026",
      "asOf": "2026-08-27"
    },
    "F32": {
      "label": "Repository stars, statsmodels",
      "display": "11.8K",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "T-tests, statsmodels",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Classical ANOVA, statsmodels",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "P-value correction, statsmodels",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Bayesian model building, statsmodels",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "Install, statsmodels",
      "display": "pip install statsmodels",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "What it does, statsmodels",
      "display": "Estimates statistical models and runs hypothesis tests.",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths lead, statsmodels",
      "display": "Accepts R-style model formulas",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths, statsmodels",
      "display": "Describe models with formulas against pandas DataFrames.",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths lead, statsmodels",
      "display": "Fits Bayesian mixed-effects models",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "strengths, statsmodels",
      "display": "Estimate binomial and Poisson mixed models with Bayesian approximation methods.",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations lead, statsmodels",
      "display": "Missing data needs explicit handling",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations, statsmodels",
      "display": "Set missing='raise' or clean missing values before fitting.",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "limitations lead, statsmodels",
      "display": "Array OLS omits automatic intercepts",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "limitations, statsmodels",
      "display": "Call add_constant when the model needs an intercept.",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Quickstart, statsmodels",
      "display": "import numpy as np\nimport statsmodels.api as sm\nimport statsmodels.formula.api as smf\n# Load data\ndat = sm.datasets.get_rdataset(\"Guerry\", \"HistData\").data\n# Fit regression model (using the natural log of one of the regressors)\nresults = smf.ols('Lottery ~ Literacy + np.log(Pop1831)', data=dat).fit()\n# Inspect the results\nprint(results.summary())\n",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project function, statsmodels",
      "display": "def fit_statsmodels(self, grid, model, **kwargs):\n    \"\"\"More general regression function using statsmodels objects.\"\"\"\n    import statsmodels.tools.sm_exceptions as sme\n    X, y = np.c_[np.ones(len(self.x)), self.x], self.y\n    grid = np.c_[np.ones(len(grid)), grid]\n\n    def reg_func(_x, _y):\n        err_classes = (sme.PerfectSeparationError,)\n        try:\n            with warnings.catch_warnings():\n                if hasattr(sme, \"PerfectSeparationWarning\"):\n                    # statsmodels>=0.14.0\n                    warnings.simplefilter(\"error\", sme.PerfectSeparationWarning)\n                    err_classes = (*err_classes, sme.PerfectSeparationWarning)\n                yhat = model(_y, _x, **kwargs).fit().predict(grid)\n        except err_classes:\n            yhat = np.empty(len(grid))\n            yhat.fill(np.nan)\n        return yhat\n\n    yhat = reg_func(X, y)\n    if self.ci is None:\n        return yhat, None\n\n    yhat_boots = algo.bootstrap(X, y,\n                                func=reg_func,\n                                n_boot=self.n_boot,\n                                units=self.units,\n                                seed=self.seed)\n    return yhat, yhat_boots\n",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project function reference, statsmodels",
      "display": "regression.py · fit_statsmodels()",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project repository, statsmodels",
      "display": "mwaskom/seaborn",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Project stars, mwaskom/seaborn",
      "display": "14.1K",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Project push date, mwaskom/seaborn",
      "display": "Oct 2026",
      "asOf": "2026-10-08"
    },
    "F53": {
      "label": "Library name, pymc",
      "display": "PyMC",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Monthly downloads, pymc",
      "display": "1.3M",
      "asOf": "2026-11-16"
    },
    "F55": {
      "label": "License, pymc",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Package release, pymc",
      "display": "6.4.0, Nov 2026",
      "asOf": "2026-11-01"
    },
    "F57": {
      "label": "Package release date, pymc",
      "display": "Nov 2026",
      "asOf": "2026-11-01"
    },
    "F58": {
      "label": "Repository stars, pymc",
      "display": "9.8K",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Bayesian model building, pymc",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Install, pymc",
      "display": "pip install pymc",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "What it does, pymc",
      "display": "Builds Bayesian statistical models with MCMC and variational inference.",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "strengths lead, pymc",
      "display": "Builds Bayesian probability models",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "strengths, pymc",
      "display": "Specify a probability model and sample plausible parameter values.",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths lead, pymc",
      "display": "Offers variational inference",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths, pymc",
      "display": "Approximate a model’s parameter distribution with ADVI.",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "limitations lead, pymc",
      "display": "External samplers require continuous models",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "limitations, pymc",
      "display": "Choose a compatible sampler when the model includes discrete random variables.",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "Quickstart, pymc",
      "display": "import pymc as pm\n\n# Taking draws from a normal distribution\nseed = 42\nx_dist = pm.Normal.dist(shape=(100, 3))\nx_data = pm.draw(x_dist, random_seed=seed)\n\n# Independent Variables:\n# Sunlight Hours: Number of hours the plant is exposed to sunlight daily.\n# Water Amount: Daily water amount given to the plant (in milliliters).\n# Soil Nitrogen Content: Percentage of nitrogen content in the soil.\n\n\n# Dependent Variable:\n# Plant Growth (y): Measured as the increase in plant height (in centimeters) over a certain period.\n\n\n# Define coordinate values for all dimensions of the data\ncoords={\n \"trial\": range(100),\n \"features\": [\"sunlight hours\", \"water amount\", \"soil nitrogen\"],\n}\n\n# Define generative model\nwith pm.Model(coords=coords) as generative_model:\n   x = pm.Data(\"x\", x_data, dims=[\"trial\", \"features\"])\n\n   # Model parameters\n   betas = pm.Normal(\"betas\", dims=\"features\")\n   sigma = pm.HalfNormal(\"sigma\")\n\n   # Linear model\n   mu = x @ betas\n\n   # Likelihood\n   # Assuming we measure deviation of each plant from baseline\n   plant_growth = pm.Normal(\"plant growth\", mu, sigma, dims=\"trial\")\n\n\n# Generating data from model by fixing parameters\nfixed_parameters = {\n \"betas\": [5, 20, 2],\n \"sigma\": 0.5,\n}\nwith pm.do(generative_model, fixed_parameters) as synthetic_model:\n   idata = pm.sample_prior_predictive(random_seed=seed) # Sample from prior predictive distribution.\n   synthetic_y = idata.prior[\"plant growth\"].sel(draw=0, chain=0)\n\n\n# Infer parameters conditioned on observed data\nwith pm.observe(generative_model, {\"plant growth\": synthetic_y}) as inference_model:\n   idata = pm.sample(random_seed=seed)\n\n   summary = pm.stats.summary(idata, var_names=[\"betas\", \"sigma\"])\n   print(summary)\n",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "Project function, pymc",
      "display": "def build_model(self, data: pandas.DataFrame) -> None:  # type: ignore[override]\n    \"\"\"Build the model.\n\n    Parameters\n    ----------\n    data : pandas.DataFrame\n        Input data with customer_id and individual_transaction_value columns.\n    \"\"\"\n    self._validate_data(data)\n    self.data = data\n\n    z = self.data[Col.INDIVIDUAL_TRANSACTION_VALUE]\n\n    coords = {\n        Dim.CUSTOMER_ID: np.unique(self.data[Col.CUSTOMER_ID]),\n        Dim.OBS: range(self.data.shape[0]),\n    }\n    with pm.Model(coords=coords) as self.model:\n        p = self.model_config[\"p\"].create_variable(\"p\")\n        q = self.model_config[\"q\"].create_variable(\"q\")\n        v = self.model_config[\"v\"].create_variable(\"v\")\n\n        nu = pm.Gamma(\"nu\", q, v, dims=(Dim.CUSTOMER_ID,))\n        pm.Gamma(\n            \"spend\", p, nu[self.data[Col.CUSTOMER_ID]], observed=z, dims=(Dim.OBS,)\n        )\n",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "Project function reference, pymc",
      "display": "gamma_gamma.py · build_model()",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Project repository, pymc",
      "display": "pymc-labs/pymc-marketing",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Project stars, pymc-labs/pymc-marketing",
      "display": "1.3K",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Project push date, pymc-labs/pymc-marketing",
      "display": "Nov 2026",
      "asOf": "2026-11-15"
    },
    "F74": {
      "label": "Library name, pingouin",
      "display": "Pingouin",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Monthly downloads, pingouin",
      "display": "563.4K",
      "asOf": "2026-11-16"
    },
    "F76": {
      "label": "License, pingouin",
      "display": "GPL-3.0",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "Package release, pingouin",
      "display": "0.7.0, Sep 2026",
      "asOf": "2026-09-26"
    },
    "F78": {
      "label": "Package release date, pingouin",
      "display": "Sep 2026",
      "asOf": "2026-09-26"
    },
    "F79": {
      "label": "Repository stars, pingouin",
      "display": "1.9K",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "T-tests, pingouin",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F81": {
      "label": "Classical ANOVA, pingouin",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "P-value correction, pingouin",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Install, pingouin",
      "display": "pip install pingouin",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "What it does, pingouin",
      "display": "Provides statistical tests, effect sizes, and repeated-measures analysis.",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "strengths lead, pingouin",
      "display": "Returns test effect sizes",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "strengths, pingouin",
      "display": "Read Cohen’s d alongside t-test results.",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "strengths lead, pingouin",
      "display": "Supports repeated-measures analysis",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "strengths, pingouin",
      "display": "Compare repeated measurements from the same subjects.",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "limitations lead, pingouin",
      "display": "Repeated-measures tests drop incomplete subjects",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "limitations, pingouin",
      "display": "One missing measurement can remove a subject’s other measurements.",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "limitations lead, pingouin",
      "display": "Some models need optional extras",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "limitations, pingouin",
      "display": "Install pingouin[extras] for functions that depend on statsmodels.",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "Quickstart, pingouin",
      "display": "import numpy as np\nimport pingouin as pg\n\nnp.random.seed(123)\nmean, cov, n = [4, 5], [(1, .6), (.6, 1)], 30\nx, y = np.random.multivariate_normal(mean, cov, n).T\n\n# T-test\npg.ttest(x, y)\n",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "Developer need",
      "display": "Statistical tests and distributions",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "Why choose scipy",
      "display": "tests and probability distributions",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Developer need in introduction",
      "display": "statistical tests and distributions",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "When to consider statsmodels",
      "display": "the task needs regression formulas over tabular data",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Developer need",
      "display": "Regression with model formulas",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Why choose statsmodels",
      "display": "formulas over pandas DataFrames",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Developer need in introduction",
      "display": "regression with model formulas",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "When to consider pymc",
      "display": "the task needs a custom Bayesian model",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Developer need",
      "display": "Effect sizes and repeated measurements",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Why choose pingouin",
      "display": "effect sizes beside test results",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Developer need in introduction",
      "display": "effect sizes and repeated measurements",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "When to consider scipy",
      "display": "the task needs probability distributions alongside statistical tests",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Developer need",
      "display": "Custom Bayesian models",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Why choose pymc",
      "display": "explicit probability models",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Developer need in introduction",
      "display": "custom Bayesian models",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "When to consider statsmodels",
      "display": "binomial or Poisson mixed models fit the task",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "Page introduction",
      "display": "Python statistics libraries let developers calculate statistics and fit statistical models.",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "FAQ: What is the best Python statistics library?",
      "display": "Choose SciPy for statistical tests and probability distributions.",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "FAQ: What is the best Python statistics library?",
      "display": "Choose Statsmodels for models specified with formulas.",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "FAQ: What is the best Python statistics library?",
      "display": "Choose Pingouin for tests that report effect sizes.",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "FAQ: What is the best Python statistics library?",
      "display": "Choose PyMC for Bayesian statistical models.",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "FAQ: SciPy vs Statsmodels: which should I use?",
      "display": "SciPy covers probability distributions, correlations, and statistical tests.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: SciPy vs Statsmodels: which should I use?",
      "display": "Statsmodels adds model estimation and formula-based regression workflows.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: Does Statsmodels support Bayesian statistics?",
      "display": "Statsmodels estimates binomial and Poisson generalized linear mixed models with Bayesian approximation methods.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: Does Statsmodels support Bayesian statistics?",
      "display": "PyMC provides a general Bayesian modeling interface with MCMC and variational inference.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: How do Python statistics libraries handle missing data?",
      "display": "Statsmodels skips missing-data checks by default; missing=raise requests an error.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: How do Python statistics libraries handle missing data?",
      "display": "Pingouin repeated-measures ANOVA removes a subject if any required measurement is missing.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: How can I correct p-values for multiple comparisons?",
      "display": "SciPy provides false_discovery_control for false-discovery-rate adjustments.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: How can I correct p-values for multiple comparisons?",
      "display": "Statsmodels provides multipletests for test results and p-value correction.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: How can I correct p-values for multiple comparisons?",
      "display": "Pingouin provides multicomp with Bonferroni, Holm, and false-discovery-rate methods.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: Why is the Statsmodels OLS intercept missing?",
      "display": "The array-based OLS interface leaves the intercept out by default; add it with add_constant.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "Library name, scipy",
      "display": "SciPy",
      "asOf": "2026-11-20"
    },
    "F126": {
      "label": "Monthly downloads, scipy",
      "display": "389.6M",
      "asOf": "2026-11-20"
    },
    "F127": {
      "label": "License, scipy",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F128": {
      "label": "Package release, scipy",
      "display": "1.18.1",
      "asOf": "2026-11-20"
    },
    "F129": {
      "label": "Package release date, scipy",
      "display": "Aug 2026",
      "asOf": "2026-11-20"
    },
    "F130": {
      "label": "Install, scipy",
      "display": "pip install scipy",
      "asOf": "2026-11-20"
    },
    "F131": {
      "label": "Quickstart, scipy",
      "display": "import numpy as np\nfrom scipy import stats\nrng = np.random.default_rng()\nrvs1 = stats.norm.rvs(loc=5, scale=10, size=500, random_state=rng)\nrvs2 = stats.norm.rvs(loc=5, scale=10, size=500, random_state=rng)\nstats.ttest_ind(rvs1, rvs2)\n",
      "asOf": "2026-11-20"
    },
    "F132": {
      "label": "Repository stars, scipy",
      "display": "15.2K",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "NUTS sampler, scipy",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "Cox PH regression, scipy",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Forecasting API, scipy",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Statistical task and abstraction, scipy",
      "display": "General distributions, statistical tests, resampling, and density/parameter estimation.",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Python requirement, scipy",
      "display": ">=3.12",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "First-call prerequisites, scipy",
      "display": "[\"Current primary distribution is scipy. Official independent-samples t-test prefix through the first basic test; the later Welch alternative is omitted. Pseudorandom generated samples are demo inputs, not measured benchmark data.\"]",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Download proxy scope, scipy",
      "display": "The scipy distribution covers much more than scipy.stats.",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Project function, scipy",
      "display": "def _fit(self, fit_data, weights=None):\n    \"\"\"Fit the scipy kde while adding bw_adjust logic and version check.\"\"\"\n    fit_kws = {\"bw_method\": self.bw_method}\n    if weights is not None:\n        fit_kws[\"weights\"] = weights\n\n    kde = gaussian_kde(fit_data, **fit_kws)\n    kde.set_bandwidth(kde.factor * self.bw_adjust)\n\n    return kde\n",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Project source file, scipy",
      "display": "seaborn/_statistics.py",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Project full_name, scipy",
      "display": "mwaskom/seaborn",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Project stargazers_count, scipy",
      "display": "14.1K",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Library name, statsmodels",
      "display": "statsmodels",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Monthly downloads, statsmodels",
      "display": "40.4M",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "License, statsmodels",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Package release, statsmodels",
      "display": "0.15.0",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Package release date, statsmodels",
      "display": "Aug 2026",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Install, statsmodels",
      "display": "pip install statsmodels",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Quickstart, statsmodels",
      "display": "import numpy as np\nimport statsmodels.api as sm\nimport statsmodels.formula.api as smf\n# Load data\ndat = sm.datasets.get_rdataset(\"Guerry\", \"HistData\").data\n# Fit regression model (using the natural log of one of the regressors)\nresults = smf.ols('Lottery ~ Literacy + np.log(Pop1831)', data=dat).fit()\n# Inspect the results\nprint(results.summary())\n",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Repository stars, statsmodels",
      "display": "11.8K",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "NUTS sampler, statsmodels",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Cox PH regression, statsmodels",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Forecasting API, statsmodels",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Statistical task and abstraction, statsmodels",
      "display": "Statistical model estimation and inference, including regression, time series, and survival models.",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Python requirement, statsmodels",
      "display": ">=3.10",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "First-call prerequisites, statsmodels",
      "display": "[\"Homepage getting-started example fits an OLS model and prints a summary. get_rdataset downloads public Guerry fixture data on first use; network access is a prerequisite of this snippet, not something executed during research.\"]",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Model inference surfaces, statsmodels",
      "display": "[\"Regression model estimation\", \"Formula APIs\", \"Time-series models\", \"Survival analysis\"]",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Project function, statsmodels",
      "display": "def fit_statsmodels(self, grid, model, **kwargs):\n    \"\"\"More general regression function using statsmodels objects.\"\"\"\n    import statsmodels.tools.sm_exceptions as sme\n    X, y = np.c_[np.ones(len(self.x)), self.x], self.y\n    grid = np.c_[np.ones(len(grid)), grid]\n\n    def reg_func(_x, _y):\n        err_classes = (sme.PerfectSeparationError,)\n        try:\n            with warnings.catch_warnings():\n                if hasattr(sme, \"PerfectSeparationWarning\"):\n                    # statsmodels>=0.14.0\n                    warnings.simplefilter(\"error\", sme.PerfectSeparationWarning)\n                    err_classes = (*err_classes, sme.PerfectSeparationWarning)\n                yhat = model(_y, _x, **kwargs).fit().predict(grid)\n        except err_classes:\n            yhat = np.empty(len(grid))\n            yhat.fill(np.nan)\n        return yhat\n\n    yhat = reg_func(X, y)\n    if self.ci is None:\n        return yhat, None\n\n    yhat_boots = algo.bootstrap(X, y,\n                                func=reg_func,\n                                n_boot=self.n_boot,\n                                units=self.units,\n                                seed=self.seed)\n    return yhat, yhat_boots\n",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Project source file, statsmodels",
      "display": "seaborn/regression.py",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Project full_name, statsmodels",
      "display": "mwaskom/seaborn",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Project stargazers_count, statsmodels",
      "display": "14.1K",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Library name, cmdstanpy",
      "display": "CmdStanPy",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Monthly downloads, cmdstanpy",
      "display": "4.3M",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "License, cmdstanpy",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Package release, cmdstanpy",
      "display": "1.3.2",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Package release date, cmdstanpy",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Install, cmdstanpy",
      "display": "pip install cmdstanpy",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Quickstart, cmdstanpy",
      "display": "import os\nfrom cmdstanpy import cmdstan_path, CmdStanModel\n\n# specify locations of Stan program file and data\nstan_file = os.path.join(cmdstan_path(), 'examples', 'bernoulli', 'bernoulli.stan')\ndata_file = os.path.join(cmdstan_path(), 'examples', 'bernoulli', 'bernoulli.data.json')\n\n# instantiate a model; compiles the Stan program by default\nmodel = CmdStanModel(stan_file=stan_file)\n\n# obtain a posterior sample from the model conditioned on the data\nfit = model.sample(chains=4, data=data_file)\n",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Official description, cmdstanpy",
      "display": "Provides a Python interface to CmdStan.",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Quickstart source file, cmdstanpy",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Repository stars, cmdstanpy",
      "display": "198",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "NUTS sampler, cmdstanpy",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Cox PH regression, cmdstanpy",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Forecasting API, cmdstanpy",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Statistical task and abstraction, cmdstanpy",
      "display": "Python interface to compiled Stan models and inference algorithms; model programs/executables are separate required inputs.",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Python requirement, cmdstanpy",
      "display": ">=3.9",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "First-call prerequisites, cmdstanpy",
      "display": "[\"Official complete basic example compiles the bundled Bernoulli Stan program, and samples; the following summary call is omitted. CmdStan must already be installed, with its example Stan/JSON files and a working C++ compilation toolchain. pip install cmdstanpy only installs the Python interface. No installation, compiler invocation, or sampler run performed.\"]",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Stan toolchain requirement, cmdstanpy",
      "display": "CmdStan runtime and compiled Stan program/executable required; CmdStanPy itself is a lightweight Python client.",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Project function, cmdstanpy",
      "display": "def sampling(\n    self,\n    stan_init: dict[str, float],\n    stan_data: dict[str, Any],\n    samples: int,\n    **kwargs: Any,\n) -> OrderedDict[str, np.ndarray]:\n    if 'inits' not in kwargs and 'init' in kwargs:\n        stan_init = self.sanitize_custom_inits(stan_init, kwargs['init'])\n        del kwargs['init']\n\n    inits_list, data_list = self.prepare_data(stan_init, stan_data)\n    args = dict(\n        data=data_list,\n        inits=inits_list,\n    )\n    if 'chains' not in kwargs:\n        kwargs['chains'] = 4\n    iter_half = samples // 2\n    kwargs['iter_sampling'] = iter_half\n    if 'iter_warmup' not in kwargs:\n        kwargs['iter_warmup'] = iter_half\n    args.update(kwargs)\n\n    self.stan_fit = self.model.sample(**args)\n    res = self.stan_fit.draws()\n    (samples, c, columns) = res.shape\n    res = res.reshape((samples * c, columns))\n    params = self.stan_to_dict_numpy(self.stan_fit.column_names, res)\n\n    for par in params:\n        s = params[par].shape\n        if s[1] == 1:\n            params[par] = params[par].reshape((s[0],))\n\n        if par in ['delta', 'beta'] and len(s) < 2:\n            params[par] = params[par].reshape((-1, 1))\n\n    return params\n",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Project source file, cmdstanpy",
      "display": "python/prophet/models.py",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Project full_name, cmdstanpy",
      "display": "meta/prophet",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Project stargazers_count, cmdstanpy",
      "display": "20.5K",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Library name, prophet",
      "display": "Prophet",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Monthly downloads, prophet",
      "display": "4.1M",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "License, prophet",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Package release, prophet",
      "display": "1.5.0",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Package release date, prophet",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Install, prophet",
      "display": "pip install prophet",
      "asOf": "2026-11-20"
    },
    "F190": {
      "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"
    },
    "F191": {
      "label": "Official description, prophet",
      "display": "Runs an automatic forecasting procedure.",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Quickstart source file, prophet",
      "display": "quick_start.html",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Repository stars, prophet",
      "display": "20.5K",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "NUTS sampler, prophet",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Cox PH regression, prophet",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Forecasting API, prophet",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Statistical task and abstraction, prophet",
      "display": "Statistical time-series forecasting with trend, seasonality, and optional full Bayesian sampling.",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "Python requirement, prophet",
      "display": ">=3.10",
      "asOf": "2026-11-20"
    },
    "F199": {
      "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"
    },
    "F200": {
      "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"
    },
    "F201": {
      "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"
    },
    "F202": {
      "label": "Project source file, prophet",
      "display": "superset/utils/pandas_postprocessing/prophet.py",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Project full_name, prophet",
      "display": "apache/superset",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Project stargazers_count, prophet",
      "display": "75.5K",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Library name, arviz",
      "display": "ArviZ",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Monthly downloads, arviz",
      "display": "2.7M",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "License, arviz",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Package release, arviz",
      "display": "1.3.0",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Package release date, arviz",
      "display": "Aug 2026",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Install, arviz",
      "display": "pip install arviz",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Quickstart, arviz",
      "display": "import arviz as az\nimport numpy as np\n\ndata = np.random.default_rng().normal(size=2000)\naz.hdi(data, 0.68)\n",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Official description, arviz",
      "display": "Exposes ArviZ features in one namespace.",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Quickstart source file, arviz",
      "display": "src/arviz_stats/visualization.py",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Repository stars, arviz",
      "display": "1.9K",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "NUTS sampler, arviz",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Cox PH regression, arviz",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Forecasting API, arviz",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Statistical task and abstraction, arviz",
      "display": "Exploratory posterior analysis, model checking/comparison, and sampling diagnostics; consumes model outputs rather than fitting a model itself.",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Python requirement, arviz",
      "display": ">=3.12",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "First-call prerequisites, arviz",
      "display": "[\"Current ArviZ1.3 requires Python3.12+. Install command mechanically uses the exact registry distribution name; README preview extra is no longer declared in1.3 metadata and is not required. Disclosed facade recipe: official arviz_stats.hdi example, imported through the supported arviz facade that reexports hdi; alias change disclosed. Random Normal samples are demo inputs.\"]",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Version1 facade migration, arviz",
      "display": "ArviZ1 reexports modular arviz-base/stats/plots packages. Current hdi uses prob and returns ci_bound lower/upper coordinates.",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Project function, arviz",
      "display": "def _create_get_hdi_plot_data(hdi_kwargs) -> GetPlotData:\n    def get_plot_data(data: xr.DataArray) -> xr.DataArray:\n        hdi = az.hdi(data, **hdi_kwargs)\n        if isinstance(hdi, xr.Dataset) and data.name is not None:\n            return hdi[data.name]\n        return hdi  # DataArray case\n\n    return get_plot_data\n",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Project source file, arviz",
      "display": "pymc_marketing/plot.py",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Project full_name, arviz",
      "display": "pymc-labs/pymc-marketing",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Project stargazers_count, arviz",
      "display": "1.3K",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Library name, lifelines",
      "display": "lifelines",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Monthly downloads, lifelines",
      "display": "2.2M",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "License, lifelines",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Package release, lifelines",
      "display": "0.30.3",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Package release date, lifelines",
      "display": "Mar 2026",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Install, lifelines",
      "display": "pip install lifelines",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Quickstart, lifelines",
      "display": "from lifelines.datasets import load_waltons\ndf = load_waltons() # returns a Pandas DataFrame\n\nT = df['T']\nE = df['E']\n\nfrom lifelines import KaplanMeierFitter\nkmf = KaplanMeierFitter()\nkmf.fit(T, event_observed=E)  # or, more succinctly, kmf.fit(T, E)\n",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Official description, lifelines",
      "display": "Runs survival analysis, including Kaplan-Meier, Nelson-Aalen, and regression models.",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Quickstart source file, lifelines",
      "display": "Quickstart.html",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Repository stars, lifelines",
      "display": "2.6K",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "NUTS sampler, lifelines",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Cox PH regression, lifelines",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Forecasting API, lifelines",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Statistical task and abstraction, lifelines",
      "display": "Survival/time-to-event analysis with censoring and regression estimators.",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Python requirement, lifelines",
      "display": ">=3.11",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "First-call prerequisites, lifelines",
      "display": "[\"Two original quickstart fragments joined with the printed head/output removed: load bundled Waltons data and fit a Kaplan-Meier estimate. T is duration and E is event-observed (1=event,0=right censored). No data download required for the bundled fixture.\"]",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Cox baseline options, lifelines",
      "display": "[\"breslow\", \"spline\", \"piecewise\"]",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Project function, lifelines",
      "display": "def _fit_cph(features, outcomes, val_data, random_seed, **hyperparams):\n  \"\"\"Fit a linear Cox Proportional Hazards model to a given dataset.\n\n  Parameters\n  -----------\n  features : pd.DataFrame\n      A pandas dataframe with rows corresponding to individual samples and\n      columns as covariates.\n  outcomes : pd.DataFrame\n      A pandas dataframe with columns 'time' and 'event'.\n  val_data : tuple\n      A tuple of the validation dataset features and outcomes of\n      'time' and 'event'.\n  random_seed : int\n      Controls the reproducibility of called functions.\n  hyperparams : Optional arguments\n      Options include:\n      - 'l2' : float, default=1e-3\n          Penalizer\n\n  Returns\n  -----------\n  Trained instance of the Cox Proportional Hazards model.\n\n  \"\"\"\n\n  from lifelines import CoxPHFitter\n\n  data = outcomes.join(features)\n  penalizer = hyperparams.get('l2', 1e-3)\n\n  return CoxPHFitter(penalizer=penalizer).fit(data,\n                                              duration_col='time',\n                                              event_col='event')\n",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Project source file, lifelines",
      "display": "auton_survival/estimators.py",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "Project full_name, lifelines",
      "display": "autonlab/auton-survival",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Project stargazers_count, lifelines",
      "display": "372",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Library name, statsforecast",
      "display": "StatsForecast",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Monthly downloads, statsforecast",
      "display": "1.8M",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "License, statsforecast",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Package release, statsforecast",
      "display": "2.1.1",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "Package release date, statsforecast",
      "display": "Jul 2026",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Install, statsforecast",
      "display": "pip install statsforecast",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "Quickstart, statsforecast",
      "display": "from statsforecast import StatsForecast\nfrom statsforecast.models import AutoARIMA\nfrom statsforecast.utils import AirPassengersDF\n\ndf = AirPassengersDF\nsf = StatsForecast(\n    models=[AutoARIMA(season_length=12)],\n    freq='ME',\n)\nsf.fit(df)\nsf.predict(h=12, level=[95])\n",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "Official description, statsforecast",
      "display": "Forecasts time series with statistical models.",
      "asOf": "2026-11-20"
    },
    "F255": {
      "label": "Quickstart source file, statsforecast",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F256": {
      "label": "Repository stars, statsforecast",
      "display": "5.0K",
      "asOf": "2026-11-20"
    },
    "F257": {
      "label": "NUTS sampler, statsforecast",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F258": {
      "label": "Cox PH regression, statsforecast",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F259": {
      "label": "Forecasting API, statsforecast",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F260": {
      "label": "Statistical task and abstraction, statsforecast",
      "display": "High-performance statistical/econometric univariate time-series forecasting with automatic model families.",
      "asOf": "2026-11-20"
    },
    "F261": {
      "label": "Python requirement, statsforecast",
      "display": ">=3.10",
      "asOf": "2026-11-20"
    },
    "F262": {
      "label": "First-call prerequisites, statsforecast",
      "display": "[\"Official minimal example uses bundled AirPassengersDF and AutoARIMA with monthly-end ME frequency and season_length12. fit then predict horizon12 with95% intervals. No live time-series feed required.\"]",
      "asOf": "2026-11-20"
    },
    "F263": {
      "label": "Forecast model families, statsforecast",
      "display": "[\"AutoARIMA\", \"AutoETS\", \"AutoCES\", \"Theta\", \"benchmark models\"]",
      "asOf": "2026-11-20"
    },
    "F264": {
      "label": "Project function, statsforecast",
      "display": "def _fit(\n    self,\n    series: TimeSeries,\n    future_covariates: TimeSeries | None = None,\n    verbose: bool | None = None,\n):\n    super()._fit(series, future_covariates, verbose=verbose)\n    self._assert_univariate(series)\n    series = self.training_series\n\n    if self._supports_native_future_covariates or future_covariates is None:\n        target = series.values(copy=False).flatten()\n    else:\n        # perform OLS and get in-sample residuals\n        self._linreg = LinearRegressionModel(\n            lags_future_covariates=[0],\n            use_static_covariates=False,\n        )\n        self._linreg.fit(\n            series, future_covariates=future_covariates, verbose=verbose\n        )\n        target = self._get_target_residuals(series, future_covariates)\n\n    self.model.fit(\n        target,\n        X=(\n            future_covariates.values(copy=False)\n            if future_covariates is not None\n            and self._supports_native_future_covariates\n            else None\n        ),\n    )\n    return self\n",
      "asOf": "2026-11-20"
    },
    "F265": {
      "label": "Project source file, statsforecast",
      "display": "darts/models/forecasting/sf_model.py",
      "asOf": "2026-11-20"
    },
    "F266": {
      "label": "Project full_name, statsforecast",
      "display": "unit8co/darts",
      "asOf": "2026-11-20"
    },
    "F267": {
      "label": "Project stargazers_count, statsforecast",
      "display": "9.6K",
      "asOf": "2026-11-20"
    },
    "F268": {
      "label": "Library name, pmdarima",
      "display": "pmdarima",
      "asOf": "2026-11-20"
    },
    "F269": {
      "label": "Monthly downloads, pmdarima",
      "display": "1.7M",
      "asOf": "2026-11-20"
    },
    "F270": {
      "label": "License, pmdarima",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F271": {
      "label": "Package release, pmdarima",
      "display": "2.1.1",
      "asOf": "2026-11-20"
    },
    "F272": {
      "label": "Package release date, pmdarima",
      "display": "Nov 2025",
      "asOf": "2026-11-20"
    },
    "F273": {
      "label": "Install, pmdarima",
      "display": "pip install pmdarima",
      "asOf": "2026-11-20"
    },
    "F274": {
      "label": "Quickstart, pmdarima",
      "display": "import pmdarima as pm\nfrom pmdarima.model_selection import train_test_split\n\n# Load/split your data\ny = pm.datasets.load_wineind()\ntrain, test = train_test_split(y, train_size=150)\n\n# Fit your model\nmodel = pm.auto_arima(train, seasonal=True, m=12)\n",
      "asOf": "2026-11-20"
    },
    "F275": {
      "label": "Official description, pmdarima",
      "display": "Selects ARIMA models automatically, like the forecast package's auto.arima.",
      "asOf": "2026-11-20"
    },
    "F276": {
      "label": "Quickstart source file, pmdarima",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F277": {
      "label": "Repository stars, pmdarima",
      "display": "1.7K",
      "asOf": "2026-11-20"
    },
    "F278": {
      "label": "NUTS sampler, pmdarima",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F279": {
      "label": "Cox PH regression, pmdarima",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F280": {
      "label": "Forecasting API, pmdarima",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F281": {
      "label": "Statistical task and abstraction, pmdarima",
      "display": "Automatic seasonal/nonseasonal ARIMA model selection, stationarity tests, and sklearn-style time-series pipelines.",
      "asOf": "2026-11-20"
    },
    "F282": {
      "label": "Python requirement, pmdarima",
      "display": ">=3.10",
      "asOf": "2026-11-20"
    },
    "F283": {
      "label": "First-call prerequisites, pmdarima",
      "display": "[\"Disclosed first-call recipe from the README import and fit fragments: unused numpy/matplotlib imports for the later plotting section are not included, so this basic call needs no undeclared plotting dependency. Bundled wineind data; automatic seasonal ARIMA model search may fit many candidate models.\"]",
      "asOf": "2026-11-20"
    },
    "F284": {
      "label": "Automatic ARIMA and pipeline role, pmdarima",
      "display": "Stepwise or search-based seasonal ARIMA selection, stationarity/seasonality tests, and sklearn-like preprocessing pipelines.",
      "asOf": "2026-11-20"
    },
    "F285": {
      "label": "Project function, pmdarima",
      "display": "def _fit(self, y, X, fh):\n    \"\"\"Fit to training data.\n\n    Parameters\n    ----------\n    y : pd.Series\n        Target time series to which to fit the forecaster.\n    fh : int, list, np.array or ForecastingHorizon, optional (default=None)\n        The forecasters horizon with the steps ahead to predict.\n    X : pd.DataFrame, optional (default=None)\n        Exogenous variables are ignored\n\n    Returns\n    -------\n    self : returns an instance of self.\n    \"\"\"\n    self._cur_y = y\n    self._cur_X = X\n    if X is not None:\n        X = X.loc[y.index]\n    # statsmodels >= 0.15 raises on out-of-sample prediction if the index\n    # is not supported, e.g., an integer index not starting at 0,\n    # so we pass a RangeIndex in this case. Predictions are re-indexed in _predict.\n    y_fit = y\n    if pd.api.types.is_integer_dtype(y.index) and not isinstance(\n        y.index, pd.RangeIndex\n    ):\n        y_fit = y.reset_index(drop=True)\n        if X is not None:\n            X = X.reset_index(drop=True)\n    self._forecaster = self._instantiate_model()\n    self._forecaster.fit(y_fit, X=X)\n    self._y_name = y.name\n    return self\n",
      "asOf": "2026-11-20"
    },
    "F286": {
      "label": "Project source file, pmdarima",
      "display": "sktime/forecasting/base/adapters/_pmdarima.py",
      "asOf": "2026-11-20"
    },
    "F287": {
      "label": "Project full_name, pmdarima",
      "display": "sktime/sktime",
      "asOf": "2026-11-20"
    },
    "F288": {
      "label": "Project stargazers_count, pmdarima",
      "display": "10.1K",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best Python statistics libraries SciPy statsmodels Pingouin PyMC statistical tests regression Bayesian code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
