Skip to content

Commit

Permalink
Fix proportion correct calcualtion for showups
Browse files Browse the repository at this point in the history
  • Loading branch information
stewartboogert committed Mar 23, 2023
1 parent d949e2f commit 16c0782
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pyWitness/DataProcessed.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,15 @@ def calculateCAC(self) :
if self.lineupSize != 1 : # SHOWUP
cid = self.data_pivot.loc['targetPresent','suspectId']
else :
cid = self.data_pivot.loc['targetPresent', 'suspectId'] + self.data_pivot.loc['targetPresent', 'rejectId']

#cid = self.data_pivot.loc['targetPresent', 'suspectId'] + self.data_pivot.loc['targetPresent', 'rejectId']
cid = self.data_pivot.loc['targetPresent', 'suspectId'] + self.data_pivot.loc['targetAbsent', 'rejectId']
try :
if self.lineupSize != 1 : # SHOWUP
fid = self.data_pivot.loc['targetAbsent','suspectId']
else :
fid = self.data_pivot.loc['targetAbsent', 'suspectId'] + self.data_pivot.loc['targetAbsent', 'rejectId']
except KeyError :
# fid = self.data_pivot.loc['targetAbsent', 'suspectId'] + self.data_pivot.loc['targetAbsent', 'rejectId']
fid = self.data_pivot.loc['targetPresent', 'rejectId'] + self.data_pivot.loc['targetAbsent', 'suspectId']
except KeyError :
fid = self.data_pivot.loc['targetAbsent','fillerId']/self.lineupSize

cac = cid/(cid+fid)
Expand Down

0 comments on commit 16c0782

Please sign in to comment.