Labels
Labels are used to describe the events your application will be detecting. Each label will have a subset of label values that can be assigned to any segment of data that you are annotating. For example, you might create a label called “Activity” which has multiple Label Values such as Walking, Running, Sitting, Standing, etc. Projects can have multiple labels each having their own set of label values
Examples:
from sensiml.datamanager.label import LabelSet
from sensiml.datamanager.labelvalue import LabelValueSet
# gets the set of labels associated with this project
label_set = LabelSet(client._connection, client._project)
# get the first label object
label = label_set.labels[0]
label.name
# gets the set of label values associated with the label
label_values_set = LabelValueSet(client._connection, client._project, label)
print(label_values_set)
- class sensiml.datamanager.label.Label(connection: Connection, project: Project)
Base class for a label object.
- delete() Response
Calls the REST API and deletes the object from the server.
- initialize_from_dict(data: dict)
Reads a json dictionary and populates a single metadata object.
- Parameters
data (dict) – contains the uuid, name, type
- insert() Response
Calls the REST API and inserts a metadata object onto the server using the local object’s properties.
- property name: str
The name property of the metadata object
- refresh() Response
Calls the REST API and populates the local object’s properties from the server.
- update() Response
Calls the REST API and updates the object on the server.
- property uuid: str
Auto generated unique identifier for the metadata object
- property value_type: str
The data type of the metadata object
- class sensiml.datamanager.labelvalue.LabelValue(connection: Connection, project: Project, label: Label)
Base class for a label object.
- property created_at
The created time of the label value object
- delete() Response
Calls the REST API and deletes the object from the server.
- initialize_from_dict(data: dict)
Reads a json dictionary and populates a single metadata object.
- Parameters
dict (dict) – contains the uuid, value
- insert() Response
Calls the REST API and inserts a metadata object onto the server using the local object’s properties.
- refresh() Response
Calls the REST API and populates the local object’s properties from the server.
- update() Response
Calls the REST API and updates the object on the server.
- property uuid: str
Auto generated unique identifier for the label value object
- property value: str
The data type of the label value object