Database

class mouffet.data.database.Database(opts, updated_opts=None)[source]

Bases: DatabaseOptions

DATASET

alias of Dataset

check_database(db_types=None)[source]

_summary_

Parameters:

db_types (_type_, optional) – _description_. Defaults to None.

get_paths()[source]

_summary_

Returns:

_description_

Return type:

_type_

split()[source]

Splits files into subsets. Splitting is done from the training dataset. This dataset can then be split into training and validation and optionally test dataset. By default, will split the training dataset into 80% training and 20% validation. If a proportion is specified for the test dataset, this proportion will be set aside first, and the training and validation will be split from the remainder. If not proportion is specified for the test dataset but the database includes a test dataset (as specified with the db_types option), the file list will be generated by listing files from that directory

Parameters:
  • paths (list) – list of all paths generated by the data_handler

  • database (DatabaseOptions) – Options relative to the database to split

  • ValueError – if the path to the training dataset is not found

  • ValueError – If no splitting options - described by the split option - is found

Returns:

Dict containing lists for each dataset type

Return type:

dict