Source code for simpleml.datasets.abstract_mixin

'''
Abstract Module for external dataframes

Inherit and extend for particular patterns. It is a bit of a misnomer to use the
term "dataframe", since there are very few expected attributes and they are by no
means unique to pandas.

Does not actually implement behavior. Added for transparency into expected methods
'''

[docs]__author__ = 'Elisha Yadgaran'
[docs]class AbstractDatasetMixin(object): @property
[docs] def X(self): ''' Return the subset that isn't in the target labels ''' raise NotImplementedError
@property
[docs] def y(self): ''' Return the target label columns ''' raise NotImplementedError
[docs] def get(self, column, split): ''' Unimplemented method to explicitly split X and y Must be implemented by subclasses ''' raise NotImplementedError
[docs] def get_feature_names(self): ''' Should return a list of the features in the dataset ''' raise NotImplementedError