bootcamp_machine-learning icon indicating copy to clipboard operation
bootcamp_machine-learning copied to clipboard

Use interfaces for directives.

Open maximechoulika opened this issue 6 years ago • 0 comments

import abc

class Base(abc.ABC):
    @abc.abstractmethod
    def __init__(self, *args):
        pass

    @abc.abstractmethod
    def __call__(self):
        pass

    @abc.abstractmethod
    def predict(self, data):
        pass

# I let you define what is relevant.

class KMean(Base):
# the implementation for the students

Find a link for documentation: http://masnun.rocks/2017/04/15/interfaces-in-python-protocols-and-abcs/

maximechoulika avatar Nov 18 '19 11:11 maximechoulika