Commit 0ab01003 authored by 郭羽's avatar 郭羽

update feature

parent 947e1950
......@@ -214,7 +214,7 @@ def addUserFeatures(samples,dataVocab,multiVocab):
def addSampleLabel(ratingSamples):
ratingSamples = ratingSamples.withColumn('label', when(F.col('rating') >= 8, 1).otherwise(0))
ratingSamples = ratingSamples.withColumn('label', when(F.col('rating') >= 1, 1).otherwise(0))
ratingSamples.show(5, truncate=False)
ratingSamples.printSchema()
return ratingSamples
......@@ -435,11 +435,12 @@ def getExposureSql(start, end):
and cl_id IS NOT NULL
and card_id IS NOT NULL
and is_exposure='1'
and page_name='home'
and tab_name='精选'
and page_name in ('home','search_result_more')
and card_type in ('card','video')
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')
group by partition_date,cl_id,card_id,time_stamp
) t1
join
( --渠道,新老
......
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