How to use the modelbase.ModelBase.LogLoss function in modelbase

To help you get started, we’ve selected a few modelbase examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CalvinNeo / EasyMLPlatform / py / ml_models / model_task.py View on Github external
if (clsname.upper() in ModelBase.AllModelInfo().keys()): # and (clsname in possibles.keys()):
            # dataset.classfeatureindex is determined by mdinfo(and when training md.classfeatureindex is determined by dataset.classfeatureindex)
            ds['view'].classfeatureindex = mdinfo.classfeatureindex

            # need to set args to __init__
            # md = possibles.get(clsname)(dataset = ds['view'])
            # print ModelBase.AllModelInfo()[clsname.upper()]
            md = ModelBase.AllModelInfo()[clsname.upper()]['cls'](dataset = ds['view'])
            md.positive = mdinfo.positive
            md.negative = mdinfo.negative
            md.classfeatureindex = mdinfo.classfeatureindex
            md.loss = {
                'QUAD': ModelBase.QuadLoss
                ,'BIN': ModelBase.BinLoss
                ,'ABS': ModelBase.AbsLoss
                ,'LOG': ModelBase.LogLoss
            }[mdinfo.loss]

            self.dataset = ds['view']
            self.model = md

modelbase

A package to build metabolic models

MIT
Latest version published 3 days ago

Package Health Score

87 / 100
Full package analysis

Similar packages