simpleml.orm.metric

ORM module for metric objects

Module Contents

Classes

ORMMetric

Abstract Base class for all Metric objects

Attributes

LOGGER

__author__

simpleml.orm.metric.LOGGER[source]
simpleml.orm.metric.__author__ = Elisha Yadgaran[source]
class simpleml.orm.metric.ORMMetric[source]

Bases: simpleml.orm.persistable.ORMPersistable

Abstract Base class for all Metric objects

name: the metric name values: JSON object with key: value pairs for performance on test dataset

(ex: FPR: TPR to create ROC Curve) Singular value metrics take the form - {‘agg’: value}

model_id: foreign key to the model that was used to generate predictions dataset_id:

__table_args__[source]
__tablename__ = metrics[source]
dataset[source]
dataset_id[source]
model[source]
model_id[source]
values[source]
classmethod get_latest_version(cls, name, model_id)[source]

Versions should be autoincrementing for each object (constrained over friendly name and model). Executes a database lookup and increments..

Parameters
  • name (str) –

  • model_id (str) –

Return type

int

classmethod load_dataset(cls, id)[source]
Parameters

id (str) –

classmethod load_model(cls, id)[source]
Parameters

id (str) –