olpy.datasets.Dataset

class olpy.datasets.Dataset(f_train, f_test, label='Label')[source]

Bases: object

A helper class to load various datasets.

Properties created with the @property decorator should be documented in the property’s getter method.

train_data

The training data without the labels.

Type

pandas.DataFrame

train_target

The output variable for the training data.

Type

numpy.ndarray

test_data

The testing data without the labels.

Type

pandas.DataFrame

test_target

The output variable for the test data.

Type

numpy..ndarray

Parameters
  • f_train (str) – The path to the file containing the training dataset.

  • f_test (str) – The path to the file containing the testing dataset.

  • label (str, optional) – The column in which the target variable is located in the files. Defaults to Label.

Raises
  • FileNotFoundError – if the supplied files are inexistent.

  • IndexError – if the label provided does not match any column in the file.

Methods