Space¶
- class compressed_kde.Space¶
Bases:
pybind11_objectBase class for space definitions.
Attributes Summary
Default kernel for this space.
Number of bandwidth values.
Number of dimensions.
Methods Summary
distance(x, y)Retrieve distance for each dimension
from_yaml(string)Construct space definition from YAML.
issubspace(space)Test if space is subspace.
load_from_yaml(path)Load space definition from file.
save_to_yaml(path)Save space definition to YAML file.
selection(space)Selection of dimensions that make up subspace.
to_yaml()Represent space definition as YAML.
Attributes Documentation
- default_kernel¶
Default kernel for this space.
- nbw¶
Number of bandwidth values.
- ndim¶
Number of dimensions.
Methods Documentation
- distance(x, y) array¶
Retrieve distance for each dimension
- Parameters
x ((ndim,) or (n,ndim) array) – Array of values
y ((ndim,) or (n,ndim) array) – Array of values
- Returns
distance between x and y
- Return type
array
- static from_yaml(string) Space¶
Construct space definition from YAML.
- Parameters
string (string) – YAML string space representation
- Return type
- static load_from_yaml(path) Space¶
Load space definition from file.
- Parameters
path (string) – path to YAML file
- Return type
- save_to_yaml(path) None¶
Save space definition to YAML file.
- Parameters
path (string) – path tho YAML file