diff --git a/cesium/featureset.py b/cesium/featureset.py new file mode 100644 index 00000000..b0c549b4 --- /dev/null +++ b/cesium/featureset.py @@ -0,0 +1,89 @@ +import numpy as np +from sklearn.preprocessing import Imputer +import xarray as xr + + +__all__ = ['Featureset'] + + +class Featureset(xr.Dataset): + """Extension of `xarray.Dataset` class that implements some convenience + functions specific to featuresets generated from a set of time series. + + In particular, provides a method `impute` for filling missing values and + overloads indexing so that the `name` attribute becomes the "primary" + coordinate to simplify extracting features for specific time series. + """ + def __repr__(self): + """Replace when printing.""" + s = xr.Dataset.__repr__(self) + return s.replace('