astartes.samplers package
Subpackages
- astartes.samplers.extrapolation package
- Submodules
- astartes.samplers.extrapolation.dbscan module
- astartes.samplers.extrapolation.kmeans module
- astartes.samplers.extrapolation.molecular_weight module
- astartes.samplers.extrapolation.optisim module
- astartes.samplers.extrapolation.scaffold module
- astartes.samplers.extrapolation.sphere_exclusion module
- astartes.samplers.extrapolation.target_property module
- astartes.samplers.extrapolation.time_based module
- Module contents
- astartes.samplers.interpolation package
Submodules
astartes.samplers.abstract_sampler module
Abstract Sampling class
- class astartes.samplers.abstract_sampler.AbstractSampler(X, y, labels, configs)
Bases:
ABC
Abstract Base Class for all samplers.
- __init__(X, y, labels, configs)
Copies X, y, labels, and configs into class attributes and then calls sampler.
- get_clusters()
Getter for the cluster labels.
- Returns:
Cluster labels.
- Return type:
np.array
- get_config(key, default=None)
Getter to sampler._configs
- Parameters:
key (str) – String parameter for the sampler.
default (any, optional) – Default to return if key not present. Defaults to None.
- Returns:
value at provided key, or else default.
- Return type:
any
- get_sample_idxs(n_samples)
Get idxs of samples.
- get_sorted_cluster_counter(max_shufflable_size=None)
Return a dict containing cluster_id: number of members sorted by number of members, ascending
if max_shufflable_size is not None, clusters below the passed size will be shuffled into a new order according to random_state in hopts