Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
2532b88b
Commit
2532b88b
authored
Feb 20, 2019
by
王志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据指标波动假设检验统计
parent
934df753
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
hypothesis_test.py
eda/recommended_indexs/hypothesis_test.py
+14
-7
No files found.
eda/recommended_indexs/hypothesis_test.py
View file @
2532b88b
...
@@ -221,18 +221,25 @@ def chi_cal(data):
...
@@ -221,18 +221,25 @@ def chi_cal(data):
#老用户精准点击曝光数据(首页精选日记本列表on_click_diary_card)
#老用户精准点击曝光数据(首页精选日记本列表on_click_diary_card)
print
(
"【1】(精准曝光)首页精选日记本列表老用户ctr数据波动假设检验结果:"
)
print
(
"【1】(精准曝光)首页精选日记本列表老用户ctr数据波动假设检验结果:"
)
chi_ctr_precise_recently
=
chi_DATA_recently
(
"clk_count_oldUser_all_a"
,
"clk_count_oldUser_all_b"
,
"imp_count_oldUser_all_precise"
,
"on_click_diary_card"
,
five_days
,
yesterday
)
chi_ctr_precise_
old_
recently
=
chi_DATA_recently
(
"clk_count_oldUser_all_a"
,
"clk_count_oldUser_all_b"
,
"imp_count_oldUser_all_precise"
,
"on_click_diary_card"
,
five_days
,
yesterday
)
temp1
=
[
float
(
str
(
Decimal
(
chi_ctr_precise_recently
[
i
])
.
quantize
(
Decimal
(
'0.0'
))))
for
i
in
range
(
len
(
chi_ctr_precise
_recently
))]
temp1
_old
=
[
float
(
str
(
Decimal
(
chi_ctr_precise_old_recently
[
i
])
.
quantize
(
Decimal
(
'0.0'
))))
for
i
in
range
(
len
(
chi_ctr_precise_old
_recently
))]
# print(temp1)
# print(temp1)
chi_ctr_precise_yesterday
=
chi_DATA_yesterday
(
"clk_count_oldUser_all_a"
,
"clk_count_oldUser_all_b"
,
"imp_count_oldUser_all_precise"
,
"on_click_diary_card"
,
yesterday
)
chi_ctr_precise_
old_
yesterday
=
chi_DATA_yesterday
(
"clk_count_oldUser_all_a"
,
"clk_count_oldUser_all_b"
,
"imp_count_oldUser_all_precise"
,
"on_click_diary_card"
,
yesterday
)
temp2
=
[
float
(
chi_ctr_precise_yesterday
[
i
])
for
i
in
range
(
len
(
chi_ctr_precise
_yesterday
))]
temp2
_old
=
[
float
(
chi_ctr_precise_old_yesterday
[
i
])
for
i
in
range
(
len
(
chi_ctr_precise_old
_yesterday
))]
# print(temp2)
# print(temp2)
tst
=
data_cal
(
temp1
,
temp2
)
tst
_old
=
data_cal
(
temp1_old
,
temp2_old
)
chi_cal
(
tst
)
chi_cal
(
tst
_old
)
#新用户精准点击曝光数据(首页精选日记本列表on_click_diary_card)
#新用户精准点击曝光数据(首页精选日记本列表on_click_diary_card)
print
(
"【2】(精准曝光)首页精选日记本列表新用户ctr数据波动假设检验结果:"
)
print
(
"【2】(精准曝光)首页精选日记本列表新用户ctr数据波动假设检验结果:"
)
chi_ctr_precise_new_recently
=
chi_DATA_recently
(
"clk_count_newUser_all_a"
,
"clk_count_newUser_all_b"
,
"imp_count_newUser_all_precise"
,
"on_click_diary_card"
,
five_days
,
yesterday
)
temp1_new
=
[
float
(
str
(
Decimal
(
chi_ctr_precise_old_recently
[
i
])
.
quantize
(
Decimal
(
'0.0'
))))
for
i
in
range
(
len
(
chi_ctr_precise_old_recently
))]
# print(temp1)
chi_ctr_precise_old_yesterday
=
chi_DATA_yesterday
(
"clk_count_newUser_all_a"
,
"clk_count_newUser_all_b"
,
"imp_count_newUser_all_precise"
,
"on_click_diary_card"
,
yesterday
)
temp2_new
=
[
float
(
chi_ctr_precise_old_yesterday
[
i
])
for
i
in
range
(
len
(
chi_ctr_precise_old_yesterday
))]
# print(temp2)
tst_new
=
data_cal
(
temp1_new
,
temp2_new
)
chi_cal
(
tst_new
)
# print(chi_ctr_precise_recently)
# print(chi_ctr_precise_recently)
...
...
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