Skip to content

Commit

Permalink
main.py and README.md correction
Browse files Browse the repository at this point in the history
  • Loading branch information
danilyef committed Sep 3, 2024
1 parent acf023c commit 788df63
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 1 deletion.
22 changes: 22 additions & 0 deletions homework_4/pr4/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# PR4: Write code for transforming your dataset into a vector format, and utilize VectorDB for ingestion and querying.


# Cleanlab Discoveries

**Duplicate Issues**

- Cleanlab identified 6 duplicate issues in our dataset.
- All of them belong to category 4 or category 8.

**Label Issues**

- Cleanlab identified 4 label issues in our dataset.
- they all have score below 0.20 (which is quite low)
- Mislabeled emails belong to category 4 or category 2.
- Detailed analysis of label issues can be found in `label_issues_scores.csv` and `label_issues.csv`

**Outlier Issues**

- Cleanlab identified 1 outlier issue in our dataset.
- It belongs to category 1 and has a score lower than 0.20.
- Detailed analysis of outlier issues can be found in `outlier_issues_scores.csv` and `outlier_issues.csv`
7 changes: 7 additions & 0 deletions homework_4/pr4/duplicate_issues.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Original_Email,Original_Category,Duplicate_Email,Duplicate_Category
"Sehr geehrte Damen und Herren, ich möchte um die Kopie meines Vertrags bitten.",8,"Sehr geehrte Damen und Herren, ich möchte eine Kopie meines Vertrags anfordern.",8
"Guten Tag, ich möchte meinen Vertrag schnellstmöglich kündigen.",4,"Guten Tag, ich möchte den Vertrag so schnell wie möglich kündigen.",4
"Guten Tag, ich möchte meine Bestellung stornieren.",4,"Guten Tag, ich möchte meine Bestellung stornieren.",4
"Sehr geehrte Damen und Herren, ich möchte eine Kopie meines Vertrags anfordern.",8,"Sehr geehrte Damen und Herren, ich möchte um die Kopie meines Vertrags bitten.",8
"Guten Tag, ich möchte meine Bestellung stornieren.",4,"Guten Tag, ich möchte meine Bestellung stornieren.",4
"Guten Tag, ich möchte den Vertrag so schnell wie möglich kündigen.",4,"Guten Tag, ich möchte meinen Vertrag schnellstmöglich kündigen.",4
5 changes: 5 additions & 0 deletions homework_4/pr4/label_issues.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Email,Category
"Sehr geehrter Kundenservice, ich möchte mein Internet-Abo zum Monatsende kündigen.",4
"Ich habe den Service von Ihnen bereits gekündigt, aber ich erhalte weiterhin Rechnungen.",4
"Guten Tag, können Sie mir bitte die Zahlungseingangsbestätigung zusenden?",2
"Guten Tag, ich habe ein Problem mit der letzten Abbuchung.",2
5 changes: 5 additions & 0 deletions homework_4/pr4/label_issues_scores.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
is_label_issue,label_score,given_label,predicted_label
True,0.20127963476428865,4,6
True,0.1453738242128867,4,2
True,0.14309154875404048,2,5
True,0.09542877980390857,2,6
2 changes: 2 additions & 0 deletions homework_4/pr4/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ def main():
label_issues_idx = label_issues[label_issues["is_label_issue"] == True].index.to_numpy()
label_issues_df = df.iloc[label_issues_idx]
label_issues_df.to_csv('label_issues.csv', index=False)
label_issues[label_issues["is_label_issue"] == True].to_csv('label_issues_scores.csv', index=False)

outlier_issues = lab.get_issues("outlier")
outlier_issues_idx = outlier_issues[outlier_issues["is_outlier_issue"] == True].index.to_numpy()
outlier_issues_df = df.iloc[outlier_issues_idx]
outlier_issues_df.to_csv('outlier_issues.csv', index=False)
outlier_issues[outlier_issues["is_outlier_issue"] == True].to_csv('outlier_issues_scores.csv', index=False)


duplicate_issues = lab.get_issues("near_duplicate")
Expand Down
2 changes: 2 additions & 0 deletions homework_4/pr4/outlier_issues.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Email,Category
Ich habe Fragen zu Ihrer Geschäftslösung und wie wir sie in unserem Unternehmen einsetzen können.,1
2 changes: 2 additions & 0 deletions homework_4/pr4/outlier_issues_scores.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
is_outlier_issue,outlier_score
True,0.18030228
2 changes: 1 addition & 1 deletion homework_4/pr4/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cleanlab
cleanlab==2.6.6

0 comments on commit 788df63

Please sign in to comment.