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
23e296c5
Commit
23e296c5
authored
Feb 19, 2019
by
王志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据指标波动假设检验统计
parent
f26a48d9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
hypothesis_test.py
eda/recommended_indexs/hypothesis_test.py
+17
-12
No files found.
eda/recommended_indexs/hypothesis_test.py
View file @
23e296c5
...
...
@@ -187,18 +187,6 @@ def data_cal(x,y):
y_a
=
[
y
[
0
],
y
[
1
]
-
y
[
0
]]
a_df
=
pd
.
DataFrame
({
'原'
:
x_a
,
'测'
:
y_a
})
return
a_df
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
)
temp1
=
[
float
(
str
(
Decimal
(
chi_ctr_precise_recently
[
i
])
.
quantize
(
Decimal
(
'0.0'
))))
for
i
in
range
(
len
(
chi_ctr_precise_recently
))]
# 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
)
temp2
=
[
float
(
chi_ctr_precise_yesterday
[
i
])
for
i
in
range
(
len
(
chi_ctr_precise_yesterday
))]
# print(temp2)
tst
=
data_cal
(
temp1
,
temp2
)
print
(
tst
)
# print(chi_ctr_precise_recently)
# print(chi_ctr_precise_yesterday)
def
chi_cal
(
data
):
data
[
'共计'
]
=
data
.
apply
(
lambda
x
:
x
.
sum
(),
axis
=
1
)
...
...
@@ -231,6 +219,23 @@ def chi_cal(data):
else
:
print
(
"数据波动较小,95
%
可能性属于正常波动范围"
)
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
)
temp1
=
[
float
(
str
(
Decimal
(
chi_ctr_precise_recently
[
i
])
.
quantize
(
Decimal
(
'0.0'
))))
for
i
in
range
(
len
(
chi_ctr_precise_recently
))]
# 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
)
temp2
=
[
float
(
chi_ctr_precise_yesterday
[
i
])
for
i
in
range
(
len
(
chi_ctr_precise_yesterday
))]
# print(temp2)
tst
=
data_cal
(
temp1
,
temp2
)
print
(
tst
)
chi_cal
(
tst
)
# print(chi_ctr_precise_recently)
# print(chi_ctr_precise_yesterday)
# chi_cvr_new=
# chi_cvr_old=
#
...
...
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