Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
model_monitoring_monthly
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_monitoring_monthly
Commits
52b89d68
Commit
52b89d68
authored
Jul 10, 2019
by
舒皓月
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加一个项目介绍 v0.0.1
parent
9a3d42b6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
119 additions
and
79 deletions
+119
-79
misc.xml
.idea/misc.xml
+1
-1
model_monitor.iml
.idea/model_monitor.iml
+1
-1
workspace.xml
.idea/workspace.xml
+65
-54
Monitor_VLM_riskanalysi.py
Monitor_risk_analysis/Monitor_VLM_riskanalysi.py
+7
-23
README.md
README.md
+45
-0
No files found.
.idea/misc.xml
View file @
52b89d68
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ProjectRootManager"
version=
"2"
project-jdk-name=
"Python 3.
6 (model_mvp
)"
project-jdk-type=
"Python SDK"
/>
<component
name=
"ProjectRootManager"
version=
"2"
project-jdk-name=
"Python 3.
7 (model_monitor
)"
project-jdk-type=
"Python SDK"
/>
<component
name=
"PyCharmProfessionalAdvertiser"
>
<option
name=
"shown"
value=
"true"
/>
</component>
...
...
.idea/model_monitor.iml
View file @
52b89d68
...
...
@@ -2,7 +2,7 @@
<module
type=
"PYTHON_MODULE"
version=
"4"
>
<component
name=
"NewModuleRootManager"
>
<content
url=
"file://$MODULE_DIR$"
/>
<orderEntry
type=
"
inheritedJdk
"
/>
<orderEntry
type=
"
jdk"
jdkName=
"Python 3.7 (model_monitor)"
jdkType=
"Python SDK
"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
</component>
<component
name=
"TestRunnerService"
>
...
...
.idea/workspace.xml
View file @
52b89d68
...
...
@@ -2,9 +2,10 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"1ecd0b9f-60aa-441d-b8e6-0ca91e7a02ef"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/misc.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/misc.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/model_monitor.iml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/model_monitor.iml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Monitor_risk_analysis/Monitor_VLM_riskanalysi.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Monitor_risk_analysis/Monitor_VLM_riskanalysi.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Monitor_risk_analysis/PSI&VAL_riskanalysis.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Monitor_risk_analysis/PSI&VAL_riskanalysis.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/query_score.xlsx"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/query_score.xlsx"
afterDir=
"false"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
...
@@ -13,42 +14,34 @@
<option
name=
"LAST_RESOLUTION"
value=
"IGNORE"
/>
</component>
<component
name=
"FileEditorManager"
>
<leaf>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/Monitor_risk_analysis/PSI&VAL_riskanalysis.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-2104"
>
<caret
line=
"103"
lean-forward=
"true"
selection-start-line=
"103"
selection-end-line=
"103"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/Monitor_mongoDB/psi_from_mongodb.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"238"
>
<caret
line=
"14"
column=
"33"
lean-forward=
"true"
selection-start-line=
"14"
selection-start-column=
"33"
selection-end-line=
"14"
selection-end-column=
"33"
/>
<folding>
<element
signature=
"e#50#79#0"
expanded=
"true"
/>
</folding>
<state
relative-caret-position=
"-12276"
>
<caret
line=
"103"
selection-start-line=
"103"
selection-end-line=
"103"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/Monitor_mongoDB/monitoring_VLM_mongodb.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"374"
>
<caret
line=
"23"
column=
"44"
lean-forward=
"true"
selection-start-line=
"23"
selection-start-column=
"44"
selection-end-line=
"23"
selection-end-column=
"44"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/Monitor_risk_analysis/Monitor_VLM_riskanalysi.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"136"
>
<caret
line=
"8"
column=
"17"
selection-start-line=
"8"
selection-start-column=
"17"
selection-end-line=
"8"
selection-end-column=
"17"
/>
<state
relative-caret-position=
"-577"
>
<caret
line=
"253"
column=
"37"
selection-start-line=
"253"
selection-start-column=
"28"
selection-end-line=
"253"
selection-end-column=
"37"
/>
<folding>
<element
signature=
"e#89#100#0"
expanded=
"true"
/>
<element
signature=
"e#898#1320#0"
/>
<element
signature=
"e#1328#1660#0"
/>
<element
signature=
"e#1767#2032#0"
/>
<element
signature=
"e#2717#5475#0"
/>
<element
signature=
"e#5515#5548#0"
/>
<element
signature=
"e#5748#5873#0"
/>
<element
signature=
"e#5907#6149#0"
/>
<element
signature=
"e#6208#6368#0"
/>
<element
signature=
"e#6405#8116#0"
/>
<element
signature=
"e#8283#9519#0"
/>
</folding>
</state>
</provider>
</entry>
...
...
@@ -59,6 +52,9 @@
<findStrings>
<find>
E:
</find>
<find>
E:\
</find>
<find>
query_sql
</find>
<find>
sql_channel
</find>
<find>
modelList
</find>
</findStrings>
</component>
<component
name=
"Git.Settings"
>
...
...
@@ -69,8 +65,8 @@
<list>
<option
value=
"$PROJECT_DIR$/Monitor_risk_analysis/PSI&VAL_riskanalysis.py"
/>
<option
value=
"$PROJECT_DIR$/Monitor_mongoDB/psi_from_mongodb.py"
/>
<option
value=
"$PROJECT_DIR$/Monitor_risk_analysis/Monitor_VLM_riskanalysi.py"
/>
<option
value=
"$PROJECT_DIR$/Monitor_mongoDB/monitoring_VLM_mongodb.py"
/>
<option
value=
"$PROJECT_DIR$/Monitor_risk_analysis/Monitor_VLM_riskanalysi.py"
/>
</list>
</option>
</component>
...
...
@@ -85,9 +81,9 @@
</option>
</component>
<component
name=
"ProjectFrameBounds"
extendedState=
"6"
>
<option
name=
"x"
value=
"31
2
"
/>
<option
name=
"y"
value=
"13
7
"
/>
<option
name=
"width"
value=
"122
8
"
/>
<option
name=
"x"
value=
"31
1
"
/>
<option
name=
"y"
value=
"13
6
"
/>
<option
name=
"width"
value=
"122
9
"
/>
<option
name=
"height"
value=
"675"
/>
</component>
<component
name=
"ProjectView"
>
...
...
@@ -121,7 +117,9 @@
</component>
<component
name=
"PropertiesComponent"
>
<property
name=
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES"
value=
"true"
/>
<property
name=
"SHARE_PROJECT_CONFIGURATION_FILES"
value=
"true"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$"
/>
<property
name=
"settings.editor.selected.configurable"
value=
"com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable"
/>
</component>
<component
name=
"RunDashboard"
>
<option
name=
"ruleStates"
>
...
...
@@ -149,16 +147,12 @@
<servers
/>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"-
8"
y=
"-8"
width=
"1936"
height=
"1066
"
extended-state=
"6"
/>
<frame
x=
"-
7"
y=
"-7"
width=
"1550"
height=
"838
"
extended-state=
"6"
/>
<editor
active=
"true"
/>
<layout>
<window_info
id=
"Favorites"
side_tool=
"true"
/>
<window_info
active=
"true"
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"true"
weight=
"0.1564805"
/>
<window_info
content_ui=
"combo"
id=
"Project"
order=
"0"
weight=
"0.15587847"
/>
<window_info
id=
"Structure"
order=
"1"
side_tool=
"true"
weight=
"0.25"
/>
<window_info
anchor=
"bottom"
id=
"Version Control"
/>
<window_info
anchor=
"bottom"
id=
"Python Console"
/>
<window_info
anchor=
"bottom"
id=
"Terminal"
/>
<window_info
anchor=
"bottom"
id=
"Event Log"
side_tool=
"true"
/>
<window_info
id=
"Favorites"
order=
"2"
side_tool=
"true"
/>
<window_info
anchor=
"bottom"
id=
"Message"
order=
"0"
/>
<window_info
anchor=
"bottom"
id=
"Find"
order=
"1"
/>
<window_info
anchor=
"bottom"
id=
"Run"
order=
"2"
/>
...
...
@@ -166,40 +160,57 @@
<window_info
anchor=
"bottom"
id=
"Cvs"
order=
"4"
weight=
"0.25"
/>
<window_info
anchor=
"bottom"
id=
"Inspection"
order=
"5"
weight=
"0.4"
/>
<window_info
anchor=
"bottom"
id=
"TODO"
order=
"6"
/>
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"7"
/>
<window_info
anchor=
"bottom"
id=
"Terminal"
order=
"8"
/>
<window_info
anchor=
"bottom"
id=
"Event Log"
order=
"9"
side_tool=
"true"
/>
<window_info
anchor=
"bottom"
id=
"Python Console"
order=
"10"
/>
<window_info
anchor=
"right"
id=
"Commander"
internal_type=
"SLIDING"
order=
"0"
type=
"SLIDING"
weight=
"0.4"
/>
<window_info
anchor=
"right"
id=
"Ant Build"
order=
"1"
weight=
"0.25"
/>
<window_info
anchor=
"right"
content_ui=
"combo"
id=
"Hierarchy"
order=
"2"
weight=
"0.25"
/>
</layout>
</component>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$PROJECT_DIR$/Monitor_
risk_analysis/PSI&VAL_riskanalysis
.py"
>
<entry
file=
"file://$PROJECT_DIR$/Monitor_
mongoDB/psi_from_mongodb
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-2104"
>
<caret
line=
"103"
lean-forward=
"true"
selection-start-line=
"103"
selection-end-line=
"103"
/>
<state
relative-caret-position=
"238"
>
<caret
line=
"14"
column=
"33"
selection-start-line=
"14"
selection-start-column=
"33"
selection-end-line=
"14"
selection-end-column=
"33"
/>
<folding>
<element
signature=
"e#50#79#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Monitor_
risk_analysis/Monitor_VLM_riskanalysi
.py"
>
<entry
file=
"file://$PROJECT_DIR$/Monitor_
mongoDB/monitoring_VLM_mongodb
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
136
"
>
<caret
line=
"
8"
column=
"17"
selection-start-line=
"8"
selection-start-column=
"17"
selection-end-line=
"8"
selection-end-column=
"17
"
/>
<state
relative-caret-position=
"
374
"
>
<caret
line=
"
23"
column=
"44"
selection-start-line=
"23"
selection-start-column=
"44"
selection-end-line=
"23"
selection-end-column=
"44
"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Monitor_
mongoDB/psi_from_mongodb
.py"
>
<entry
file=
"file://$PROJECT_DIR$/Monitor_
risk_analysis/PSI&VAL_riskanalysis
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"238"
>
<caret
line=
"14"
column=
"33"
lean-forward=
"true"
selection-start-line=
"14"
selection-start-column=
"33"
selection-end-line=
"14"
selection-end-column=
"33"
/>
<folding>
<element
signature=
"e#50#79#0"
expanded=
"true"
/>
</folding>
<state
relative-caret-position=
"-12276"
>
<caret
line=
"103"
selection-start-line=
"103"
selection-end-line=
"103"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Monitor_
mongoDB/monitoring_VLM_mongodb
.py"
>
<entry
file=
"file://$PROJECT_DIR$/Monitor_
risk_analysis/Monitor_VLM_riskanalysi
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"374"
>
<caret
line=
"23"
column=
"44"
lean-forward=
"true"
selection-start-line=
"23"
selection-start-column=
"44"
selection-end-line=
"23"
selection-end-column=
"44"
/>
<state
relative-caret-position=
"-577"
>
<caret
line=
"253"
column=
"37"
selection-start-line=
"253"
selection-start-column=
"28"
selection-end-line=
"253"
selection-end-column=
"37"
/>
<folding>
<element
signature=
"e#89#100#0"
expanded=
"true"
/>
<element
signature=
"e#898#1320#0"
/>
<element
signature=
"e#1328#1660#0"
/>
<element
signature=
"e#1767#2032#0"
/>
<element
signature=
"e#2717#5475#0"
/>
<element
signature=
"e#5515#5548#0"
/>
<element
signature=
"e#5748#5873#0"
/>
<element
signature=
"e#5907#6149#0"
/>
<element
signature=
"e#6208#6368#0"
/>
<element
signature=
"e#6405#8116#0"
/>
<element
signature=
"e#8283#9519#0"
/>
</folding>
</state>
</provider>
</entry>
...
...
Monitor_risk_analysis/Monitor_VLM_riskanalysi.py
View file @
52b89d68
...
...
@@ -47,12 +47,12 @@ AND applied = 1
'''
########################## DB Configuration #####################################
risk_analysis_config
=
{
'user'
:
'fengkong_read_only'
,
'password'
:
'mT2HFUgI'
,
'host'
:
'172.20.6.9'
,
'port'
:
9030
,
'database'
:
'risk_analysis'
,
'encoding'
:
'utf8'
}
risk_analysis_config
=
{
'user'
:
'fengkong_read_only'
,
'password'
:
'mT2HFUgI'
,
'host'
:
'172.20.6.9'
,
'port'
:
9030
,
'database'
:
'risk_analysis'
,
'encoding'
:
'utf8'
}
#################################################################################
pwd
=
os
.
getcwd
()
...
...
@@ -179,7 +179,7 @@ def dataManipul(df, keyword):
# df.dropna(axis=0).loc[:,keyword] = df.dropna(axis=0)[keyword].map(lambda x : np.nan if x < 0 else x )
df_count
=
df
[[
'applied_at'
,
keyword
]]
.
groupby
(
'applied_at'
)
.
count
()[
keyword
]
# need 2 recheck
df_count
=
df
[[
'applied_at'
,
keyword
]]
.
groupby
(
'applied_at'
)
[
keyword
]
.
count
()
# need 2 recheck
df_zeros
=
pd
.
Series
(
np
.
zeros
(
df_count
.
shape
),
index
=
df_count
.
index
)
df_missing
=
df
[
df
[
keyword
]
.
isnull
()]
.
fillna
(
0
)
.
groupby
(
'applied_at'
)[
keyword
]
.
count
()
...
...
@@ -341,19 +341,3 @@ for i in range(len(modelList)):
appliedType_index
+=
1
continue
appliedType_index
+=
1
README.md
0 → 100644
View file @
52b89d68
[
TOC
]
# 项目介绍
-
本项目主要用于风控模型监控.
-
运用统计绘图分析, 来检测入模特征, 客群变化, 模型性能.
-
基本流程:
数据库取数 --> 整合/处理数据 --> 绘图
-
主要统计图类别:
-
单变量分析图
-
PSI图
-
Lift Chart
# Univariant Chart
# PSI
# Lift Chart
# 贡献
-
王家华 (jiahua.wang@quantgroup.cn)
主要作者.
-
舒皓月 (haoyue.shu@quantgroup.cn)
维护者.
\ No newline at end of file
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