scipy.stats.gaussian_kde.resample#
- gaussian_kde.resample(size=None, seed=None)[source]#
Randomly sample a dataset from the estimated pdf.
- Parameters
- sizeint, optional
The number of samples to draw. If not provided, then the size is the same as the effective number of samples in the underlying dataset.
- seed{None, int,
numpy.random.Generator, numpy.random.RandomState}, optionalIf seed is None (or np.random), the
numpy.random.RandomStatesingleton is used. If seed is an int, a newRandomStateinstance is used, seeded with seed. If seed is already aGeneratororRandomStateinstance then that instance is used.
- Returns
- resample(self.d, size) ndarray
The sampled dataset.