---
url: >-
  https://jer-k.github.io/effect-prophet/benchmarks/linear/country-global-priors-overrides-linear.md
---

# Global prior scales with explicit overrides

&#x20;[← All linear growth benchmarks](/benchmarks/linear)

The same global priors, but the seasonality, custom events and regressor each set a prior of 10, so only the US holidays take holidaysPriorScale.

## Input

[`benchmark/inputs/v5/country-mixed-96.json`](https://github.com/jer-k/effect-prophet/blob/main/benchmark/inputs/v5/country-mixed-96.json): 96 history rows and 4 forecast rows.

## Output

Largest difference: **9.3e-11** (< 0.0001% of the input's range).

Every forecast row from both libraries.

| Date | Effect Prophet | Python Prophet | Difference |
| --- | ---: | ---: | ---: |
| 2024-12-25 | 21.8782 | 21.8782 | 9.2e-11 |
| 2025-01-01 | 23.1562 | 23.1562 | 7.6e-11 |
| 2025-01-02 | 20.7293 | 20.7293 | 9.3e-11 |
| 2025-01-05 | 20.8727 | 20.8727 | 8.2e-11 |

## Timing

Median of all measured repetitions.

| Step | Effect Prophet | Python Prophet | Effect Prophet is |
| --- | ---: | ---: | --- |
| Convert input rows | 52 µs | 534 µs | 10× faster |
| Fit | 5.79 ms | 27.1 ms | 4.7× faster |
| Predict | 233 µs | 6.34 ms | 27× faster |
| Fit and predict | 5.11 ms | 33.9 ms | 6.6× faster |
| Convert, fit and predict | 5.02 ms | 35.2 ms | 7.0× faster |
| First forecast in a new process | 182 ms | 1.66 s | 9.1× faster |
| Save model to JSON | 138 µs | 756 µs | 5.5× faster |
| Load model from JSON | 1.08 ms | 4.40 ms | 4.1× faster |
| Load and predict in a new process | 170 ms | 1.62 s | 9.6× faster |

## Settings

The case declaration both libraries ran.

```json
{
  "kind": "map",
  "comparison": {
    "kind": "equivalent-objective",
    "evidenceId": "country-calendar-public-v1"
  },
  "configuration": {
    "growth": "linear",
    "countryHolidays": {
      "country": "US",
      "coverage": "reject-known-gaps",
      "priorScale": 0.05
    },
    "scaling": "absmax",
    "seasonalityMode": "additive",
    "holidaysMode": "additive",
    "seasonalityPriorScale": 0.1,
    "holidaysPriorScale": 0.05,
    "changepoints": {
      "mode": "auto",
      "count": 2,
      "range": 0.8
    },
    "changepointPriorScale": 0.05,
    "seasonalities": [
      {
        "name": "weekly-active",
        "periodDays": 7,
        "fourierOrder": 1,
        "priorScale": 10,
        "conditionName": "active"
      }
    ],
    "events": [
      {
        "name": "launch",
        "date": "2024-01-01",
        "lowerWindowDays": 0,
        "upperWindowDays": 0,
        "priorScale": 10
      },
      {
        "name": "launch",
        "date": "2024-01-05",
        "lowerWindowDays": 0,
        "upperWindowDays": 0,
        "priorScale": 10
      },
      {
        "name": "launch",
        "date": "2025-01-01",
        "lowerWindowDays": 0,
        "upperWindowDays": 0,
        "priorScale": 10
      },
      {
        "name": "launch",
        "date": "2025-01-05",
        "lowerWindowDays": 0,
        "upperWindowDays": 0,
        "priorScale": 10
      }
    ],
    "regressors": [
      {
        "name": "promotion",
        "priorScale": 10,
        "standardization": "never"
      }
    ]
  },
  "effectOptimizer": {
    "algorithm": "auto",
    "maxIterations": 10000,
    "fallback": "newton",
    "lbfgs": {
      "historySize": 5,
      "initAlpha": 0.001,
      "tolObj": 1e-12,
      "tolRelObj": 10000,
      "tolGrad": 1e-8,
      "tolRelGrad": 10000000,
      "tolParam": 1e-8
    }
  },
  "pythonOptimizer": {
    "algorithm": "Auto",
    "maxIterations": 10000,
    "newtonFallback": true,
    "sigFigs": 12
  }
}
```
