KernelDensity ¶
Weighted Gaussian kernel density of one variable: a smooth reference
distribution for NormalScore when the data are too few or too clustered
to define the tails.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bandwidth
|
(silverman, scott)
|
Kernel width: Silverman's rule |
"silverman"
|
lower
|
float
|
Bounds of the values, kept by reflecting the kernels at them, e.g.
|
required |
upper
|
float
|
Bounds of the values, kept by reflecting the kernels at them, e.g.
|
required |
log
|
bool
|
Kernels on |
False
|
Attributes:
| Name | Type | Description |
|---|---|---|
bandwidth_ |
float
|
The fitted kernel width. |
fit
method descriptor
¶
fit(values, *, weights=None, data=None)
Fits the density to values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
values
|
array_like or str
|
Finite values, or the column of |
required |
weights
|
array_like or str
|
Declustering weights, or their column. |
None
|
data
|
(PointSet, Table or mapping)
|
Holds the columns named by the other arguments. |
None
|
from_json
staticmethod
¶
from_json(text)
Reads to_json output; raises InvalidInput on another class's JSON
or a newer format.
sample
method descriptor
¶
sample(n, *, seed=0)
n values drawn from the density; the same seed gives the same
values.
used in