miml.data.bag.Bag

Contents

miml.data.bag.Bag#

class miml.data.bag.Bag(key: str)#

Class to manage MIML Bag data representation

__init__(key: str) None#

Constructor of the class Bag

Parameters#

keystr

Key of the bag

Methods

__init__(key)

Constructor of the class Bag

add_attribute(position[, values])

Add attribute to the bag

add_instance(instance)

Add instance to the bag

delete_attribute(position)

Delete attribute of the bag

delete_instance(index)

Delete an instance of the bag

get_attribute(instance, attribute)

Get value of an attribute of the bag

get_attributes()

Get attributes values of the bag

get_attributes_name()

Get attributes name of the bag

get_features()

Get features values of the bag

get_features_name()

Get features name of the bag

get_instance(index)

Get an Instance of the Bag

get_labels()

Get labels values of the bag

get_labels_name()

Get labels name of the bag

get_number_attributes()

Get numbers of attributes of the bag

get_number_features()

Get numbers of features of the bag

get_number_instances()

Get numbers of instances of a bag

get_number_labels()

Get numbers of labels of the bag

set_attribute(instance, attribute, value)

Update value from attributes

set_dataset(dataset)

Set dataset which contains the bag

show_bag([start, end, attributes, mode])

Show bag info in table format