easy_rec.python.feature_column¶
easy_rec.python.feature_column.feature_column¶
- exception easy_rec.python.feature_column.feature_column.FeatureKeyError(feature_name)[source]¶
Bases:
KeyError
Bases:
object
- class easy_rec.python.feature_column.feature_column.EVParams(filter_freq, steps_to_live, use_cache, init_capacity, max_capacity)¶
Bases:
tuple
- property filter_freq¶
Alias for field number 0
- property init_capacity¶
Alias for field number 3
- property max_capacity¶
Alias for field number 4
- property steps_to_live¶
Alias for field number 1
- property use_cache¶
Alias for field number 2
- class easy_rec.python.feature_column.feature_column.FeatureColumnParser(feature_configs, wide_deep_dict={}, wide_output_dim=-1, ev_params=None)[source]¶
Bases:
object
Parse and generate feature columns.
- __init__(feature_configs, wide_deep_dict={}, wide_output_dim=-1, ev_params=None)[source]¶
Initializes a FeatureColumnParser.
- Parameters:
feature_configs – collections of easy_rec.python.protos.feature_config_pb2.FeatureConfig or easy_rec.python.protos.feature_config_pb2.FeatureConfigV2.features
wide_deep_dict – dict of {feature_name:WideOrDeep}, passed by easy_rec.python.layers.input_layer.InputLayer, it is defined in easy_rec.python.protos.easy_rec_model_pb2.EasyRecModel.feature_groups
wide_output_dim – output dimension for wide columns
ev_params – params used by EmbeddingVariable, which is provided by pai-tf
- property wide_columns¶
- property deep_columns¶
- property sequence_columns¶
- parse_id_feature(config)[source]¶
Generate id feature columns.
if hash_bucket_size or vocab_list or vocab_file is set, then will accept input tensor of string type, otherwise will accept input tensor of integer type.
- Parameters:
config – instance of easy_rec.python.protos.feature_config_pb2.FeatureConfig
- parse_tag_feature(config)[source]¶
Generate tag feature columns.
if hash_bucket_size is set, will accept input of SparseTensor of string, otherwise num_buckets must be set, will accept input of SparseTensor of integer. tag feature preprocess is done in easy_rec/python/input/input.py: Input. _preprocess
- Parameters:
config – instance of easy_rec.python.protos.feature_config_pb2.FeatureConfig
- parse_raw_feature(config)[source]¶
Generate raw features columns.
if boundaries is set, will be converted to category_column first.
- Parameters:
config – instance of easy_rec.python.protos.feature_config_pb2.FeatureConfig
- parse_expr_feature(config)[source]¶
Generate raw features columns.
if boundaries is set, will be converted to category_column first.
- Parameters:
config – instance of easy_rec.python.protos.feature_config_pb2.FeatureConfig
- parse_combo_feature(config)[source]¶
Generate combo feature columns.
- Parameters:
config – instance of easy_rec.python.protos.feature_config_pb2.FeatureConfig