How to use the featuretools.feature_base.feature_base.Feature function in featuretools

To help you get started, we’ve selected a few featuretools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github FeatureLabs / featuretools / featuretools / feature_base / feature_base.py View on Github external
def OR(self, other_feature):
        """Logical OR with other_feature"""
        return Feature([self, other_feature], primitive=primitives.Or)
github FeatureLabs / featuretools / featuretools / feature_base / feature_base.py View on Github external
def _handle_binary_comparision(self, other, Primitive, PrimitiveScalar):
        if isinstance(other, FeatureBase):
            return Feature([self, other], primitive=Primitive)

        return Feature([self], primitive=PrimitiveScalar(other))
github FeatureLabs / featuretools / featuretools / feature_base / feature_base.py View on Github external
def __rsub__(self, other):
        return Feature([self], primitive=primitives.ScalarSubtractNumericFeature(other))
github FeatureLabs / featuretools / featuretools / feature_base / features_deserializer.py View on Github external
ft.load_features(f)

            feature_str = f.read()
            ft.load_features(feature_str)

    .. seealso::
        :func:`.save_features`
    """
    return FeaturesDeserializer.load(features, profile_name).to_list()


class FeaturesDeserializer(object):
    FEATURE_CLASSES = {
        'AggregationFeature': AggregationFeature,
        'DirectFeature': DirectFeature,
        'Feature': Feature,
        'FeatureBase': FeatureBase,
        'GroupByTransformFeature': GroupByTransformFeature,
        'IdentityFeature': IdentityFeature,
        'TransformFeature': TransformFeature,
        'FeatureOutputSlice': FeatureOutputSlice
    }

    def __init__(self, features_dict):
        self.features_dict = features_dict
        self._check_schema_version()
        self.entityset = deserialize_es(features_dict['entityset'])
        self._deserialized_features = {}  # name -> feature
        self._primitives_deserializer = PrimitivesDeserializer()

    @classmethod
    def load(cls, features, profile_name):
github FeatureLabs / featuretools / featuretools / feature_base / feature_base.py View on Github external
def NOT(self):
        """Creates inverse of feature"""
        return Feature([self], primitive=primitives.Not)
github FeatureLabs / featuretools / featuretools / feature_base / feature_base.py View on Github external
def is_null(self):
        """Compares feature to null by equality"""
        return Feature([self], primitive=primitives.IsNull)
github FeatureLabs / featuretools / featuretools / feature_base / feature_base.py View on Github external
def __rdiv__(self, other):
        return Feature([self], primitive=primitives.DivideByFeature(other))