-
Notifications
You must be signed in to change notification settings - Fork 7
/
dataset.py
49 lines (37 loc) · 1.22 KB
/
dataset.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
'''
Base IO class for all datasets
'''
# Copyright (c) 2017 Jiawei Zhang <jwzhanggy@gmail.com>
# License: TBD
import abc
class dataset:
"""
dataset: Abstract Class
Entries: dataset_name: the name of the dataset
dataset_description: the textual description of the dataset
"""
dataset_name = None
dataset_descrition = None
dataset_source_folder_path = None
dataset_source_file_name = None
data = None
# initialization function
def __init__(self, dName=None, dDescription=None):
'''
Parameters: dataset name: dName, dataset description: dDescription
Assign the parameters to the entries of the base class
'''
self.dataset_name = dName
self.dataset_descrition = dDescription
# information print function
def print_dataset_information(self):
'''
Print the basic information about the dataset class
inclduing the dataset name, and dataset description
'''
print('Dataset Name: ' + self.dataset_name)
print('Dataset Description: ' + self.dataset_descrition)
# dataset load abstract function
@abc.abstractmethod
def load(self):
return