Skip to main content

column_avg

Column averaging algorithm.

Classes

ColumnAverage

class ColumnAverage(*, field: str, table_name: str):

Simple algorithm for taking the arithmetic mean of a column in a table.

Arguments

  • field: The name of the column to take the mean of.
  • table_name: The name of the table on which column average will be performed on.

Attributes

  • class_name: The name of the algorithm class.
  • field: The name of the column to take the mean of.
  • fields_dict: A dictionary mapping all attributes that will be serialized in the class to their marshamllow field type. (e.g. fields_dict = {"class_name": fields.Str()}).
  • nested_fields: A dictionary mapping all nested attributes to a registry that contains class names mapped to the respective classes. (e.g. nested_fields = {"datastructure": datastructure.registry})
  • table_name: The name of the table on which column average will be performed on.

Ancestors

Variables

Methods


create

def create(self, role: Union[str, Role], **kwargs: Any)> Any:

Create an instance representing the role specified.

modeller

def modeller(    self, **kwargs: Any,)> bitfount.federated.algorithms.column_avg._ModellerSide:

Returns the modeller side of the ColumnAverage algorithm.

worker

def worker(self, **kwargs: Any)> bitfount.federated.algorithms.column_avg._WorkerSide:

Returns the worker side of the ColumnAverage algorithm.