Source code for immuneML.example_weighting.ExampleWeightingStrategy

import abc

from immuneML.example_weighting.ExampleWeightingParams import ExampleWeightingParams


[docs] class ExampleWeightingStrategy(metaclass=abc.ABCMeta): def __init__(self, name): self.name = name
[docs] @staticmethod @abc.abstractmethod def build_object(dataset, **params): pass
[docs] @abc.abstractmethod def compute_weights(self, dataset, params: ExampleWeightingParams): pass
[docs] def set_context(self, context: dict): return self