GEDLIB  1.0
sample.py File Reference

Python script that generates a random sample of given size from a given dataset. More...

Go to the source code of this file.

Detailed Description

Python script that generates a random sample of given size from a given dataset.

Usage:

$ python sample.py <dataset> <sample> [-h] [--help] [--exclude <graph collection>] [--balanced] <--size <size> | --size_ratio <size ratio>>

Arguments:

positional arguments
<dataset> path to existing graph collection XML file from which the sample should be drawn; must respect GraphCollection.dtd
<sample> path to sample file to be generated by the script
optional arguments
-h show help
–balanced generate sample with equal number of graphs per class
–exclude <graph collection> path to existing graph collection XML file whose graphs should be excluded from the sample; must respect GraphCollection.dtd
–size <size> number of graphs listed in the sample; must be between 0 and the number of graphs listed in <dataset>
–size_ratio <size ratio> number of graphs listed in the sample divided by number of graphs listed in <dataset>; must be between 0 and 1

Definition in file sample.py.