skada.datasets.make_dataset_from_moons_distribution

skada.datasets.make_dataset_from_moons_distribution(n_samples_source=10, n_samples_target=10, noise=None, pos_source=0.1, pos_target=0.2, random_state=None, return_X_y=True, return_dataset=False)[source]

Make dataset from moons.

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.

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.

pos_sourcefloat or array-like, default=0.1

If float, indicate the center of the source cluster. If array-like, each element of the sequence indicates the position of the center of each source cluster.

pos_targetfloat or array-like, default=0.2

If float, indicate the center of the source cluster. If array-like, each element of the sequence indicates the position of the center of each target cluster.

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.

dataBunch

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.

datasetDomainAwareDataset

Dataset object.

Examples using skada.datasets.make_dataset_from_moons_distribution

Plot dataset source domain and shifted target domain

Plot dataset source domain and shifted target domain

DASVM classifier example

DASVM classifier example