{ } Raw JSON

bundles / scipy latest / scipy / stats / _kde / gaussian_kde / resample

function

scipy.stats._kde:gaussian_kde.resample

source: /scipy/stats/_kde.py :456

Signature

def   resample ( self size = None seed = None )

Summary

Randomly sample a dataset from the estimated pdf.

Parameters

size : int, 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`}, optional

If seed is None (or np.random), the numpy.random.RandomState singleton is used. If seed is an int, a new RandomState instance is used, seeded with seed. If seed is already a Generator or RandomState instance then that instance is used.

Returns

resample : (self.d, `size`) ndarray

The sampled dataset.

Aliases

  • scipy.stats.gaussian_kde.resample

Referenced by

This package