Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
model_mvp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
decision-science
model_mvp
Commits
f2cef298
Commit
f2cef298
authored
Apr 19, 2019
by
linfang.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加入测试数据
parent
9763c9e6
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10005 additions
and
4 deletions
+10005
-4
drawplot.py
data/graph/drawplot.py
+2
-3
report.py
mvp/report.py
+2
-1
test.csv
mvp/test.csv
+10001
-0
No files found.
data/graph/drawplot.py
View file @
f2cef298
...
...
@@ -35,13 +35,13 @@ def liftchart(df,x,y,classes='',bin=10,title='',xlabel='',ylabel=''):
plt
.
subplot
(
2
,
1
,
1
)
draw_lineplot
(
df_out
,
'grid'
,
'mean'
,
hue
=
classes
,
title
=
title
,
xlabel
=
xlabel
,
ylabel
=
ylabel
)
plt
.
subplot
(
2
,
1
,
2
)
draw_lineplot
(
df_out
,
'grid'
,
'acm
EventRate
'
,
hue
=
classes
,
title
=
title
,
xlabel
=
xlabel
,
ylabel
=
ylabel
)
draw_lineplot
(
df_out
,
'grid'
,
'acm
Mean
'
,
hue
=
classes
,
title
=
title
,
xlabel
=
xlabel
,
ylabel
=
ylabel
)
else
:
df_out
=
datacal
.
cal_accume
(
df
,
x
,
y
,
bin
)
plt
.
subplot
(
2
,
1
,
1
)
draw_lineplot
(
df_out
,
'grid'
,
'mean'
,
title
=
title
,
xlabel
=
xlabel
,
ylabel
=
ylabel
)
plt
.
subplot
(
2
,
1
,
2
)
draw_lineplot
(
df_out
,
'grid'
,
'acm
EventRate
'
,
title
=
title
,
xlabel
=
xlabel
,
ylabel
=
ylabel
)
draw_lineplot
(
df_out
,
'grid'
,
'acm
Mean
'
,
title
=
title
,
xlabel
=
xlabel
,
ylabel
=
ylabel
)
plt
.
tight_layout
()
# plt.show()
return
plt
...
...
@@ -56,7 +56,6 @@ def univarchart(df,x,y,bin=10,classes='',title='',xlabel='',ylabel=''):
'''
plt
.
cla
()
plt
.
subplot
(
1
,
1
,
1
)
if
classes
!=
''
:
df_out
=
datacal
.
cal_univar
(
df
,
x
,
y
,
bin
,
classes
=
[
classes
])
draw_lineplot
(
df_out
,
'grid'
,
'mean'
,
hue
=
classes
,
title
=
title
,
xlabel
=
xlabel
,
ylabel
=
ylabel
)
...
...
mvp/report.py
View file @
f2cef298
...
...
@@ -49,4 +49,5 @@ if __name__ == '__main__':
label
=
'y'
df
=
pd
.
read_csv
(
'test.csv'
)
dftrain
,
dftest
=
datacal
.
split_train_val
(
df
,
trainsplit
=
'timeSeries'
,
trainsplitRatio
=
0.8
,
sort_col
=
'applied_at'
)
xgbreport
.
report
(
dftrain
,
dftest
,
features
,
label
,
''
,
'tmp.doc'
)
\ No newline at end of file
xgbreport
.
report
(
dftrain
,
dftest
,
features
,
label
,
''
,
'tmp.doc'
)
mvp/test.csv
0 → 100644
View file @
f2cef298
This diff is collapsed.
Click to expand it.
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