skada.datasets.make_variable_frequency_dataset
- skada.datasets.make_variable_frequency_dataset(n_samples_source=10, n_samples_target=10, n_channels=1, n_frequencies=1, n_classes=3, delta_f=1, band_size=1, sigma_freq=0.25, sigma_ch=1, noise=None, random_state=None, return_X_y=True, return_dataset=False)[source]
Make dataset with different peak frequency.
- Parameters:
- n_samples_sourceint, default=100
It is the total number of points among one source cluster.
- n_samples_targetint, default=100
It is the total number of points among one target cluster.
- n_channelsint, default=1
Number of channels in the signal.
- n_frequency_sourceint, default=1
Number of channels which generate frequency peak and propagate to other channels.
- n_classesint, default=3
Number of classes in the signals. One class correspond to a specific frequency band.
- delta_ffloat, default=1
Band frequency shift of the target data.
- band_sizefloat, default=1
Size of the frequency band.
- sigma_chfloat, default=1
Std for the gaussian on the channels.
- noisefloat or array_like, default=None
If float, standard deviation of Gaussian noise added to the data. If array-like, each element of the sequence indicate standard deviation of Gaussian noise added to the source and target data.
- random_stateint, RandomState instance or None, default=None
Determines random number generation for dataset creation. Pass an int for reproducible output across multiple function calls.
- return_X_yboolean, optional (default=True)
Returns source and target dataset as a pair of (X, y) tuples (for the source and the target respectively). Otherwise returns tuple of (X, y, sample_domain) where sample_domain is a categorical label for the domain where sample is taken.
- return_datasetboolean, optional (default=False)
When set to True, the function returns
DomainAwareDataset
object.
- Returns:
- (X, y, sample_domain)tuple if return_X_y=True
Tuple of (data, target, sample_domain), see the description below.
- data
Bunch
Dictionary-like object, with the following attributes.
- X: ndarray
Samples from all sources and all targets given.
- yndarray
Labels from all sources and all targets.
- sample_domainndarray
The integer label for domain the sample was taken from. By convention, source domains have non-negative labels, and target domain label is always < 0.
- domain_namesdict
The names of domains and associated domain labels.
- dataset
DomainAwareDataset
Dataset object.
Examples using skada.datasets.make_variable_frequency_dataset
Plot dataset source domain and shifted target domain