Interpolation Strategy (Core)#

alts.core.oracle.interpolation_strategy

class InterpolationStrategy[source]#

Bases: Configurable, QueryConstrained

Description
An InterpolatingStrategy interpolates lists of data points into into single data points.
More specifically, for each sample all data points in the sample are interpolated into a single point for further use.
This is a base class not intended for direct use.
data_sampler: DataSampler = Field(name=None,type=None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=False,repr=False,hash=None,compare=True,metadata=mappingproxy({}),_field_type=None)#
interpolate(self, data_points) data_points[source]#
Description
Interpolates a list of data samples containing multiple data points into a list of single data points. This usually means the output containing fewer queries than the input.
This implementation of interpolate returns the list of data samples as is. If this is the result you wish to achieve, please use NoInterpolation instead.
Parameters:

data_points – A list of data samples, where each sample may contain multiple data points

Returns:

The interpolated data points

Return type:

Tuple(NDArray, NDArray)

query_constrain(self) QueryConstrain[source]#
Description
See DataSource.query()
Parameters:

queries – Requested Query

Returns:

Processed Query, Result

Return type:

A tuple of two NDArray

class NoInterpolation[source]#

Bases: InterpolationStrategy

Description
NoInterpolation is an interpolator that does nothing to the given data.
Parameters:

data_sampler (DataSampler) – A sample of the data which contains the to-be interpolated data points