File tree Expand file tree Collapse file tree 3 files changed +4
-33
lines changed
Expand file tree Collapse file tree 3 files changed +4
-33
lines changed Original file line number Diff line number Diff line change @@ -120,17 +120,17 @@ def evaluation(self):
120120 @staticmethod
121121 def calculate_accuray (grand_truth , predictions ):
122122 true_positives = 0
123- false_positives = 0
123+ true_negatives = 0
124124
125125 for true , pred in zip (grand_truth , predictions ):
126126 if (pred > 0.5 ) and (true == 1 ):
127127 true_positives += 1
128128 elif (pred < 0.5 ) and (true == 0 ):
129- false_positives += 1
129+ true_negatives += 1
130130 else :
131131 pass
132132
133- return (true_positives + false_positives ) / len (grand_truth )
133+ return (true_positives + true_negatives ) / len (grand_truth )
134134
135135if __name__ == "__main__" :
136136
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1111class Preprocessing :
1212
1313 def __init__ (self , args ):
14- self .data = 'data/tweets.csv'
14+ self .data = '../ data/tweets.csv'
1515 self .max_len = args .max_len
1616 self .max_words = args .max_words
1717 self .test_size = args .test_size
You can’t perform that action at this time.
0 commit comments