## time_dependent.NSPPThinning


Non Stationary Poisson Process via Thinning.


Usage

``` python
time_dependent.NSPPThinning(
    data, interval_width=None, random_seed1=None, random_seed2=None
)
```


Thinning is an acceptance-rejection approach to sampling inter-arrival times (IAT) from a time-dependent distribution where each time period follows its own exponential distribution.

This implementation takes mean inter-arrival times as inputs, making it consistent with NumPy's exponential distribution parameterization.


## Methods

| Name | Description |
|----|----|
| [__init__()](#__init__) | Non Stationary Poisson Process via Thinning. |
| [__repr__()](#__repr__) | Return a string representation of the NSPPThinning instance. |
| [sample()](#sample) | Run a single iteration of acceptance-rejection |

------------------------------------------------------------------------


#### \_\_init\_\_()


Non Stationary Poisson Process via Thinning.


Usage

``` python
__init__(data, interval_width=None, random_seed1=None, random_seed2=None)
```


Time dependency is handled for a single table consisting of equally spaced intervals.


##### Parameters


`data: pd.DataFrame`  
DataFrame with time points and mean inter-arrival times. Columns should be "t" and "mean_iat" respectively.

`interval_width: float | None = None`  
The width of each time interval. If None, it will be calculated from consecutive time points in the data. Required if data has only one row.

`random_seed1: int | SeedSequence | None = None`  
Random seed for the exponential distribution

`random_seed2: int | SeedSequence | None = None`  
Random seed for the uniform distribution used for acceptance/rejection sampling.


------------------------------------------------------------------------


#### \_\_repr\_\_()


Return a string representation of the NSPPThinning instance.


Usage

``` python
__repr__()
```


------------------------------------------------------------------------


#### sample()


Run a single iteration of acceptance-rejection


Usage

``` python
sample(simulation_time)
```


thinning alg to sample the next inter-arrival time


##### Parameters


`simulation_time: float`  
The current simulation time.


##### Returns


`float`  
The inter-arrival time
