malt.agents.merchant.DatasetMerchant
- class malt.agents.merchant.DatasetMerchant(dataset: malt.data.dataset.Dataset)[source]
Bases:
malt.agents.merchant.Merchant
Merchant with a candidate pool.
- Parameters
dataset (Dataset) – A dataset of Points.
Examples
>>> import malt >>> dataset = malt.data.collections.linear_alkanes(5) >>> dataset_merchant = malt.agents.merchant.DatasetMerchant(dataset) >>> catalogue = dataset_merchant.catalogue() >>> assert catalogue == dataset.clone().erase_annotation() >>> dataset_with_the_first_point = Dataset([dataset[0]]) >>> dataset_merchant.merchandize(dataset_with_the_first_point) Dataset with 1 molecules >>> assert len(dataset_merchant.dataset) == len(dataset) - 1
- __init__(dataset: malt.data.dataset.Dataset)[source]
Methods
__init__
(dataset)catalogue
()merchandize
(dataset)Order molecules in subset.