generate_changing_data — skchange

Skip to main content
`Ctrl`+`K`

# generate_changing_data

generate_changing_data(n: int = 100, changepoints: int | list[int] = 50, means: float | list[float] | list[ndarray] = 0.0, variances: float | list[float] | list[ndarray] = 1.0, random_state: int | None = None)

  Generate piecewise multivariate normal data with changing means and variances.

  Parameters:
    nint, optional, default=100

      Number of observations.

    changepointsint or list of ints, optional, default=50

      Changepoints in the data.

    meanslist of floats or list of arrays, optional, default=0.0

      List of means for each segment.

    varianceslist of floats or list of arrays, optional, default=1.0

      List of variances for each segment.

    random_stateint or RandomState, optional

      Seed or random state for reproducible results. Defaults to None.

  Returns:
    pd.DataFrame

      DataFrame with generated data.