bird_cloud_gnn.radar_dataset

Module for reading the files and passing as datasets to DGL

Module Contents

Classes

RadarDataset

Dataset for DGL created from CSVs in a folder.

class bird_cloud_gnn.radar_dataset.RadarDataset(data, features, target, name='Radar', num_nodes=100, max_edge_distance=50.0, max_poi_per_label=200, points_of_interest=None, use_missing_indicator_columns=False, add_edges_to_poi=False, skip_cache=False)[source]

Bases: dgl.data.DGLDataset

Dataset for DGL created from CSVs in a folder.

For every labeled point in the point cloud, the number of neighbours in a specific radius is checked. If the number of neighbours is big enough, the point is selected. A data point is a graph created by taking a selected point and a number of its neighbours.

data_folder

Folder with the CSV files.

Type:

str

features

List of features expected to be present at every CSV file.

Type:

array of str

target

Target column. 0, 1 or missing expected.

Type:

str

num_nodes

If a point has less than this amount of neighbours, it is ignored.

Type:

int

max_edge_distance

Creates a edge between two nodes if their distance is less than this value.

Type:

float

max_poi_per_label

Select at most this amount of POIs. If there are more POIs, they are chosen randomly.

Type:

int

missing_indicator_skip_columns = ['range', 'azimuth', 'elevation', 'x', 'y', 'z', 'centered_x', 'centered_y'][source]
oneline_description()[source]

Description of the dataset to uniquely identify it in logs

_read_one_file(data_path)[source]

Reads a file and creates the graphs and labels for it.

_process_data(data, origin='')[source]
process()[source]

Internal function for the DGLDataset. Process the folder to create the graphs.

save()[source]

Overwite to realize your own logic of saving the processed dataset into files.

It is recommended to use dgl.data.utils.save_graphs to save dgl graph into files and use dgl.data.utils.save_info to save extra information into files.

load()[source]

Overwite to realize your own logic of loading the saved dataset from files.

It is recommended to use dgl.data.utils.load_graphs to load dgl graph from files and use dgl.data.utils.load_info to load extra information into python dict object.

cache_dir()[source]
has_cache()[source]

Overwrite to realize your own logic of deciding whether there exists a cached dataset.

By default False.

__getitem__(i)[source]

Gets the data object at index.

__len__()[source]

The number of examples in the dataset.