Skip to content

Commit

Permalink
rerun with weighted representation of unigrams to complete features list
Browse files Browse the repository at this point in the history
  • Loading branch information
gicraveiro committed Feb 5, 2022
1 parent dd6b378 commit 0d97939
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion AIclassifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def format_sentVector_to_SparseMatrix(vectors_list, dictionary):
counts = Counter(sent_vector)
for index, freq in counts.items():
if len(counts.items()) > 0:
sparse_vector[index] = 1 #freq/len(sent_vector) # DIFFERENT CONFIGURATION POSSIBILITIES # 1
sparse_vector[index] = freq/len(sent_vector) # 1 DIFFERENT CONFIGURATION POSSIBILITIES # 1
if (i == 0): # TO DO: OPTIMIZE, NO NEED TO CHECK THIS EVERY TURN
matrix_array = [sparse_vector]
else:
Expand Down
Binary file modified output/AI Classifier/1Label_confusion_matrix_NonNorm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified output/AI Classifier/1Label_confusion_matrix_NormTrue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions output/AI Classifier/1labelPredictionsStatsTest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ Performance measures - Unigram Dictionary - Adaboost

Test set:

Precision macro: 0.368
Precision Individually: [0.556 0. 0.551 0.4 0.333]
Recall macro: 0.302
Recall Individually: [0.357 0. 0.871 0.182 0.1 ]
F1 Score micro: 0.522
F1 Score macro: 0.303
F1 Score weighted: 0.467
F1 Score Individually: [0.435 0. 0.675 0.25 0.154]
Precision macro: 0.254
Precision Individually: [0.357 0. 0.59 0.125 0.2 ]
Recall macro: 0.258
Recall Individually: [0.357 0. 0.742 0.091 0.1 ]
F1 Score micro: 0.448
F1 Score macro: 0.251
F1 Score weighted: 0.416
F1 Score Individually: [0.357 0. 0.657 0.105 0.133]


0 comments on commit 0d97939

Please sign in to comment.