skada.datasets.make_shifted_blobs
- skada.datasets.make_shifted_blobs(n_samples=100, n_features=2, shift=0.1, noise=None, centers=None, cluster_std=1.0, random_state=None, return_X_y=True, return_dataset=False)[source]
Generate source and shift target isotropic Gaussian blobs .
- Parameters:
- n_samplesint, default=100
It is the total number of points equally divided among clusters.
- n_featuresint, default=2
The number of features for each sample.
- shiftfloat or array like, default=0.10
If float, it is the value of the translation for every target feature. If array_like, each element of the sequence indicates the value of the translation for each target features.
- 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.
- centersint or ndarray of shape (n_centers, n_features), default=None
The number of centers to generate, or the fixed center locations. If n_samples is an int and centers is None, 3 centers are generated. If n_samples is array-like, centers must be either None or an array of length equal to the length of n_samples.
- cluster_stdfloat or array-like of float, default=1.0
The standard deviation of the clusters.
- shufflebool, default=True
Shuffle the samples.
- 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.