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)

Copyright 2017-2024 SensiML Corporation

This file is part of SensiML™ Piccolo AI™.

SensiML Piccolo AI is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

SensiML Piccolo AI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with SensiML Piccolo AI. If not, see <https://www.gnu.org/licenses/>.

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

Copyright 2017-2024 SensiML Corporation

This file is part of SensiML™ Piccolo AI™.

SensiML Piccolo AI is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

SensiML Piccolo AI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with SensiML Piccolo AI. If not, see <https://www.gnu.org/licenses/>.

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