opalalgorithms.core.base

This is the base module for all algorithms.

Base class for implementing any algorithms for OPAL computation.

class opalalgorithms.core.base.OPALAlgorithm[source]

Base class for OPAL Algorithms.

The class can be used in the following way:

algo = OPALAlgorithm()
result = algo.map(params, bandicoot_user)
map(params, bandicoot_user)[source]

Map users data to a single result.

Parameters:
  • params (dict) – Parameters to be used by each map of the algorithm.
  • bandicoot_user (bandicoot.user) – Bandicoot user.
Returns:

A dictionary representing with keys as string or tuple, and values as int or float which will be aggregated by the reducer.

Return type:

dict