特征列
2019-09-21 14:34:45 0 举报
AI智能生成
机器学习,特征列
作者其他创作
大纲/内容
bucketized_column
bucketized_feature_column = tf.feature_column.bucketized_column(
<br> source_column = numeric_feature_column,
<br> boundaries = [1960, 1980, 2000]
Dense Column
numeric_column
默认数据类型 (tf.float32)
indicator_column
indicator_column = tf.feature_column.indicator_column(categorical_column)
子主题
embedding_column
embedding_column = tf.feature_column.embedding_column(
<br> categorical_column=categorical_column,
<br> dimension=dimension_of_embedding_vector)
子主题
embedding_dimensions = number_of_categories**0.25
Categorical Column
categorical_column_with_identity
identity_feature_column = tf.feature_column.categorical_column_with_identity(
<br> key='my_feature_b',
<br> num_buckets=4)
categorical_column_with_vocabulary_list
vocabulary_feature_column =
<br> tf.feature_column.categorical_column_with_vocabulary_list(
<br> key="a feature returned by input_fn()",
<br> vocabulary_list=["kitchenware", "electronics", "sports"])
categorical_column_with_vocabulary_file
ocabulary_feature_column =
<br> tf.feature_column.categorical_column_with_vocabulary_file(
<br> key="a feature returned by input_fn()",
<br> vocabulary_file="product_class.txt",
<br> vocabulary_size=3)
categorical_column_with_hash_bucket
hashed_feature_column =
<br> tf.feature_column.categorical_column_with_hash_bucket(
<br> key = "some_feature",
<br> hash_buckets_size = 100) # The number of categories
crossed_column
crossed_lat_lon_fc = tf.feature_column.crossed_column(
<br> [latitude_bucket_fc, longitude_bucket_fc], 5000)
收藏
收藏
0 条评论
下一页
为你推荐
查看更多