Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
serviceRec
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郭羽
serviceRec
Commits
62c71856
Commit
62c71856
authored
Dec 30, 2021
by
宋柯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模型上线
parent
8ff8d21d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
featureEngSk.py
spark/featureEngSk.py
+4
-4
No files found.
spark/featureEngSk.py
View file @
62c71856
...
@@ -764,7 +764,7 @@ def getPredictItemStatisticSql(start, end):
...
@@ -764,7 +764,7 @@ def getPredictItemStatisticSql(start, end):
SELECT TT.card_id, TT.label, count(1) as label_count
SELECT TT.card_id, TT.label, count(1) as label_count
FROM
FROM
(
(
SELECT T.
partition_date, T.
card_id, T.label
SELECT T.card_id, T.label
FROM
FROM
(
(
SELECT t1.card_id, 1 as label
SELECT t1.card_id, 1 as label
...
@@ -1080,13 +1080,13 @@ if __name__ == '__main__':
...
@@ -1080,13 +1080,13 @@ if __name__ == '__main__':
spark
=
get_spark
(
"SERVICE_FEATURE_CSV_EXPORT_SK"
)
spark
=
get_spark
(
"SERVICE_FEATURE_CSV_EXPORT_SK"
)
spark
.
sparkContext
.
setLogLevel
(
"ERROR"
)
spark
.
sparkContext
.
setLogLevel
(
"ERROR"
)
#获取点击曝光数据
#获取点击曝光数据
clickDF
,
expDF
,
ratingDF
,
startDay
,
endDay
=
get_click_exp_rating_df
(
trainDays
,
spark
)
#
clickDF, expDF, ratingDF, startDay, endDay = get_click_exp_rating_df(trainDays, spark)
#item Es Feature
#item Es Feature
itemEsFeatureDF
=
get_item_es_feature_df
()
#
itemEsFeatureDF = get_item_es_feature_df()
#计算 item 统计特征
#计算 item 统计特征
clickStaticFeatures
,
expStaticFeatures
=
getItemStaticFeatures
(
itemStatisticStartDays
+
trainDays
+
1
,
startDay
,
endDay
)
#
clickStaticFeatures, expStaticFeatures = getItemStaticFeatures(itemStatisticStartDays + trainDays + 1, startDay, endDay)
#计算线上推理 item 统计特征
#计算线上推理 item 统计特征
predictClickStaticFeatures
,
predictExpStaticFeatures
=
getPredictItemStaticFeatures
(
itemStatisticStartDays
)
predictClickStaticFeatures
,
predictExpStaticFeatures
=
getPredictItemStaticFeatures
(
itemStatisticStartDays
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment