fitgrid.fake_data module

User utilities for generating test data structured for fitgrid modeling.

fitgrid.fake_data.generate(n_epochs=10, n_samples=100, n_categories=2, n_channels=32, time='time', epoch_id='epoch_id', seed=None, return_type='epochs')[source]

Return Epochs object or pandas.DataFrame with fake EEG data.

Parameters
  • n_epochs (int) – number of epochs per category to be generated

  • n_samples (int) – number of samples in a single epochs

  • n_categories (int) – number of levels of the categorical variable

  • n_channels (int) – number of time series representing EEG channels

  • time (str, defaults to defaults.TIME) – time column name

  • epoch_id (str, defaults to defaults.EPOCH_ID) – epoch identifier column name

  • seed=None ({None, int, array_like}, optional) – Random number generation seed. Default=None lets data vary from run to run. Set seed to a 32-bit unsigned integer to generate the same fake data run to run. See numpy.random.RandomState for details.

  • return_type (str {epochs, dataframe}) – return fitgrid.Epochs or the fitgrid.Epochs.table dataframe

Returns

epochs – Epochs object or just the data

Return type

fitgrid.Epochs or pandas.DataFrame

Notes

n_epochs and n_categories interact in the sense that n_epochs epochs are generated for each level of the categorical variable. In other words, the true number of epochs in the generated data is equal to n_epochs * n_categories.

For example, the default n_epochs = 10 and n_categories = 2 produces 20 epochs, 10 per category.