pyconstruct.domains.BaseDomain.infer

BaseDomain.infer(*args, **kwargs)

Inference oracle.

This is a generic inference method. It takes care of caching and parallelization. Subclasses should implement the _infer method, which is called for each sample passed to this method.

Parameters:
  • args ([numpy.ndarray]) – Input vectors of type numpy.ndarray. The first dimension of the vectors must be the number of samples (n_samples) and must be the same for all vectors.
  • kwargs – Additional parameters to pass to each call of _infer.
Returns:

preds – The array of predictions. The array contains n_samples solutions.

Return type:

numpy.ndarray