Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The implementation between each model can be entire different, we are not going to go into details about each particular model, each model implementation in Python Bridge is a set of expected functions focus in functionality

Model Class Creation

Every model class must be under the package models, inside the Python Bridge folder, and must extended from the class ModelWrapper. An example of a model class with the bare minimum, can be found below

Code Block
languagepy
themeFadeToGrey
from models.model_wrapper import ModelWrapper


class Test(ModelWrapper):
    
    def __init__(self):
        super().__init__()

    def initialize(self, model_dir, **kwargs):
        pass

    def load(self, model_dir, name, version):
        pass

    def save(self):
        pass

    def clear(self):
        pass

    def feed(self, data):
        pass

    def train(self, **kwargs):
        pass

    def predict(self, data: list):
        pass

    def regress(self, data):
        pass

    def classify(self, data) -> (str, float):
        pass

    


Implementation Class

Code Block
languagepy
themeRDark
def initialize(self, model_dir, **kwargs):

...