Module containing different datasets.
PandasDataset
PandasDataset(dataset_path, transform=None, data_columns=None, label_column=None, return_index=True)
Bases: Dataset
Loading a dataset contained within a .csv or .feather file.
The dataset file have to have the following columns:
- label (optional): The label corresponding to the sample.
- {data column name}: Columns containing data to extract.
Examples:
>>> from spacephyml.datasets import PandasDataset
>>> dataset = PandasDataset('./mydataset.csv')
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataset_path
|
string
|
Path to the file containing the dataset. |
required |
transform
|
callable
|
Optional transform to be applied on each data sample. |
None
|
data_columns
|
list
|
Which columns to use for data. |
None
|
label_column
|
string
|
Which column to use for label. |
None
|
Returns:
| Type | Description |
|---|---|
|
Will return a list with with all the data varibles in a list followed |
|
|
by the label. |