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
4791a5e8
Commit
4791a5e8
authored
Apr 18, 2019
by
linfang.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xgb boost done
parent
37c70174
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
filetool.py
data/analyis/filetool.py
+2
-2
drawplot.py
data/graph/drawplot.py
+3
-2
No files found.
data/analyis/filetool.py
View file @
4791a5e8
...
@@ -11,8 +11,8 @@ def buildDocument(path,filename):
...
@@ -11,8 +11,8 @@ def buildDocument(path,filename):
return
Document
()
return
Document
()
def
saveDocument
(
document
,
path
,
filename
):
def
saveDocument
(
document
,
path
,
filename
):
if
str
.
rfind
(
filename
,
0
,
3
)
!=
'doc'
:
if
filename
[
-
3
:]
!=
'doc'
:
if
str
.
rfind
(
filename
,
0
,
4
)
!=
'docx'
:
if
filename
[
-
4
:]
!=
'docx'
:
raise
ValueError
(
'{} is not a word file'
.
format
(
filename
))
raise
ValueError
(
'{} is not a word file'
.
format
(
filename
))
return
document
.
save
(
os
.
path
.
join
(
path
,
filename
))
return
document
.
save
(
os
.
path
.
join
(
path
,
filename
))
...
...
data/graph/drawplot.py
View file @
4791a5e8
...
@@ -101,7 +101,8 @@ def draw_barplot(df,x,y,hue='',title=''):
...
@@ -101,7 +101,8 @@ def draw_barplot(df,x,y,hue='',title=''):
pltz
=
PyplotZ
()
pltz
=
PyplotZ
()
pltz
.
enable_chinese
()
pltz
.
enable_chinese
()
fig
=
plt
.
figure
()
fig
=
plt
.
figure
()
ax
=
fig
.
add_subplot
(
1
,
1
,
1
)
# ax = fig.add_subplot(1, 1, 1)
plt
.
cla
()
sns
.
set
(
style
=
"whitegrid"
)
sns
.
set
(
style
=
"whitegrid"
)
fig
=
plt
.
figure
(
figsize
=
(
6
,
4
))
fig
=
plt
.
figure
(
figsize
=
(
6
,
4
))
...
@@ -116,7 +117,7 @@ def draw_barplot(df,x,y,hue='',title=''):
...
@@ -116,7 +117,7 @@ def draw_barplot(df,x,y,hue='',title=''):
pltz
.
title
(
title
)
pltz
.
title
(
title
)
pltz
.
legend
()
pltz
.
legend
()
plt
.
grid
()
plt
.
grid
()
plt
.
show
()
#
plt.show()
return
fig
return
fig
...
...
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