def _feature_type_handler(self, f): if isinstance(f, TransformPrimitive): return self._calculate_transform_features elif isinstance(f, DirectFeature): return self._calculate_direct_features elif isinstance(f, AggregationPrimitive): return self._calculate_agg_features elif isinstance(f, IdentityFeature): return self._calculate_identity_features else: raise UnknownFeature(u"{} feature unknown".format(f.__class__))
def _get_ftype_string(f): if isinstance(f, TransformPrimitive): return "transform" elif isinstance(f, DirectFeature): return "direct" elif isinstance(f, AggregationPrimitive): return "aggregation" elif isinstance(f, IdentityFeature): return "identity" else: raise UnknownFeature("{} feature unknown".format(f.__class__))
def _feature_type_handler(self, f): if type(f) == TransformFeature: return self._calculate_transform_features elif type(f) == GroupByTransformFeature: return self._calculate_groupby_features elif type(f) == DirectFeature: return self._calculate_direct_features elif type(f) == AggregationFeature: return self._calculate_agg_features elif type(f) == IdentityFeature: return self._calculate_identity_features else: raise UnknownFeature(u"{} feature unknown".format(f.__class__))