Skip to main content
`Ctrl`+`K`

# miml.data.miml_dataset.MIMLDataset

class miml.data.miml_dataset.MIMLDataset

  Class to manage MIML data obtained from datasets

  __init__() → None

    Constructor of the class MIMLDataset

  Methods

  `__init__`() | Constructor of the class MIMLDataset
  `add_attribute`(name[, position, values, feature]) | Add attribute to the dataset
  `add_bag`(bag) | Add a bag to the dataset
  `add_instance`(bag, instance) | Add an Instance to a Bag of the dataset
  `cardinality`() | Computes the Cardinality as the average number of labels per pattern.
  `delete_attribute`(position) | Delete attribute of the dataset
  `delete_bag`(key_bag) | Delete a bag of the dataset
  `delete_instance`(bag, index_instance) | Delete an instance of a bag of the dataset
  `density`() | Computes the density as the cardinality / numLabels.
  `describe`() | Print statistics about the dataset
  `distinct`() | Computes the numbers of labels combinations used in the dataset respect all the possible ones
  `get_attribute`(bag, instance, attribute) | Get value of an attribute of the bag
  `get_attributes`() | Get attributes values of the dataset
  `get_attributes_name`() | Get attributes name
  `get_bag`(bag) | Get data of a bag of the dataset
  `get_features`() | Get features values of the dataset
  `get_features_by_bag`() | Get features values of the dataset by bag
  `get_features_name`() | Get function for dataset features name
  `get_instance`(bag, index_instance) | Get an Instance of the dataset
  `get_labels`() | Get labels values of the dataset
  `get_labels_by_bag`() | Get labels values of the dataset
  `get_labels_name`() | Get function for dataset labels name
  `get_name`() | Get function for dataset name
  `get_number_attributes`() | Get numbers of attributes of the bag
  `get_number_bags`() | Get numbers of bags of the dataset
  `get_number_features`() | Get numbers of attributes of the dataset
  `get_number_instances`() | Get numbers of instances of the dataset
  `get_number_labels`() | Get numbers of labels of the dataset
  `get_statistics`() | Calculate statistics of the dataset
  `save_arff`(path) |
  `save_csv`(path) |
  `set_attribute`(bag, index_instance, ...) | Update value from attributes
  `set_features_name`(features) | Set function for dataset features name
  `set_labels_name`(labels) | Set function for dataset labels name
  `set_name`(name) | Set function for dataset name
  `show_dataset`([start, end, attributes, mode, ...]) | Function to show information about the dataset
  `split_dataset`([train_percentage, seed]) | Split dataset in two parts, one for training and the other for test
  `split_dataset_cv`([folds, seed]) | CrossValidation K-Fold split of dataset