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
ba959fdd
Commit
ba959fdd
authored
Jul 15, 2019
by
舒皓月
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nothing
parent
52b89d68
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
353 additions
and
258 deletions
+353
-258
workspace.xml
.idea/workspace.xml
+128
-81
psi_from_mongodb.py
Monitor_mongoDB/psi_from_mongodb.py
+1
-1
Monitor_VLM_riskanalysi.py
Monitor_risk_analysis/Monitor_VLM_riskanalysi.py
+11
-5
PSI&VAL_riskanalysis.py
Monitor_risk_analysis/PSI&VAL_riskanalysis.py
+192
-171
query_score.xlsx
query_score.xlsx
+0
-0
test.py
test.py
+21
-0
No files found.
.idea/workspace.xml
View file @
ba959fdd
This diff is collapsed.
Click to expand it.
Monitor_mongoDB/psi_from_mongodb.py
View file @
ba959fdd
...
...
@@ -13,7 +13,7 @@ import matplotlib.pyplot as plt
import
sklearn.metrics
# read mongodb mapping from excel
mapping_score
=
pd
.
read_excel
(
"./query_score.xlsx"
,
sheet_name
=
'score_mongo'
)
.
dropna
(
axis
=
0
)
mapping_score
=
pd
.
read_excel
(
".
.
/query_score.xlsx"
,
sheet_name
=
'score_mongo'
)
.
dropna
(
axis
=
0
)
#mapping_variable = pd.read_excel("./mongodb.xlsx",sheet_name='variable').dropna(axis=0)
limit
=
"{'wf_created_at': {'$gte': '@start_date', '$lt': '@end_date'}}"
...
...
Monitor_risk_analysis/Monitor_VLM_riskanalysi.py
View file @
ba959fdd
...
...
@@ -53,12 +53,18 @@ risk_analysis_config = {'user': 'fengkong_read_only',
'port'
:
9030
,
'database'
:
'risk_analysis'
,
'encoding'
:
'utf8'
}
# risk_analysis_config = {'user': 'haoyue_shu',
# 'password': '0SMd1rNQ',
# 'host': '172.20.6.10',
# 'port': 9030,
# 'database': 'risk_analysis',
# 'encoding': 'utf8'}
#################################################################################
pwd
=
os
.
getcwd
()
path
=
"
E:
\\
Python
\\
su Project
\\
plot
\\
VLM
\\
"
path_alarm
=
"
E:
\\
Python
\\
su Project
\\
plot
\\
VLM
\\
alarm
\\
"
path_sepatate
=
"
E:
\\
Python
\\
su Project
\\
plot
\\
separateByChannel
\\
"
path
=
"
../plot/VLM/
"
path_alarm
=
"
../plot/VLM/alarm/
"
path_sepatate
=
"
../plot/separateByChannel/
"
now
=
time
.
strftime
(
"
%
Y-
%
m-
%
d"
)
...
...
@@ -140,7 +146,7 @@ def readExcel(path, sheet=None):
# conn = connect2DB()
dict_keylist
=
[]
dict_vallist
=
[]
dict_DD
=
readExcel
(
"
E:
\\
Python
\\
su Project
\\
features_DD
.xlsx"
)
dict_DD
=
readExcel
(
"
../features_risk_analysis
.xlsx"
)
modelList
=
[
model
for
model
in
dict_DD
.
keys
()]
...
...
@@ -169,7 +175,7 @@ def query_sql(sql, db_config=risk_analysis_config):
df
=
pd
.
read_sql
(
sql
,
conn
)
conn
.
close
()
return
df
except
Exception
as
e
:
except
:
return
0
...
...
Monitor_risk_analysis/PSI&VAL_riskanalysis.py
View file @
ba959fdd
This diff is collapsed.
Click to expand it.
query_score.xlsx
View file @
ba959fdd
No preview for this file type
test.py
0 → 100644
View file @
ba959fdd
class
Solution
:
def
__init__
(
self
):
pass
def
find_max_length
(
self
,
array
,
k
):
if
not
array
:
return
0
sum_subarray
=
array
[
0
]
left
,
right
=
0
,
1
max_length
=
0
while
right
<
len
(
array
):
if
sum_subarray
==
k
:
max_length
=
max
(
max_length
,
right
-
left
)
sum_subarray
+=
array
[
right
]
right
+=
1
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