Data Sampler (Implementation) [0%]#

class KDTreeKNNDataSampler(*args: 'Any', **kwargs: 'Any')[source]#

Bases: ResultDataSampler

post_init(self) None[source]#
Description
Initializes the Configurable and subscribes.
query(self, queries, size) data_points[source]#
Description
Returns a tuple of size queries and size results in the area of the requested queries.
Parameters:
  • queries (NDArray) – A list of queries

  • size (Number) – The preferred sample size

Returns:

A tuple of queries and their associated results

Return type:

Tuple[NDArray,`NDArray <https://numpy.org/doc/stable/reference/arrays.ndarray.html>`_]

query_constrain(self) QueryConstrain[source]#
Description
Returns the QueryConstrain of the object.
Not implemented here.
result_constrain(self) ResultConstrain[source]#
Description
Returns the ResultConstrain of the object.
Not implemented here.
result_update(self, subscription) None[source]#
Description
Tries to update the given subscription.
Parameters:

subscription (Subscribable) – The subscription to be updated

sample_size_data_fraction: int = 6#
sample_size_max: int = 80#
sample_size_min: int = 5#
class KDTreeRegionDataSampler(*args: 'Any', **kwargs: 'Any')[source]#

Bases: ResultDataSampler

post_init(self) None[source]#
Description
Initializes the Configurable and subscribes.
query(self, queries, size) data_points[source]#
Description
Returns a tuple of size queries and size results in the area of the requested queries.
Parameters:
  • queries – A list of queries

  • size (Number) – The preferred sample size

Returns:

A tuple of queries and their associated results

Return type:

Tuple[NDArray,`NDArray <https://numpy.org/doc/stable/reference/arrays.ndarray.html>`_]

query_constrain(self) QueryConstrain[source]#
Description
Returns the QueryConstrain of the object.
Not implemented here.
region_size: float = 0.1#
result_constrain(self) ResultConstrain[source]#
Description
Returns the ResultConstrain of the object.
Not implemented here.
result_update(self, subscription) None[source]#
Description
Tries to update the given subscription.
Parameters:

subscription (Subscribable) – The subscription to be updated