# Sepsis code review and QA ###### tags: `sepsis` > [time=Tue, Aug 29, 2022 11:15 AM] #### Manual test - [x] AutoDA in `README.md` - [x] python version (conda env ? or pyenv, virtualenv) - [x] `Flask`, `requests`, `torch` are not in `requirements.py`? - [x] confusion png table overlapped (`plt.figure()`, `plt.clf()`) - [x] Model name assert? - [x] `nn` mode ```KeyError: 'in_features'``` - [x] Model evaluation (false alarm rate calculation error? )$$ Original \ Miss \ Detection: 1 - recall = 1 - {{TP} \over {TP + FN}} = {FN \over {TP + FN}} $$ $$Miss \ Detection \ Rate(FNR): {FN \over P} = {FN \over {TP + FN}}$$ $$ Original \ False \ Alarm \ : 1 - precision = 1 - {{TP} \over {TP + FP}} = {{FP} \over {TP + FP}} $$ $$False \ Alarm \ Rate(FPR): {FP \over N} = {FP \over {TN + FP}} $$ --- - Confusion matrix: ``` [[45050, 4857] [ 183, 805]] [[tn, fp] [fn, tp]] False alarm: FP / (TN + FP) = 4857 / (45050 + 4857) = 0.097 (0.8578) ``` > [time=Tue, Aug 30, 2022 11:15 AM] #### Model Training - [x] Raw data input test with different types of data(`numeric`, `str`, `bool`, `list`, `dict`, `None`) in df (pass) - [x] Raw data input test with addtional col names (pass) - [x] `_join_tables` problems when `path_list_dict` is empty ``` path_list_dict = {} ``` - [x] Test operations on raw column names like `to upper`, `to lower`, `add space`, ...etc. ``` "ACcOu NtnO " -> "ACCOUNTNO" ``` #### Serving - [x] Serving test with additional col names (pass) - [x] Serving test with multiple data (pass) - [x] Serving test with different `json` types of data (`null`, `float`, `string`, `boolean`, `array`, `object`) ``` ValueError: could not convert string to float: 'blablabla' ``` - [ ] Servering post requests logging - [ ] Log rotate