---
url: >-
  https://jer-k.github.io/effect-prophet/benchmarks/logistic/uncertainty-logistic-explicit-floor-minmax-mixed-conditions-events-intervals-128.md
---

# Ranges with mixed effects

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

80% ranges for a bounded model with a switchable weekly pattern, events and a regressor.

## Input

[`benchmark/inputs/v1/logistic-uncertainty-mixed.json`](https://github.com/jer-k/effect-prophet/blob/main/benchmark/inputs/v1/logistic-uncertainty-mixed.json): 96 history rows and 24 forecast rows.

## Output

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

Every forecast row from both libraries.

| Date | Effect Prophet | Python Prophet | Difference |
| --- | ---: | ---: | ---: |
| 2020-04-06 | 65.8253 | 65.8253 | 1.8e-11 |
| 2020-04-07 | 66.2469 | 66.2469 | 1.7e-11 |
| 2020-04-08 | 67.2932 | 67.2932 | 1.7e-11 |
| 2020-04-09 | 67.5695 | 67.5695 | 1.6e-11 |
| 2020-04-10 | 67.5171 | 67.5171 | 1.6e-11 |
| 2020-04-11 | 68.0061 | 68.0061 | 1.6e-11 |
| 2020-04-12 | 67.8998 | 67.8998 | 1.5e-11 |
| 2020-04-13 | 67.9356 | 67.9356 | 1.5e-11 |
| 2020-04-14 | 68.6942 | 68.6942 | 1.4e-11 |
| 2020-04-15 | 68.9301 | 68.9301 | 1.4e-11 |
| 2020-04-16 | 70.9005 | 70.9005 | 1.5e-11 |
| 2020-04-17 | 69.8892 | 69.8892 | 1.3e-11 |
| 2020-04-18 | 69.9044 | 69.9044 | 1.3e-11 |
| 2020-04-19 | 69.7593 | 69.7593 | 1.3e-11 |
| 2020-04-20 | 70.5952 | 70.5952 | 1.2e-11 |
| 2020-04-21 | 70.0978 | 70.0978 | 1.1e-11 |
| 2020-04-22 | 70.6932 | 70.6932 | 1.1e-11 |
| 2020-04-23 | 71.2651 | 71.2651 | 1.1e-11 |
| 2020-04-24 | 71.5724 | 71.5724 | 1.1e-11 |
| 2020-04-25 | 71.3613 | 71.3613 | 1.0e-11 |
| 2020-04-26 | 71.7778 | 71.7778 | 1.0e-11 |
| 2020-04-27 | 71.3481 | 71.3481 | 9.6e-12 |
| 2020-04-28 | 71.6595 | 71.6595 | 9.2e-12 |
| 2020-04-29 | 72.2270 | 72.2270 | 8.9e-12 |

## Timing

Median of all measured repetitions.

| Step | Effect Prophet | Python Prophet | Effect Prophet is |
| --- | ---: | ---: | --- |
| Convert input rows | 63 µs | 550 µs | 8.8× faster |
| Save model to JSON | 29 µs | 702 µs | 24× faster |
| Load model from JSON | 181 µs | 3.78 ms | 21× faster |
| Simulate uncertainty | 760 µs | 30.3 ms | Not compared: different work |
| First simulation in a new process | 194 ms | 1.49 s | Not compared: different work |
| Load and simulate in a new process | 163 ms | 1.49 s | Not compared: different work |

Some steps aren't compared, because the two libraries' public calls produce different outputs. Their times show what each call costs, not which library is faster.

* **Simulate uncertainty, First simulation in a new process, Load and simulate in a new process:** Python's `predict(vectorized=False)` also builds the point forecast and every component, while Effect Prophet's `predictUncertainty` returns only the ranges.

## Settings

The case declaration both libraries ran.

```json
{
  "kind": "map",
  "comparison": {
    "kind": "equivalent-objective",
    "evidenceId": "logistic-map-v1"
  },
  "configuration": {
    "growth": "logistic",
    "scaling": "minmax",
    "seasonalityMode": "additive",
    "holidaysMode": "additive",
    "changepoints": {
      "mode": "explicit",
      "timestamps": [
        "2020-02-10T00:00:00.000Z"
      ]
    },
    "changepointPriorScale": 0.2,
    "seasonalities": [
      {
        "name": "weekly-custom",
        "periodDays": 7,
        "fourierOrder": 2,
        "priorScale": 10,
        "conditionName": "active"
      }
    ],
    "events": [
      {
        "name": "campaign",
        "date": "2020-01-22",
        "lowerWindowDays": 0,
        "upperWindowDays": 0,
        "priorScale": 10
      },
      {
        "name": "campaign",
        "date": "2020-04-16",
        "lowerWindowDays": 0,
        "upperWindowDays": 0,
        "priorScale": 10
      }
    ],
    "regressors": [
      {
        "name": "promotion",
        "priorScale": 10,
        "standardization": "never",
        "mode": "multiplicative"
      }
    ]
  },
  "pythonOptimizer": {
    "algorithm": "Auto",
    "maxIterations": 10000,
    "newtonFallback": true,
    "sigFigs": 12
  },
  "uncertainty": {
    "seed": 19,
    "samples": 128,
    "intervalWidth": 0.8,
    "output": "intervals",
    "algorithm": "scalar-continuous-time",
    "evidence": "docs/validation/uncertainty.md#evidence-classes",
    "samplerMemoryLimitBytes": 67108864
  }
}
```
