pysad.utils.Data¶
- class pysad.utils.Data(data_base_path='data')[source]¶
A helper class to load various data.
- Parameters:
data_base_path (str) – Base path that contains the data files.
Methods
__init__
([data_base_path])get_data
(data_file)Loads the data given the path.
get_iterator
(data_file[, shuffle, seed])The iterator function
- get_data(data_file)[source]¶
Loads the data given the path.
- Parameters:
data_file – Path of the data.
- Returns:
Feature vectors. y (np.array of shape (num_instances,)): Labels.
- Return type:
X (np.array of shape (num_instances, num_features))
- get_iterator(data_file, shuffle=True, seed=None)[source]¶
The iterator function
- Parameters:
- Returns:
pysad.utils.array_streamer.ArrayStreamer.iter method applied with (X, y), where X is the variable containing feature vectors and y is the variable containing labels.
- Return type:
iterator (The iterator)