src.labelling package

Subpackages

Submodules

src.labelling.apps module

class src.labelling.apps.LabellingConfig(app_name, app_module)

Bases: django.apps.config.AppConfig

name = 'src.labelling'

src.labelling.common module

src.labelling.common.add_labels(encoding, labelling, prefix_length, trace, attribute_classifier=None, executed_events=None, resources_used=None, new_traces=None)

Adds any number of label cells with last as label

src.labelling.common.compute_label_columns(columns, encoding, labelling)
Return type:list
src.labelling.common.get_intercase_attributes(log, encoding)

Dict of kwargs These intercase attributes are expensive operations!!!

src.labelling.common.next_event_name(trace, prefix_length)

Return the event event name at prefix length or 0 if out of range.

src.labelling.label_container module

class src.labelling.label_container.LabelContainer

Bases: src.labelling.label_container.LabelContainer

Inner object describing labelling state. For no labelling use NO_LABEL

This is a horrible hack and should be split into a label container and a container for encoding options, like what to add to the encoded log.

src.labelling.models module

class src.labelling.models.LabelTypes

Bases: enum.Enum

An enumeration.

ATTRIBUTE_NUMBER = 'attribute_number'
ATTRIBUTE_STRING = 'attribute_string'
DURATION = 'duration'
NEXT_ACTIVITY = 'next_activity'
NO_LABEL = 'no_label'
REMAINING_TIME = 'remaining_time'
class src.labelling.models.Labelling(id, type, attribute_name, threshold_type, threshold, results)

Bases: src.common.models.CommonModel

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

attribute_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_threshold_type_display(*, field=<django.db.models.fields.CharField: threshold_type>)
get_type_display(*, field=<django.db.models.fields.CharField: type>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

job_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

labelledlog_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>
results

A placeholder class that provides a way to set the attribute on the model.

threshold

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

threshold_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

to_dict()
type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class src.labelling.models.ThresholdTypes

Bases: enum.Enum

An enumeration.

THRESHOLD_CUSTOM = 'threshold_custom'
THRESHOLD_MEAN = 'threshold_mean'

Module contents