Grootste bijdrage (%):
LVEDV(MOD A2C) 6.78345076599
LVEDV(MOD BP) 6.68302073818
LVESV(MOD A2C) 6.09048502588
SV(MOD A2C) 6.03219066699
LVESV(MOD BP) 6.0074237466
MM/LVIDs 3.71322745138
LAAs(A2C) 3.64484067288
MM/LVIDd 3.62173487804
LAESV(MOD A2C) 3.40709766584
LVEDV(MOD A4C) 3.33654947276 Door de beschreven diagnostiek en de originele waardes toe te voegen kan een oordeel worden gevormd over de waarde van ons anomaly experiment.
Deze code is gebruikt voor het rapport:
import os
import xlrd
import numpy as np
import pickle
import pandas as pd
XLDir = "/Volumes/Slot 4 2tB/Ziekenhuis data"
Ldir = os.listdir(XLDir)
XLList = [s for s in Ldir if s[-4:] == ".xls"]
XLCount = len(XLList)
SelCol = ['SeriesInstanceUID','ExamComments', 'ExamDiagnosis', 'ParameterMeasure', 'ParameterId','ResultIdentifier','DisplayUnit', 'ParameterName', 'DisplayValue']
SelColn = [61, 73, 74, 107, 108, 110, 113, 114, 124]
contrib = np.load('/Volumes/Slot 4 2tB/Ziekenhuis data/contrib.npy')
stop = 0
for xl in XLList:
if stop >= 10: # Maximaal 10 outlier onderzoeken
break
book = xlrd.open_workbook(XLDir + '/' + xl, logfile=open(os.devnull, 'w'))
sh = book.sheet_by_index(0)
if sh.ncols >= 129 and sh.cell(0,129).value =='FindingId' and sh.cell(1,61).value in contrib[:,0]: # Alleen waar deze cel FindingId bevat!"
Data = []
stop += 1
for rx in range(sh.nrows): # Inlezen spreadsheet in Data
Data.append(sh.row_values(rx))
Data = np.array(Data) # Omzetten naar numpy array
Data = Data[:,SelColn] # Select only the 4 interesting columns
Data = Data[Data[:,5] == 'Average'] # Select only 'Avarage' values
DataPD = pd.DataFrame(Data, columns=SelCol)
print
print '************************************** Anomaly nr.: ', stop, DataPD.loc[1,'SeriesInstanceUID'], ' ***************************************'
print DataPD.loc[1,'ExamComments']
print DataPD.loc[1,'ExamDiagnosis']
p=contrib[contrib[:,0]==sh.cell(1,61).value]
print 'Grootste bijdrage (%):'
#print p[0,0].tolist()
p = p[0,1].tolist()
for i in range(10):
print "{0:20} {1}".format(p[0][i], p[1][i])
print DataPD.loc[:,['ParameterId', 'ParameterName', 'DisplayValue', 'DisplayUnit']]
p=contrib[contrib[:,0]==sh.cell(1,61).value]
Geen opmerkingen:
Een reactie posten