scanpy.datasets.blobs#
- scanpy.datasets.blobs(*, n_variables=11, n_centers=5, cluster_std=1.0, n_observations=640, rng=None)[source]#
Gaussian Blobs.
- Parameters:
- n_variables
int(default:11) Dimension of feature space.
- n_centers
int(default:5) Number of cluster centers.
- cluster_std
float(default:1.0) Standard deviation of clusters.
- n_observations
int(default:640) Number of observations. By default, this is the same observation number as in
scanpy.datasets.krumsiek11().- rng
int|integer|Sequence[int] |SeedSequence|Generator|BitGenerator|None(default:None) Random number generation to control stochasticity.
If a type:
SeedLikevalue, it’s used to seed a new random number generator; If anumpy.random.Generator,rng’s state will be directly advanced; IfNone, a non-reproducible random number generator is used. Seenumpy.random.default_rng()for more details.The default value matches legacy scanpy behavior and will change to
Nonein scanpy 2.0.
- n_variables
- Return type:
- Returns:
Annotated data matrix containing a observation annotation ‘blobs’ that indicates cluster identity.
Examples
>>> import scanpy as sc >>> sc.datasets.blobs() AnnData object with n_obs × n_vars = 640 × 11 obs: 'blobs'