Commit 52b89d68 authored by 舒皓月's avatar 舒皓月

添加一个项目介绍 v0.0.1

parent 9a3d42b6
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <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"> <component name="PyCharmProfessionalAdvertiser">
<option name="shown" value="true" /> <option name="shown" value="true" />
</component> </component>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<module type="PYTHON_MODULE" version="4"> <module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager"> <component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" /> <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" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>
<component name="TestRunnerService"> <component name="TestRunnerService">
......
...@@ -2,9 +2,10 @@ ...@@ -2,9 +2,10 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="1ecd0b9f-60aa-441d-b8e6-0ca91e7a02ef" name="Default Changelist" comment=""> <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/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&amp;VAL_riskanalysis.py" beforeDir="false" afterPath="$PROJECT_DIR$/Monitor_risk_analysis/PSI&amp;VAL_riskanalysis.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/query_score.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/query_score.xlsx" afterDir="false" />
</list> </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
...@@ -13,42 +14,34 @@ ...@@ -13,42 +14,34 @@
<option name="LAST_RESOLUTION" value="IGNORE" /> <option name="LAST_RESOLUTION" value="IGNORE" />
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Monitor_risk_analysis/PSI&amp;VAL_riskanalysis.py"> <entry file="file://$PROJECT_DIR$/Monitor_risk_analysis/PSI&amp;VAL_riskanalysis.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-2104"> <state relative-caret-position="-12276">
<caret line="103" lean-forward="true" selection-start-line="103" selection-end-line="103" /> <caret line="103" 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> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="true"> <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"> <entry file="file://$PROJECT_DIR$/Monitor_risk_analysis/Monitor_VLM_riskanalysi.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136"> <state relative-caret-position="-577">
<caret line="8" column="17" selection-start-line="8" selection-start-column="17" selection-end-line="8" selection-end-column="17" /> <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> </state>
</provider> </provider>
</entry> </entry>
...@@ -59,6 +52,9 @@ ...@@ -59,6 +52,9 @@
<findStrings> <findStrings>
<find>E:</find> <find>E:</find>
<find>E:\</find> <find>E:\</find>
<find>query_sql</find>
<find>sql_channel</find>
<find>modelList</find>
</findStrings> </findStrings>
</component> </component>
<component name="Git.Settings"> <component name="Git.Settings">
...@@ -69,8 +65,8 @@ ...@@ -69,8 +65,8 @@
<list> <list>
<option value="$PROJECT_DIR$/Monitor_risk_analysis/PSI&amp;VAL_riskanalysis.py" /> <option value="$PROJECT_DIR$/Monitor_risk_analysis/PSI&amp;VAL_riskanalysis.py" />
<option value="$PROJECT_DIR$/Monitor_mongoDB/psi_from_mongodb.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_mongoDB/monitoring_VLM_mongodb.py" />
<option value="$PROJECT_DIR$/Monitor_risk_analysis/Monitor_VLM_riskanalysi.py" />
</list> </list>
</option> </option>
</component> </component>
...@@ -85,9 +81,9 @@ ...@@ -85,9 +81,9 @@
</option> </option>
</component> </component>
<component name="ProjectFrameBounds" extendedState="6"> <component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="312" /> <option name="x" value="311" />
<option name="y" value="137" /> <option name="y" value="136" />
<option name="width" value="1228" /> <option name="width" value="1229" />
<option name="height" value="675" /> <option name="height" value="675" />
</component> </component>
<component name="ProjectView"> <component name="ProjectView">
...@@ -121,7 +117,9 @@ ...@@ -121,7 +117,9 @@
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
<property name="ASKED_SHARE_PROJECT_CONFIGURATION_FILES" value="true" /> <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="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
</component> </component>
<component name="RunDashboard"> <component name="RunDashboard">
<option name="ruleStates"> <option name="ruleStates">
...@@ -149,16 +147,12 @@ ...@@ -149,16 +147,12 @@
<servers /> <servers />
</component> </component>
<component name="ToolWindowManager"> <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" /> <editor active="true" />
<layout> <layout>
<window_info id="Favorites" side_tool="true" /> <window_info content_ui="combo" id="Project" order="0" weight="0.15587847" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.1564805" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" /> <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Version Control" /> <window_info id="Favorites" order="2" side_tool="true" />
<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 anchor="bottom" id="Message" order="0" /> <window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" /> <window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" /> <window_info anchor="bottom" id="Run" order="2" />
...@@ -166,40 +160,57 @@ ...@@ -166,40 +160,57 @@
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" /> <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="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" /> <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="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" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" /> <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
</layout> </layout>
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/Monitor_risk_analysis/PSI&amp;VAL_riskanalysis.py"> <entry file="file://$PROJECT_DIR$/Monitor_mongoDB/psi_from_mongodb.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-2104"> <state relative-caret-position="238">
<caret line="103" lean-forward="true" selection-start-line="103" selection-end-line="103" /> <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> </state>
</provider> </provider>
</entry> </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"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136"> <state relative-caret-position="374">
<caret line="8" column="17" selection-start-line="8" selection-start-column="17" selection-end-line="8" selection-end-column="17" /> <caret line="23" column="44" selection-start-line="23" selection-start-column="44" selection-end-line="23" selection-end-column="44" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/Monitor_mongoDB/psi_from_mongodb.py"> <entry file="file://$PROJECT_DIR$/Monitor_risk_analysis/PSI&amp;VAL_riskanalysis.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="238"> <state relative-caret-position="-12276">
<caret line="14" column="33" lean-forward="true" selection-start-line="14" selection-start-column="33" selection-end-line="14" selection-end-column="33" /> <caret line="103" selection-start-line="103" selection-end-line="103" />
<folding>
<element signature="e#50#79#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </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"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374"> <state relative-caret-position="-577">
<caret line="23" column="44" lean-forward="true" selection-start-line="23" selection-start-column="44" selection-end-line="23" selection-end-column="44" /> <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> </state>
</provider> </provider>
</entry> </entry>
......
...@@ -47,12 +47,12 @@ AND applied = 1 ...@@ -47,12 +47,12 @@ AND applied = 1
''' '''
########################## DB Configuration ##################################### ########################## DB Configuration #####################################
risk_analysis_config = {'user' : 'fengkong_read_only', risk_analysis_config = {'user': 'fengkong_read_only',
'password' : 'mT2HFUgI', 'password': 'mT2HFUgI',
'host' : '172.20.6.9', 'host': '172.20.6.9',
'port' : 9030, 'port': 9030,
'database' : 'risk_analysis', 'database': 'risk_analysis',
'encoding' : 'utf8'} 'encoding': 'utf8'}
################################################################################# #################################################################################
pwd = os.getcwd() pwd = os.getcwd()
...@@ -179,7 +179,7 @@ def dataManipul(df, keyword): ...@@ -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.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_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() df_missing = df[df[keyword].isnull()].fillna(0).groupby('applied_at')[keyword].count()
...@@ -341,19 +341,3 @@ for i in range(len(modelList)): ...@@ -341,19 +341,3 @@ for i in range(len(modelList)):
appliedType_index += 1 appliedType_index += 1
continue continue
appliedType_index += 1 appliedType_index += 1
[TOC]
# 项目介绍
- 本项目主要用于风控模型监控.
- 运用统计绘图分析, 来检测入模特征, 客群变化, 模型性能.
- 基本流程:
数据库取数 --> 整合/处理数据 --> 绘图
- 主要统计图类别:
- 单变量分析图
- PSI图
- Lift Chart
# Univariant Chart
# PSI
# Lift Chart
# 贡献
- 王家华 (jiahua.wang@quantgroup.cn)
主要作者.
- 舒皓月 (haoyue.shu@quantgroup.cn)
维护者.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment