Presentation is loading. Please wait.

Presentation is loading. Please wait.

Costs and Filters Dr. Avi Rosenfeld Department of Industrial Engineering Jerusalem College of Technology

Similar presentations


Presentation on theme: "Costs and Filters Dr. Avi Rosenfeld Department of Industrial Engineering Jerusalem College of Technology"— Presentation transcript:

1 Costs and Filters Dr. Avi Rosenfeld Department of Industrial Engineering Jerusalem College of Technology rosenfa@jct.ac.il

2 מושגים בהרצה  Minority Class Problem  Underfitting  Overfitting  Feature Selection Correlation Feature Selection Smote  Cost Based Learning Metacost rosenfa@jct.ac.il 2

3 Under-fitting / Over-fitting  Underfitting: דיוק גורע בתוך הTEST DATA בגלל שהמודל לא התאים לנתונים של הTRAINING. אולי אתה חייב יותר DATA במספר השורות (instances) אולי אתה חייב יותר DATA במספר העמודות (מאפיינים)  Overfitting: דיוק גרוע בתוך הTEST DATA בגלל שהמודל בתוך הTRAINING היה יותר מדי טוב (!) היכולת של המודל לנבא מה יקרה בDATA עתידי לא טוב! הTRAINING תפס דברים לא חשובים rosenfa@jct.ac.il 3

4 הבעיה הכללי Minority Class Problem  מה עושים אם המידע לא מאוזן  פתרון פשוט אבל לא הגיוני– תתעלם מה MINORITY  דוגמא: אם יש לך 99% מהאנשים בלי סרטן ו1% עם סרטן מה יהיה הדיוק של ZERO?  מה יהיה ה PRECISION וRECALL וכל קטגוריה?  האם זה קרוב יותר ל Underfitting או Overfitting? rosenfa@jct.ac.il 4

5 Quick Overview of Feature Selection http://www.cs.nott.ac.uk/~jqb/G54DMT http://www.cs.nott.ac.uk/~jqb/G54DMT Dr. Jaume Bacardit (now at Newcastle) jqb@cs.nott.ac.uk Topic 2: Data Preprocessing Lecture 3: Feature and prototype selection

6 פתרון אפשרי ל OVERFITTING Feature Selection  Transforming a dataset by removing some of its columns A1A2A3A4CA2A4C

7 Feature Selection  Great article: An Introduction to Variable and Feature Selection (Guyon and Elisseeff, 2003)  Three basic approaches: Filters, wrappers, and embedded methods  בשיעור שלנו נעשה פילטר וגם WRAPPER rosenfa@jct.ac.il 7 Dataset Filter Classification method

8 איך בוחרים מה להוריד?  ENTROPY / INFOGAIN מורידים אפיינים בלי INFOGAIN מעל סף מסויים  מורידים מאפיינים שקרובים אחד לשני אפשרות אחת: CFS (Correlation Feature Selection) "Good feature subsets contain features highly correlated with the classification, yet uncorrelated to each other“ רוצים מאפיינים שונים וגם טובים rosenfa@jct.ac.il 8

9 כדי לפתור את הMINORITY, אני צריך: Cost-Sensitive Learning  מוסיפים עלות לכל סוג של סיווג  בדרך כלל, אלגוריתמים לא מפרידים בין קטגוריות  אבל יש ה-ר-ב-ה יישומים שזה חשוב: אבחון סרטן אבחון סיכונים (התקפות מחשב, זיוף, וכו')

10 Class Imbalance vs. Asymmetric Misclassification costs  Class Imbalance: one class occurs much more often than the other  Asymmetric misclassification costs: the cost of misclassifying an example from one class is much larger than the cost of misclassifying an example from the other class.  לפי הניסיון שלי : שני המוסגים בדרך כלל באים ביחד  גם הפתרונות דומות  דוגמאות : תוריד שורות מה MAJORITY CLASS תוסיף שורות ל MINORITY CLASS תוסיף Filter ל DATA-- SMOTE תוסיף עלות ל MINORITY -- METACOST

11 איזה מצב יותר טוב??? PN P2010 N3090 Predicted Actual PN P02 N10 Confusion matrix 2 Cost matrix PN P1020 N15105 Predicted Actual Confusion matrix 1 FN FP Error rate: 40/150 Cost: 30x1+10x2=50 Error rate: 35/150 Cost: 15x1+20x2=55 FN

12 Making Classifier Balanced with Changing the Data (Filter)  Baseline Methods Random over-sampling Random under-sampling  Under-sampling Methods Tomek links Condensed Nearest Neighbor Rule One-sided selection CNN + Tomek links Neighborhood Cleaning Rule  Over-sampling Methods Smote  Combination of Over-sampling method with Under-sampling method Smote + Tomek links Smote + ENN

13 MetaCost  By wrapping a cost-minimizing procedure, “meta- learning” stage, around the classifier  תתייחס לסוג הלמידה כ " קופסה שחורה "  אפשר לשנות את ה COST ולהשפיע על התוצאות

14 דוגמא: מתי אנשים מפעילים CRUISE CONTROL

15 מתוך WEKA Metacost בלי תוספת עלות

16 מתוך WEKA Metacost עם עלות

17 הכנה לקראת התרגיל... rosenfa@jct.ac.il 17

18 AUC (Area under ROC) rosenfa@jct.ac.il 18

19 Lift: Note top Left rosenfa@jct.ac.il 19

20 Attribute Selection and Smote rosenfa@jct.ac.il 20

21 MetaCost rosenfa@jct.ac.il 21

22 בחירה בשיטת למידה וCOST rosenfa@jct.ac.il 22


Download ppt "Costs and Filters Dr. Avi Rosenfeld Department of Industrial Engineering Jerusalem College of Technology"

Similar presentations


Ads by Google