Commit 44dda8af authored by 郭羽's avatar 郭羽

update feature

parent 263eb50a
...@@ -216,7 +216,7 @@ def addUserFeatures(samples,dataVocab,multiVocab): ...@@ -216,7 +216,7 @@ def addUserFeatures(samples,dataVocab,multiVocab):
def addSampleLabel(ratingSamples): def addSampleLabel(ratingSamples):
ratingSamples = ratingSamples.withColumn('label', when(F.col('rating') >= 1, 1).otherwise(0)) ratingSamples = ratingSamples.withColumn('label', when(F.col('rating') >= 8, 1).otherwise(0))
ratingSamples.show(5, truncate=False) ratingSamples.show(5, truncate=False)
ratingSamples.printSchema() ratingSamples.printSchema()
return ratingSamples return ratingSamples
...@@ -436,7 +436,9 @@ def getExposureSql(start, end): ...@@ -436,7 +436,9 @@ def getExposureSql(start, end):
and cl_id IS NOT NULL and cl_id IS NOT NULL
and card_id IS NOT NULL and card_id IS NOT NULL
and is_exposure='1' and is_exposure='1'
and page_name in ('home','search_result_more') and page_name='home'
and tab_name='精选'
--and page_name in ('home','search_result_more')
and card_type in ('card','video') and card_type in ('card','video')
and card_content_type in ('service') and card_content_type in ('service')
and (get_json_object(exposure_card,'$.in_page_pos') is null or get_json_object(exposure_card,'$.in_page_pos') != 'seckill') and (get_json_object(exposure_card,'$.in_page_pos') is null or get_json_object(exposure_card,'$.in_page_pos') != 'seckill')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment