این صفحه شامل اصطلاحات واژه نامه متریک است. برای همه اصطلاحات واژه نامه، اینجا را کلیک کنید .
الف
دقت
تعداد پیشبینیهای طبقهبندی صحیح تقسیم بر تعداد کل پیشبینیها. یعنی:
به عنوان مثال، مدلی که 40 پیشبینی درست و 10 پیشبینی نادرست داشته باشد، دقتی برابر با:
طبقه بندی باینری نام های خاصی را برای دسته های مختلف پیش بینی های صحیح و پیش بینی های نادرست ارائه می دهد. بنابراین، فرمول دقت برای طبقه بندی باینری به شرح زیر است:
کجا:
- TP تعداد مثبت های واقعی (پیش بینی های صحیح) است.
- TN تعداد منفی های واقعی (پیش بینی های صحیح) است.
- FP تعداد مثبت کاذب (پیشبینیهای نادرست) است.
- FN تعداد منفی های کاذب (پیش بینی های نادرست) است.
مقایسه و مقایسه دقت با دقت و یادآوری .
برای اطلاعات بیشتر به طبقه بندی: دقت، یادآوری، دقت و معیارهای مرتبط در دوره تصادف یادگیری ماشین مراجعه کنید.
ناحیه زیر منحنی PR
به PR AUC (منطقه زیر منحنی PR) مراجعه کنید.
ناحیه زیر منحنی ROC
AUC (مساحت زیر منحنی ROC) را ببینید.
AUC (مساحت زیر منحنی ROC)
عددی بین 0.0 و 1.0 نشان دهنده توانایی یک مدل طبقه بندی باینری برای جداسازی کلاس های مثبت از کلاس های منفی است. هر چه AUC به 1.0 نزدیکتر باشد، مدل توانایی بهتری برای جداسازی کلاس ها از یکدیگر دارد.
برای مثال، تصویر زیر یک مدل طبقهبندی را نشان میدهد که کلاسهای مثبت (بیضیهای سبز) را از کلاسهای منفی (مستطیلهای بنفش) کاملاً جدا میکند. این مدل غیرواقعی کامل دارای AUC 1.0 است:
برعکس، تصویر زیر نتایج یک مدل طبقهبندی را نشان میدهد که نتایج تصادفی ایجاد میکند. این مدل دارای AUC 0.5 است:
بله، مدل قبلی دارای AUC 0.5 است، نه 0.0.
اکثر مدل ها جایی بین دو حالت افراطی هستند. به عنوان مثال، مدل زیر موارد مثبت را تا حدودی از منفی جدا می کند و بنابراین دارای AUC بین 0.5 و 1.0 است:
AUC هر مقداری را که برای آستانه طبقه بندی تنظیم کرده اید نادیده می گیرد. در عوض، AUC تمام آستانه های طبقه بندی ممکن را در نظر می گیرد.
برای اطلاعات بیشتر به طبقه بندی: ROC و AUC در دوره تصادف یادگیری ماشینی مراجعه کنید.
دقت متوسط در k
معیاری برای خلاصه کردن عملکرد یک مدل در یک اعلان واحد که نتایج رتبهبندیشدهای را ایجاد میکند، مانند فهرست شمارهدار توصیههای کتاب. میانگین دقت در k ، خوب، میانگین دقت در مقادیر k برای هر نتیجه مرتبط است. بنابراین فرمول دقت متوسط در k به صورت زیر است:
\[{\text{average precision at k}} = \frac{1}{n} \sum_{i=1}^n {\text{precision at k for each relevant item} } \]
کجا:
- \(n\) تعداد موارد مرتبط در لیست است.
کنتراست با فراخوان در k .
ب
خط پایه
مدلی که به عنوان یک نقطه مرجع برای مقایسه عملکرد یک مدل دیگر (معمولاً پیچیده تر) استفاده می شود. به عنوان مثال، یک مدل رگرسیون لجستیک ممکن است به عنوان یک پایه خوب برای یک مدل عمیق عمل کند.
برای یک مشکل خاص، خط مبنا به توسعه دهندگان مدل کمک می کند تا حداقل عملکرد مورد انتظاری را که یک مدل جدید باید به آن دست پیدا کند تا مدل جدید مفید باشد، کمّی کنند.
سی
هزینه
مترادف باخت .
انصاف خلاف واقع
یک معیار انصاف که بررسی میکند آیا یک مدل طبقهبندی همان نتیجه را برای یک فرد ایجاد میکند که برای فرد دیگری که مشابه اولی است، مگر در رابطه با یک یا چند ویژگی حساس . ارزیابی یک مدل طبقهبندی برای انصاف خلاف واقع یکی از روشهای آشکارسازی منابع بالقوه سوگیری در یک مدل است.
برای اطلاعات بیشتر به یکی از موارد زیر مراجعه کنید:
- انصاف: انصاف متضاد در دوره تصادف یادگیری ماشین.
- وقتی دنیاها با هم برخورد می کنند: ادغام مفروضات مختلف خلاف واقع در انصاف
آنتروپی متقابل
تعمیم Log Loss به مسائل طبقه بندی چند طبقه . آنتروپی متقاطع تفاوت بین دو توزیع احتمال را کمیت می کند. حیرت را نیز ببینید.
تابع توزیع تجمعی (CDF)
تابعی که فرکانس نمونه ها را کمتر یا مساوی با مقدار هدف تعریف می کند. برای مثال، توزیع نرمال مقادیر پیوسته را در نظر بگیرید. یک CDF به شما می گوید که تقریباً 50٪ نمونه ها باید کمتر یا مساوی با میانگین باشند و تقریباً 84٪ نمونه ها باید کمتر یا مساوی یک انحراف استاندارد بالاتر از میانگین باشند.
D
برابری جمعیتی
یک معیار انصاف که اگر نتایج طبقهبندی یک مدل به یک ویژگی حساس معین وابسته نباشد، برآورده میشود.
به عنوان مثال، اگر هم لیلیپوتی ها و هم بروبدینگناگی ها برای دانشگاه گلابدابدریب درخواست دهند، برابری جمعیتی در صورتی حاصل می شود که درصد لیلیپوتیان پذیرفته شده با درصد بروبدینگناگیان پذیرفته شده یکسان باشد، صرف نظر از اینکه یک گروه به طور متوسط واجد شرایط تر از گروه دیگر باشد.
در مقایسه با شانس برابر و برابری فرصت ، که اجازه میدهد طبقهبندی نتایج مجموع به ویژگیهای حساس بستگی داشته باشد، اما اجازه نمیدهد نتایج طبقهبندی برای برخی برچسبهای حقیقت پایه مشخص شده به ویژگیهای حساس بستگی داشته باشد. برای تجسم کاوش در مبادلات هنگام بهینه سازی برابری جمعیتی، «حمله به تبعیض با یادگیری ماشینی هوشمندتر» را ببینید.
برای اطلاعات بیشتر به Fairness: برابری جمعیتی در دوره تصادف یادگیری ماشینی مراجعه کنید.
E
فاصله حرکت دهنده زمین (EMD)
اندازه گیری شباهت نسبی دو توزیع . هر چه فاصله زمین گردان کمتر باشد، توزیع ها مشابه تر است.
فاصله را ویرایش کنید
اندازه گیری شباهت دو رشته متنی به یکدیگر. در یادگیری ماشینی، ویرایش فاصله به دلایل زیر مفید است:
- محاسبه فاصله ویرایش آسان است.
- ویرایش فاصله میتواند دو رشته را که شبیه یکدیگر هستند مقایسه کند.
- فاصله ویرایش می تواند میزان شباهت رشته های مختلف به یک رشته معین را تعیین کند.
تعاریف متعددی از فاصله ویرایش وجود دارد که هر کدام از عملیات رشته های متفاوتی استفاده می کنند. برای مثال فاصله Levenshtein را ببینید.
تابع توزیع تجمعی تجربی (eCDF یا EDF)
یک تابع توزیع تجمعی بر اساس اندازهگیریهای تجربی از یک مجموعه داده واقعی. مقدار تابع در هر نقطه در امتداد محور x کسری از مشاهدات در مجموعه داده است که کمتر یا مساوی با مقدار مشخص شده است.
آنتروپی
در تئوری اطلاعات ، توصیفی از غیرقابل پیشبینی بودن توزیع احتمال است. متناوباً، آنتروپی نیز به این صورت تعریف میشود که هر مثال حاوی چه مقدار اطلاعات است. یک توزیع دارای بالاترین آنتروپی ممکن است زمانی که همه مقادیر یک متغیر تصادفی به یک اندازه محتمل باشند.
آنتروپی یک مجموعه با دو مقدار ممکن "0" و "1" (به عنوان مثال، برچسب ها در یک مسئله طبقه بندی باینری ) فرمول زیر را دارد:
H = -p log p - q log q = -p log p - (1-p) * log (1-p)
کجا:
- H آنتروپی است.
- p کسری از مثال های "1" است.
- q کسری از مثال های "0" است. توجه داشته باشید که q = (1 - p)
- log به طور کلی log 2 است. در این حالت واحد آنتروپی کمی است.
برای مثال موارد زیر را فرض کنید:
- 100 مثال حاوی مقدار "1" هستند
- 300 مثال حاوی مقدار "0" هستند
بنابراین، مقدار آنتروپی:
- p = 0.25
- q = 0.75
- H = (-0.25)log 2 (0.25) - (0.75)log 2 (0.75) = 0.81 بیت در هر مثال
مجموعه ای که کاملاً متعادل باشد (مثلاً 200 "0" و 200 "1") آنتروپی 1.0 بیت در هر مثال خواهد داشت. وقتی یک مجموعه نامتعادل تر می شود، آنتروپی آن به سمت 0.0 حرکت می کند.
در درختهای تصمیم ، آنتروپی به فرمولبندی به دست آوردن اطلاعات کمک میکند تا به تقسیمکننده کمک کند شرایط را در طول رشد درخت تصمیم طبقهبندی انتخاب کند.
مقایسه آنتروپی با:
- ناخالصی جینی
- تابع از دست دادن آنتروپی متقابل
آنتروپی اغلب آنتروپی شانون نامیده می شود.
برای اطلاعات بیشتر به Exact splitter برای طبقه بندی باینری با ویژگی های عددی در دوره Decision Forests مراجعه کنید.
برابری فرصت ها
یک معیار انصاف برای ارزیابی اینکه آیا یک مدل نتیجه مطلوب را برای همه مقادیر یک ویژگی حساس به خوبی پیشبینی میکند یا خیر. به عبارت دیگر، اگر نتیجه مطلوب برای یک مدل کلاس مثبت باشد، هدف این است که نرخ مثبت واقعی برای همه گروهها یکسان باشد.
برابری فرصت به شانس مساوی مربوط می شود، که مستلزم آن است که هم نرخ های مثبت واقعی و هم نرخ های مثبت کاذب برای همه گروه ها یکسان باشند.
فرض کنید دانشگاه گلابدابدریب هم لیلیپوت ها و هم بروبدینگناگی ها را در یک برنامه ریاضی دقیق پذیرفته است. مدارس متوسطه لیلیپوت ها برنامه درسی قوی از کلاس های ریاضی ارائه می دهند و اکثریت قریب به اتفاق دانش آموزان واجد شرایط برنامه دانشگاه هستند. مدارس متوسطه Brobdingnagians به هیچ وجه کلاس های ریاضی ارائه نمی دهند و در نتیجه دانش آموزان بسیار کمتری واجد شرایط هستند. اگر دانشآموزان واجد شرایط به همان اندازه بدون توجه به لیلیپوتی یا بروبدینگناگی، پذیرش شوند، برای برچسب ترجیحی «پذیرفتهشده» با توجه به ملیت (Lilliputian یا Brobdingnagian) رعایت میشود.
به عنوان مثال، فرض کنید 100 لیلیپوتی و 100 برابدینگ ناگی برای دانشگاه گلابدابدریب درخواست دهند و تصمیمات پذیرش به شرح زیر اتخاذ می شود:
جدول 1. متقاضیان لیلیپوت (90٪ واجد شرایط هستند)
واجد شرایط | فاقد صلاحیت | |
---|---|---|
پذیرفته شد | 45 | 3 |
رد شد | 45 | 7 |
مجموع | 90 | 10 |
درصد پذیرش دانشجویان واجد شرایط: 45/90 = 50% درصد رد دانش آموزان فاقد صلاحیت: 7/10 = 70% درصد کل دانشجویان لیلیپوتی پذیرفته شده: (45+3)/100 = 48% |
جدول 2. متقاضیان Brobdingnagian (10٪ واجد شرایط):
واجد شرایط | فاقد صلاحیت | |
---|---|---|
پذیرفته شد | 5 | 9 |
رد شد | 5 | 81 |
مجموع | 10 | 90 |
درصد پذیرش دانشجویان واجد شرایط: 5/10 = 50٪ درصد مردودی دانش آموزان فاقد صلاحیت: 90/81 = 90 درصد درصد کل دانشجویان بروبدینگناگیان پذیرفته شده: (5+9)/100 = 14% |
مثالهای قبلی برابری فرصتها را برای پذیرش دانشآموزان واجد شرایط برآورده میکنند، زیرا لیلیپوتهای واجد شرایط و برابدینگناگیان هر دو 50 درصد شانس پذیرش دارند.
در حالی که برابری فرصت برآورده می شود، دو معیار انصاف زیر راضی نمی شوند:
- برابری جمعیتی : لیلیپوت ها و برابدینگناگی ها با نرخ های متفاوتی در دانشگاه پذیرفته می شوند. 48 درصد از دانش آموزان لیلیپوتی پذیرش می شوند، اما تنها 14 درصد از دانش آموزان بروبدینگناگیان پذیرفته می شوند.
- شانس مساوی : در حالی که دانش آموزان لیلیپوتی و بروبدینگناگی واجد شرایط هر دو شانس یکسانی برای پذیرش دارند، محدودیت اضافی که لیلیپوت های فاقد صلاحیت و برابدینگناگیان هر دو شانس یکسانی برای رد شدن دارند برآورده نمی شود. لیلیپوت های فاقد صلاحیت 70 درصد نرخ رد دارند، در حالی که بروبدینگناگیان فاقد صلاحیت 90 درصد نرخ رد دارند.
برای کسب اطلاعات بیشتر، به Fairness: Equality of فرصت ها در دوره تصادف یادگیری ماشینی مراجعه کنید.
شانس مساوی
یک معیار انصاف برای ارزیابی اینکه آیا یک مدل نتایج را به خوبی برای همه مقادیر یک ویژگی حساس با توجه به کلاس مثبت و منفی - نه فقط یک طبقه یا کلاس دیگر - به طور یکسان پیشبینی میکند. به عبارت دیگر، هم نرخ مثبت واقعی و هم نرخ منفی کاذب باید برای همه گروه ها یکسان باشد.
شانس برابر شده مربوط به برابری فرصت است که فقط بر روی نرخ خطا برای یک کلاس واحد (مثبت یا منفی) تمرکز دارد.
به عنوان مثال، فرض کنید دانشگاه گلابدابدریب هم لیلیپوت ها و هم بروبدینگناگی ها را در یک برنامه ریاضی دقیق پذیرفته است. مدارس متوسطه لیلیپوت ها برنامه درسی قوی از کلاس های ریاضی ارائه می دهند و اکثریت قریب به اتفاق دانش آموزان واجد شرایط برنامه دانشگاه هستند. مدارس متوسطه Brobdingnagians به هیچ وجه کلاس های ریاضی ارائه نمی دهند و در نتیجه دانش آموزان بسیار کمتری واجد شرایط هستند. شانس مساوی شده به شرطی برآورده می شود که فارغ از اینکه متقاضی لیلیپوت باشد یا بروبدینگناگی، اگر واجد شرایط باشد، به همان اندازه احتمال دارد در برنامه پذیرفته شوند و اگر واجد شرایط نباشند، به همان اندازه احتمال رد شدن دارند.
فرض کنید 100 لیلیپوتی و 100 برابدینگ ناگی برای دانشگاه گلابدابدریب درخواست دهند و تصمیمات پذیرش به شرح زیر گرفته می شود:
جدول 3. متقاضیان لیلیپوت (90٪ واجد شرایط هستند)
واجد شرایط | فاقد صلاحیت | |
---|---|---|
پذیرفته شد | 45 | 2 |
رد شد | 45 | 8 |
مجموع | 90 | 10 |
درصد پذیرش دانشجویان واجد شرایط: 45/90 = 50% درصد رد دانش آموزان فاقد صلاحیت: 8/10 = 80% درصد کل دانشجویان لیلیپوتی پذیرفته شده: (45+2)/100 = 47% |
جدول 4. متقاضیان Brobdingnagian (10٪ واجد شرایط):
واجد شرایط | فاقد صلاحیت | |
---|---|---|
پذیرفته شد | 5 | 18 |
رد شد | 5 | 72 |
مجموع | 10 | 90 |
درصد پذیرش دانشجویان واجد شرایط: 5/10 = 50٪ درصد رد دانش آموزان فاقد صلاحیت: 72/90 = 80% درصد کل دانشجویان بروبدینگناگیان پذیرفته شده: (5+18)/100 = 23% |
شانس مساوی برآورده می شود زیرا دانش آموزان واجد شرایط لیلیپوتی و بروبدینگناگی هر دو 50 درصد شانس پذیرش دارند و لیلیپوتین و بروبدینگناگیان فاقد صلاحیت 80 درصد شانس رد شدن دارند.
شانس مساوی شده به طور رسمی در "برابری فرصت در یادگیری تحت نظارت" به این صورت تعریف می شود: "پیش بینی Ŷ شانس مساوی را با توجه به ویژگی محافظت شده A و نتیجه Y را برآورده می کند اگر Ŷ و A مستقل باشند، مشروط به Y."
ارزیابی می کند
در درجه اول به عنوان مخفف ارزیابی های LLM استفاده می شود. به طور گسترده تر، evals مخفف هر شکلی از ارزیابی است.
ارزیابی
فرآیند اندازه گیری کیفیت یک مدل یا مقایسه مدل های مختلف با یکدیگر.
برای ارزیابی یک مدل یادگیری ماشینی نظارت شده ، معمولاً آن را بر اساس یک مجموعه اعتبار سنجی و یک مجموعه آزمایش قضاوت می کنید. ارزیابی LLM معمولاً شامل ارزیابیهای کیفی و ایمنی گستردهتری است.
اف
F 1
یک متریک طبقهبندی باینری "تجمعی" که هم بر دقت و هم به یادآوری متکی است. این فرمول است:
متریک انصاف
یک تعریف ریاضی از «انصاف» که قابل اندازه گیری است. برخی از معیارهای عادلانه رایج عبارتند از:
بسیاری از معیارهای انصاف متقابل هستند. ناسازگاری معیارهای انصاف را ببینید.
منفی کاذب (FN)
مثالی که در آن مدل به اشتباه کلاس منفی را پیش بینی می کند. برای مثال، مدل پیشبینی میکند که یک پیام ایمیل خاص هرزنامه نیست (کلاس منفی)، اما آن پیام ایمیل در واقع هرزنامه است .
نرخ منفی کاذب
نسبت مثالهای مثبت واقعی که مدل به اشتباه کلاس منفی را پیشبینی کرده است. فرمول زیر نرخ منفی کاذب را محاسبه می کند:
برای اطلاعات بیشتر ، آستانهها و ماتریس سردرگمی را در دوره آموزشی تصادفی یادگیری ماشین ببینید.
مثبت کاذب (FP)
مثالی که در آن مدل به اشتباه کلاس مثبت را پیش بینی می کند. برای مثال، مدل پیشبینی میکند که یک پیام ایمیل خاص هرزنامه است (کلاس مثبت)، اما آن پیام ایمیل در واقع هرزنامه نیست .
برای اطلاعات بیشتر ، آستانهها و ماتریس سردرگمی را در دوره آموزشی تصادفی یادگیری ماشین ببینید.
نرخ مثبت کاذب (FPR)
نسبت مثالهای منفی واقعی که مدل به اشتباه کلاس مثبت را پیشبینی کرده است. فرمول زیر نرخ مثبت کاذب را محاسبه می کند:
نرخ مثبت کاذب، محور x در منحنی ROC است.
برای اطلاعات بیشتر به طبقه بندی: ROC و AUC در دوره تصادف یادگیری ماشینی مراجعه کنید.
اهمیت ویژگی ها
مترادف برای اهمیت متغیر .
کسری از موفقیت ها
معیاری برای ارزیابی متن تولید شده در مدل ML. کسری از موفقیت ها تعداد خروجی های متن تولید شده "موفق" تقسیم بر تعداد کل خروجی های متن تولید شده است. به عنوان مثال، اگر یک مدل زبان بزرگ 10 بلوک کد تولید کند که 5 بلوک آن موفق بوده است، کسری از موفقیت ها 50 درصد خواهد بود.
اگرچه کسری از موفقیت ها به طور گسترده در سراسر آمار مفید است، اما در ML، این معیار در درجه اول برای اندازه گیری وظایف قابل تأیید مانند تولید کد یا مسائل ریاضی مفید است.
جی
ناخالصی جینی
متریک مشابه آنتروپی . اسپلیترها از مقادیر به دست آمده از ناخالصی جینی یا آنتروپی برای ایجاد شرایط برای درختان تصمیم طبقه بندی استفاده می کنند. کسب اطلاعات از آنتروپی به دست می آید. هیچ اصطلاح معادل پذیرفته شده جهانی برای متریک مشتق شده از ناخالصی جینی وجود ندارد. با این حال، این معیار نامشخص به اندازه کسب اطلاعات مهم است.
به ناخالصی جینی شاخص جینی یا به سادگی جینی نیز گفته می شود.
اچ
از دست دادن لولا
خانوادهای از توابع ضرر برای طبقهبندی طراحی شدهاند تا مرز تصمیم را تا حد امکان از هر مثال آموزشی دور کنند، بنابراین حاشیه بین نمونهها و مرز را به حداکثر میرسانند. KSVM ها از افت لولا (یا یک تابع مرتبط مانند تلفات لولای مربع) استفاده می کنند. برای طبقه بندی باینری، تابع تلفات لولا به صورت زیر تعریف می شود:
که در آن y برچسب واقعی است، یا -1 یا +1، و y' خروجی خام مدل طبقه بندی است:
در نتیجه، نمودار افت لولا در مقابل (y * y') به صورت زیر است:
من
ناسازگاری معیارهای انصاف
این ایده که برخی از مفاهیم انصاف با یکدیگر ناسازگار هستند و نمیتوانند به طور همزمان ارضا شوند. در نتیجه، هیچ معیار جهانی واحدی برای تعیین کمیت انصاف وجود ندارد که بتوان برای همه مسائل ML اعمال کرد.
اگرچه این ممکن است دلسرد کننده به نظر برسد، اما ناسازگاری معیارهای انصاف به معنای بی نتیجه بودن تلاش های عادلانه نیست. در عوض، پیشنهاد می کند که انصاف باید به صورت متناوب برای یک مشکل ML معین، با هدف جلوگیری از آسیب های خاص در موارد استفاده از آن تعریف شود.
برای بحث دقیق تر در مورد ناسازگاری معیارهای انصاف، به «در مورد (عدم) امکان انصاف» مراجعه کنید.
انصاف فردی
یک معیار انصاف که بررسی می کند آیا افراد مشابه به طور مشابه طبقه بندی می شوند یا خیر. به عنوان مثال، آکادمی Brobdingnagian ممکن است بخواهد انصاف فردی را با اطمینان از اینکه دو دانش آموز با نمرات یکسان و نمرات آزمون استاندارد شده به طور مساوی احتمال پذیرش را دارند، ارضا کند.
توجه داشته باشید که انصاف فردی کاملاً به نحوه تعریف «شباهت» (در این مورد، نمرات و نمرات آزمون) بستگی دارد و اگر معیار تشابه شما اطلاعات مهمی (مانند سختگیری برنامه درسی دانش آموز) را از دست داد، می توانید خطر ایجاد مشکلات جدید انصاف را داشته باشید.
برای بحث دقیق تر در مورد انصاف فردی، به «انصاف از طریق آگاهی» مراجعه کنید.
کسب اطلاعات
در جنگلهای تصمیم ، تفاوت بین آنتروپی یک گره و مجموع وزنی (براساس تعداد مثال) از آنتروپی گرههای فرزند آن است. آنتروپی یک گره، آنتروپی نمونه های آن گره است.
به عنوان مثال، مقادیر آنتروپی زیر را در نظر بگیرید:
- آنتروپی گره والد = 0.6
- آنتروپی یک گره فرزند با 16 مثال مرتبط = 0.2
- آنتروپی یک گره فرزند دیگر با 24 مثال مرتبط = 0.1
بنابراین 40 درصد از نمونه ها در یک گره فرزند و 60 درصد در گره فرزند دیگر هستند. بنابراین:
- مجموع آنتروپی وزنی گره های فرزند = (0.4 * 0.2) + (0.6 * 0.1) = 0.14
بنابراین، به دست آوردن اطلاعات این است:
- افزایش اطلاعات = آنتروپی گره والد - مجموع وزنی آنتروپی گره های فرزند
- افزایش اطلاعات = 0.6 - 0.14 = 0.46
بیشتر اسپلیترها به دنبال ایجاد شرایطی هستند که کسب اطلاعات را به حداکثر برسانند.
توافق بین ارزیاب
اندازه گیری تعداد دفعات توافق ارزیابی کنندگان انسانی هنگام انجام یک کار. اگر ارزیابها موافق نباشند، دستورالعملهای کار ممکن است نیاز به بهبود داشته باشند. گاهی اوقات توافق بین حاشیهنویس یا قابلیت اطمینان بین ارزیابیکننده نیز نامیده میشود. همچنین کاپا کوهن را ببینید که یکی از محبوبترین اندازهگیریهای توافق بین ارزیابها است.
برای اطلاعات بیشتر به دادههای دستهبندی: مسائل رایج در دوره تصادف یادگیری ماشینی مراجعه کنید.
L
L 1 باخت
یک تابع ضرر که قدر مطلق تفاوت بین مقادیر واقعی برچسب و مقادیری را که یک مدل پیش بینی می کند محاسبه می کند. برای مثال، در اینجا محاسبه ضرر L 1 برای یک دسته از پنج مثال آمده است:
ارزش واقعی مثال | مقدار پیش بینی شده مدل | مقدار مطلق دلتا |
---|---|---|
7 | 6 | 1 |
5 | 4 | 1 |
8 | 11 | 3 |
4 | 6 | 2 |
9 | 8 | 1 |
8 = L 1 ضرر |
از دست دادن L 1 نسبت به L 2 حساسیت کمتری نسبت به موارد پرت دارد.
میانگین خطای مطلق میانگین تلفات L 1 در هر مثال است.
برای اطلاعات بیشتر به رگرسیون خطی: فقدان در دوره تصادف یادگیری ماشین مراجعه کنید.
L 2 باخت
یک تابع ضرر که مجذور تفاوت بین مقادیر واقعی برچسب و مقادیری را که یک مدل پیش بینی می کند محاسبه می کند. برای مثال، در اینجا محاسبه تلفات L 2 برای یک دسته از پنج مثال آمده است:
ارزش واقعی مثال | مقدار پیش بینی شده مدل | مربع دلتا |
---|---|---|
7 | 6 | 1 |
5 | 4 | 1 |
8 | 11 | 9 |
4 | 6 | 4 |
9 | 8 | 1 |
16 = L 2 ضرر |
با توجه به تربیع، از دست دادن L 2 تاثیر نقاط پرت را تقویت می کند. یعنی ضرر L 2 نسبت به ضرر L 1 به پیش بینی های بد واکنش قوی تری نشان می دهد. به عنوان مثال، ضرر L 1 برای دسته قبلی به جای 16، 8 خواهد بود. توجه داشته باشید که یک عدد پرت تنها 9 مورد از 16 مورد را به خود اختصاص می دهد.
مدلهای رگرسیون معمولاً از تلفات L 2 به عنوان تابع ضرر استفاده میکنند.
میانگین مربعات خطا میانگین تلفات L 2 در هر مثال است. ضرر مربعی نام دیگری برای ضرر L 2 است.
برای اطلاعات بیشتر به رگرسیون لجستیک: از دست دادن و منظمسازی در دوره تصادف یادگیری ماشین مراجعه کنید.
ارزیابی های LLM (ارزیابی)
مجموعهای از معیارها و معیارها برای ارزیابی عملکرد مدلهای زبان بزرگ (LLM). در سطح بالا، ارزیابی های LLM:
- به محققان کمک کنید مناطقی را که LLM نیاز به بهبود دارند شناسایی کنند.
- در مقایسه LLM های مختلف و شناسایی بهترین LLM برای یک کار خاص مفید هستند.
- کمک کنید تا مطمئن شوید که LLM ها برای استفاده ایمن و اخلاقی هستند.
برای اطلاعات بیشتر، مدلهای زبان بزرگ (LLM) را در دوره آموزشی تصادفی یادگیری ماشین ببینید.
از دست دادن
در طول آموزش یک مدل نظارت شده ، اندازه گیری از فاصله پیش بینی یک مدل با برچسب آن.
یک تابع ضرر زیان را محاسبه می کند.
برای اطلاعات بیشتر به رگرسیون خطی: فقدان در دوره تصادف یادگیری ماشین مراجعه کنید.
عملکرد از دست دادن
در حین آموزش یا آزمایش، یک تابع ریاضی است که زیان را در مجموعه ای از مثال ها محاسبه می کند. یک تابع ضرر برای مدل هایی که پیش بینی های خوبی انجام می دهند، ضرر کمتری نسبت به مدل هایی که پیش بینی های بد انجام می دهند، برمی گرداند.
هدف از آموزش معمولاً به حداقل رساندن ضرری است که یک تابع ضرر باز می گرداند.
بسیاری از انواع مختلف توابع از دست دادن وجود دارد. تابع ضرر مناسب را برای نوع مدلی که می سازید انتخاب کنید. به عنوان مثال:
- از دست دادن L 2 (یا میانگین مربعات خطا ) تابع ضرر برای رگرسیون خطی است.
- Log Loss تابع ضرر برای رگرسیون لجستیک است.
م
میانگین خطای مطلق (MAE)
میانگین تلفات در هر مثال زمانی که از دست دادن L 1 استفاده می شود. میانگین خطای مطلق را به صورت زیر محاسبه کنید:
- ضرر L 1 را برای یک دسته محاسبه کنید.
- ضرر L 1 را بر تعداد نمونه های دسته تقسیم کنید.
برای مثال، محاسبه تلفات L 1 را در دسته ای از پنج مثال زیر در نظر بگیرید:
ارزش واقعی مثال | مقدار پیش بینی شده مدل | ضرر (تفاوت بین واقعی و پیش بینی شده) |
---|---|---|
7 | 6 | 1 |
5 | 4 | 1 |
8 | 11 | 3 |
4 | 6 | 2 |
9 | 8 | 1 |
8 = L 1 ضرر |
بنابراین، ضرر L 1 8 و تعداد مثال ها 5 است. بنابراین، میانگین خطای مطلق برابر است با:
Mean Absolute Error = L1 loss / Number of Examples Mean Absolute Error = 8/5 = 1.6
کنتراست میانگین خطای مطلق با میانگین مربعات خطا و ریشه میانگین خطای مربع .
میانگین دقت متوسط در k (mAP@k)
میانگین آماری تمام میانگین دقت در نمره های k در یک مجموعه داده اعتبار سنجی. یکی از کاربردهای میانگین دقت در k قضاوت در مورد کیفیت توصیه های تولید شده توسط یک سیستم توصیه می باشد.
اگرچه عبارت "میانگین متوسط" اضافی به نظر می رسد، نام متریک مناسب است. از این گذشته، این متریک میانگین دقت میانگین چندگانه را در مقادیر k پیدا می کند.
میانگین مربعات خطا (MSE)
میانگین تلفات در هر مثال زمانی که از اتلاف L 2 استفاده می شود. میانگین مربعات خطا را به صورت زیر محاسبه کنید:
- تلفات L 2 را برای یک دسته محاسبه کنید.
- ضرر L 2 را بر تعداد نمونه های دسته تقسیم کنید.
به عنوان مثال، ضرر را در دسته پنج مثال زیر در نظر بگیرید:
ارزش واقعی | پیش بینی مدل | از دست دادن | باخت مربعی |
---|---|---|---|
7 | 6 | 1 | 1 |
5 | 4 | 1 | 1 |
8 | 11 | 3 | 9 |
4 | 6 | 2 | 4 |
9 | 8 | 1 | 1 |
16 = L 2 ضرر |
بنابراین، میانگین مربعات خطای زیر است:
Mean Squared Error = L2 loss / Number of Examples Mean Squared Error = 16/5 = 3.2
میانگین مربعات خطا یک بهینه ساز آموزشی محبوب است، به ویژه برای رگرسیون خطی .
تقابل میانگین مربعات خطا با میانگین خطای مطلق و ریشه میانگین مربعات خطا .
TensorFlow Playground از میانگین مربعات خطا برای محاسبه مقادیر تلفات استفاده می کند.
متریک
آماری که شما به آن اهمیت می دهید.
هدف معیاری است که یک سیستم یادگیری ماشینی سعی در بهینه سازی آن دارد.
Metrics API (tf.metrics)
API TensorFlow برای ارزیابی مدل ها. برای مثال، tf.metrics.accuracy
تعیین میکند که پیشبینیهای یک مدل چقدر با برچسبها مطابقت دارند.
حداقل ضرر
یک تابع ضرر برای شبکه های متخاصم مولد ، بر اساس آنتروپی متقابل بین توزیع داده های تولید شده و داده های واقعی.
حداقل تلفات در مقاله اول برای توصیف شبکه های متخاصم مولد استفاده شده است.
برای اطلاعات بیشتر به توابع ضرر در دوره شبکه های متخاصم مولد مراجعه کنید.
ظرفیت مدل
پیچیدگی مسائلی که یک مدل می تواند یاد بگیرد. هرچه مشکلاتی که یک مدل می تواند آموخته باشد پیچیده تر ، ظرفیت مدل بالاتر می رود. ظرفیت یک مدل به طور معمول با تعداد پارامترهای مدل افزایش می یابد. برای تعریف رسمی از ظرفیت مدل طبقه بندی ، به Dimension VC مراجعه کنید.
ن
طبقه منفی
در طبقه بندی باینری ، یک کلاس مثبت خوانده می شود و دیگری منفی نامیده می شود. کلاس مثبت چیز یا رویدادی است که مدل در حال آزمایش است و کلاس منفی احتمال دیگر است. به عنوان مثال:
- کلاس منفی در یک آزمایش پزشکی ممکن است "تومور" نباشد.
- کلاس منفی در یک مدل طبقه بندی ایمیل ممکن است "اسپم" نباشد.
تضاد با کلاس مثبت .
O
هدف
متریک که الگوریتم شما در تلاش برای بهینه سازی است.
تابع هدف
فرمول ریاضی یا متریک که یک مدل هدف بهینه سازی آن است. به عنوان مثال ، عملکرد هدف برای رگرسیون خطی معمولاً به معنای از دست دادن مربع است. بنابراین ، هنگام آموزش یک مدل رگرسیون خطی ، آموزش به حداقل رساندن میانگین از دست دادن مربع است.
در بعضی موارد ، هدف این است که عملکرد هدف را به حداکثر برسانیم . به عنوان مثال ، اگر عملکرد عینی دقت باشد ، هدف این است که حداکثر دقت را انجام دهیم.
همچنین ضرر را ببینید.
پ
پاس در K (پاس@k)
متریک برای تعیین کیفیت کد (به عنوان مثال ، پایتون) که یک مدل بزرگ زبان تولید می کند. به طور خاص ، پاس در K به شما این احتمال را می گوید که حداقل یک بلوک از کد تولید شده از بلوک های کد تولید شده از K ، تمام تست های واحد خود را پشت سر بگذارد.
مدل های بزرگ زبان اغلب برای تولید کد خوب برای مشکلات پیچیده برنامه نویسی تلاش می کنند. مهندسان نرم افزار با ترغیب مدل بزرگ زبان برای تولید چندین راه حل ( k ) برای همین مشکل با این مشکل سازگار می شوند. سپس ، مهندسان نرم افزار هر یک از راه حل ها را در برابر تست های واحد آزمایش می کنند. محاسبه پاس در K بستگی به نتیجه تست های واحد دارد:
- اگر یک یا چند مورد از این راه حل ها از آزمون واحد عبور کنند ، LLM آن چالش تولید کد را پشت سر می گذارد .
- اگر هیچ یک از راه حل ها از آزمون واحد عبور کنند ، LLM آن چالش تولید کد را شکست نمی دهد .
فرمول پاس در K به شرح زیر است:
\[\text{pass at k} = \frac{\text{total number of passes}} {\text{total number of challenges}}\]
به طور کلی ، مقادیر بالاتر K در نمرات K پاس بالاتر ایجاد می کند. با این حال ، مقادیر بالاتر K به مدل زبان بزرگ و منابع آزمایش واحد نیاز دارد.
عملکرد
اصطلاح بیش از حد با معانی زیر:
- معنی استاندارد در مهندسی نرم افزار. یعنی: این قطعه نرم افزار چقدر سریع (یا کارآمد) اجرا می شود؟
- معنی در یادگیری ماشین. در اینجا ، عملکرد به سؤال زیر پاسخ می دهد: این مدل چقدر صحیح است؟ یعنی پیش بینی های مدل چقدر خوب است؟
واردات متغیر جابجایی
نوعی از اهمیت متغیر که افزایش خطای پیش بینی یک مدل را پس از جابجایی مقادیر ویژگی ارزیابی می کند. اهمیت متغیر جابجایی یک متریک مستقل از مدل است.
گیجی
یک اندازه گیری از چگونگی عملکرد یک مدل در انجام کار خود است. به عنوان مثال ، فرض کنید وظیفه شما خواندن چند حرف اول کلمه ای است که کاربر روی صفحه کلید تلفن تایپ می کند و لیستی از کلمات تکمیل احتمالی را ارائه می دهد. Perplexity ، P ، برای این کار تقریباً تعداد حدس هایی است که شما باید ارائه دهید تا لیست شما حاوی کلمه واقعی باشد که کاربر در تلاش است تایپ کند.
گیج کننده به آنتروپی متقاطع به شرح زیر است:
طبقه مثبت
کلاس که برای آن آزمایش می کنید.
به عنوان مثال ، کلاس مثبت در یک مدل سرطان ممکن است "تومور" باشد. کلاس مثبت در یک مدل طبقه بندی ایمیل ممکن است "هرزنامه" باشد.
تضاد با کلاس منفی .
PR AUC (منطقه زیر منحنی PR)
مساحت تحت منحنی ضبط دقیق درون یابی ، به دست آمده با نقاط توطئه (فراخوان ، دقت) برای مقادیر مختلف آستانه طبقه بندی .
دقت
متریک برای مدل های طبقه بندی که به سؤال زیر پاسخ می دهد:
وقتی مدل کلاس مثبت را پیش بینی کرد ، چه درصد از پیش بینی ها صحیح بوده است؟
این فرمول است:
کجا:
- مثبت مثبت به معنای مدل به درستی کلاس مثبت را پیش بینی کرده است.
- مثبت کاذب به معنای مدل به اشتباه کلاس مثبت را پیش بینی کرده است.
به عنوان مثال ، فرض کنید یک مدل 200 پیش بینی مثبت ایجاد کرده است. از این 200 پیش بینی مثبت:
- 150 مثبت مثبت بودند.
- 50 مثبت کاذب بودند.
در این مورد:
برای کسب اطلاعات بیشتر به طبقه بندی: دقت ، فراخوان ، دقت و معیارهای مرتبط در دوره تصادف یادگیری ماشین مراجعه کنید.
دقت در K (Precision@k)
متریک برای ارزیابی لیست موارد رتبه بندی شده (سفارش). دقت در K کسری از اولین موارد K را در آن لیست که "مرتبط" هستند مشخص می کند. یعنی:
\[\text{precision at k} = \frac{\text{relevant items in first k items of the list}} {\text{k}}\]
مقدار k باید کمتر یا مساوی با طول لیست برگشتی باشد. توجه داشته باشید که طول لیست برگشتی بخشی از محاسبه نیست.
ارتباط اغلب ذهنی است. حتی ارزیاب های انسانی متخصص نیز اغلب با این موارد مخالف هستند.
مقایسه کنید با:
منحنی فراخوان دقیق
منحنی دقت در مقابل فراخوان در آستانه های مختلف طبقه بندی .
تعصب پیش بینی
مقداری که نشان می دهد میانگین پیش بینی ها از میانگین برچسب های موجود در مجموعه داده فاصله دارند.
با اصطلاح تعصب در مدل های یادگیری ماشین یا با تعصب در اخلاق و انصاف اشتباه گرفته نشود.
برابری پیش بینی کننده
یک متریک انصاف که بررسی می کند که آیا برای یک طبقه بندی کننده معین ، نرخ دقیق برای زیر گروه های مورد نظر معادل است.
به عنوان مثال ، الگویی که پذیرش کالج را پیش بینی می کند ، اگر نرخ دقیق آن برای لیلیپوتیایی ها و BrobdingNagians یکسان باشد ، برابری پیش بینی برای ملیت را برآورده می کند.
برابری پیش بینی مدتی است که برابری نرخ پیش بینی نیز نامیده می شود.
برای بحث بیشتر در مورد برابری پیش بینی ، به "تعاریف انصاف توضیح داده شده" (بخش 3.2.1) مراجعه کنید.
برابری نرخ پیش بینی
نام دیگری برای برابری پیش بینی کننده .
تابع چگالی احتمال
تابعی که فرکانس نمونه های داده را دقیقاً یک مقدار خاص مشخص می کند. هنگامی که مقادیر مجموعه داده ها به صورت مداوم شماره شناور هستند ، مسابقات دقیق به ندرت اتفاق می افتد. با این حال ، ادغام یک تابع چگالی احتمال از مقدار x
به مقدار y
، فرکانس مورد انتظار نمونه های داده بین x
و y
را به همراه دارد.
به عنوان مثال ، یک توزیع عادی با میانگین 200 و انحراف استاندارد 30 را در نظر بگیرید. برای تعیین فرکانس مورد انتظار نمونه های داده های موجود در محدوده 211.4 تا 218.7 ، می توانید عملکرد چگالی احتمال را برای یک توزیع عادی از 211.4 تا 218.7 ادغام کنید.
آر
به یاد بیاور
متریک برای مدل های طبقه بندی که به سؤال زیر پاسخ می دهد:
وقتی حقیقت زمین طبقه مثبت بود ، مدل پیش بینی ها به درستی به عنوان کلاس مثبت شناخته شده است؟
این فرمول است:
\[\text{Recall} = \frac{\text{true positives}} {\text{true positives} + \text{false negatives}} \]
کجا:
- مثبت مثبت به معنای مدل به درستی کلاس مثبت را پیش بینی کرده است.
- منفی کاذب به این معنی است که مدل به اشتباه کلاس منفی را پیش بینی می کند.
به عنوان مثال ، فرض کنید مدل شما 200 پیش بینی را در مثالهایی انجام داده است که حقیقت زمین کلاس مثبت است. از این 200 پیش بینی:
- 180 مثبت مثبت بودند.
- 20 منفی دروغین بودند.
در این مورد:
\[\text{Recall} = \frac{\text{180}} {\text{180} + \text{20}} = 0.9 \]
برای کسب اطلاعات بیشتر به طبقه بندی: دقت ، فراخوان ، دقت و معیارهای مرتبط مراجعه کنید.
به یاد بیاورید در K (به یاد بیاورید@k)
متریک برای ارزیابی سیستم هایی که لیستی از موارد رتبه بندی شده (سفارش داده شده) را تولید می کنند. به یاد بیاورید در K کسری از موارد مربوطه را در اولین موارد K در آن لیست از تعداد کل موارد مربوطه برگشتی مشخص می کند.
\[\text{recall at k} = \frac{\text{relevant items in first k items of the list}} {\text{total number of relevant items in the list}}\]
تضاد با دقت در k .
منحنی ROC (مشخصه عملیاتی گیرنده)
نمودار از نرخ مثبت واقعی در مقابل نرخ مثبت کاذب برای آستانه طبقه بندی مختلف در طبقه بندی باینری.
شکل یک منحنی ROC توانایی یک مدل طبقه بندی باینری را برای جدا کردن کلاس های مثبت از کلاس های منفی نشان می دهد. به عنوان مثال فرض کنید که یک مدل طبقه بندی باینری کاملاً تمام کلاسهای منفی را از تمام کلاسهای مثبت جدا می کند:
منحنی ROC برای مدل قبلی به شرح زیر است:
در مقابل ، تصویر زیر مقادیر رگرسیون لجستیک خام را برای یک مدل وحشتناک که نمی تواند کلاس های منفی را از کلاس های مثبت جدا کند ، نمودار می کند:
منحنی ROC برای این مدل به شرح زیر است:
در همین حال ، در دنیای واقعی ، بیشتر مدلهای طبقه بندی باینری کلاسهای مثبت و منفی را تا حدی جدا می کنند ، اما معمولاً کاملاً مناسب نیستند. بنابراین ، یک منحنی ROC معمولی در جایی بین دو افراط قرار می گیرد:
نقطه در منحنی ROC نزدیک به (0.0،1.0) از لحاظ نظری آستانه طبقه بندی ایده آل را مشخص می کند. با این حال ، چندین موضوع دیگر در دنیای واقعی بر انتخاب آستانه طبقه بندی ایده آل تأثیر می گذارد. به عنوان مثال ، شاید منفی های دروغین باعث درد بسیار بیشتری نسبت به مثبت کاذب شوند.
یک متریک عددی به نام AUC منحنی ROC را به یک مقدار نقطه شناور واحد خلاصه می کند.
ریشه میانگین مربعات خطا (RMSE)
ریشه مربع خطای میانگین مربع .
ROUGE (مطالعه فراخوان یادآوری گرا برای ارزیابی Gisting)
خانواده ای از معیارهایی که خلاصه های خودکار و مدل های ترجمه ماشین را ارزیابی می کنند. معیارهای Rouge درجه ای را تعیین می کنند که یک متن مرجع با متن تولید شده از مدل ML همپوشانی دارد. هر یک از اعضای خانواده روژ به روشی متفاوت همپوشانی دارند. نمرات بالاتر ROUGE شباهت بیشتری بین متن مرجع و متن تولید شده نسبت به نمرات Rouge پایین تر نشان می دهد.
هر یک از اعضای خانواده Rouge به طور معمول معیارهای زیر را تولید می کنند:
- دقت
- به یاد بیاورید
- F 1
برای جزئیات و مثال ، به:
ROUGE-L
یکی از اعضای خانواده Rouge بر طول طولانی ترین عواقب مشترک در متن مرجع و متن تولید شده متمرکز شده است. فرمول های زیر فراخوان و دقت را برای Rouge-L محاسبه می کنند:
سپس می توانید از F 1 برای بالا بردن Rouge-L فراخوان و دقت Rouge-L در یک متریک واحد استفاده کنید:
Rouge-L هر خط جدید را در متن مرجع و متن تولید شده نادیده می گیرد ، بنابراین طولانی ترین دنباله مشترک می تواند از چندین جمله عبور کند. هنگامی که متن مرجع و متن تولید شده شامل چندین جمله است ، تنوع Rouge-L به نام Rouge-lsum به طور کلی یک معیار بهتر است. Rouge-LSUM طولانی ترین دنبال کننده مشترک برای هر جمله در یک متن را تعیین می کند و سپس میانگین آن طولانی ترین عواقب مشترک را محاسبه می کند.
ROUGE-N
مجموعه ای از معیارهای موجود در خانواده Rouge که N-Grams مشترک با اندازه خاص را در متن مرجع و متن تولید شده مقایسه می کند. به عنوان مثال:
- Rouge-1 تعداد نشانه های مشترک را در متن مرجع و متن تولید شده اندازه گیری می کند.
- Rouge-2 تعداد Bigrams مشترک (2 گرم) را در متن مرجع و متن تولید شده اندازه گیری می کند.
- Rouge-3 تعداد TRIGRAMS مشترک (3 گرم) را در متن مرجع و متن تولید شده اندازه گیری می کند.
می توانید از فرمول های زیر برای محاسبه فراخوان Rouge-N و دقت Rouge-N برای هر یک از اعضای خانواده Rouge-N استفاده کنید:
سپس می توانید از F 1 برای بالا بردن Rouge-N فراخوان و دقت Rouge-N در یک متریک واحد استفاده کنید:
Rouge-s
یک شکل بخشنده از Rouge-N که تطبیق Skip-Gram را امکان پذیر می کند. یعنی ، Rouge-N فقط N-Grams را که دقیقاً مطابقت دارند ، شمارش می کند ، اما Rouge-S همچنین N-Grams را که با یک یا چند کلمه از هم جدا شده اند ، شمارش می کند. برای مثال موارد زیر را در نظر بگیرید:
- متن مرجع : ابرهای سفید
- متن تولید شده : ابرهای سفید کننده سفید
هنگام محاسبه Rouge-N ، ابرهای سفید 2 گرم ، با ابرهای رنگ سفید مطابقت ندارند. با این حال ، هنگام محاسبه Rouge-S ، ابرهای سفید با ابرهای رنگ سفید مطابقت دارند.
R-squared
یک متریک رگرسیون که نشان می دهد میزان تغییر در یک برچسب به دلیل یک ویژگی فردی یا یک مجموعه ویژگی است. R-Squared یک مقدار بین 0 تا 1 است که می توانید به شرح زیر تفسیر کنید:
- R-Squared از 0 به این معنی است که هیچ یک از تغییرات برچسب به دلیل مجموعه ویژگی نیست.
- مربع R از 1 به این معنی است که همه تغییرات برچسب به دلیل مجموعه ویژگی است.
- مربع R بین 0 تا 1 نشان می دهد که میزان تغییر برچسب از یک ویژگی خاص یا مجموعه ویژگی ها قابل پیش بینی است. به عنوان مثال ، مربع R از 0.10 به این معنی است که 10 درصد از واریانس در برچسب به دلیل مجموعه ویژگی است ، یک R-Squared 0.20 به معنای این است که 20 درصد به دلیل تنظیم ویژگی و غیره است.
R-Squared مربع ضریب همبستگی پیرسون بین مقادیری است که یک مدل پیش بینی کرده و حقیقت زمینی است .
اس
به ثمر رساندن
بخشی از یک سیستم توصیه ای که برای هر مورد تولید شده توسط مرحله تولید نامزد ، ارزش یا رتبه بندی را ارائه می دهد.
اندازه گیری شباهت
در الگوریتم های خوشه بندی ، متریک برای تعیین چگونگی یکسان (چقدر مشابه) هر دو نمونه استفاده می شود.
پراکندگی
تعداد عناصر تعیین شده روی صفر (یا تهی) در یک بردار یا ماتریس تقسیم بر تعداد کل ورودی های آن بردار یا ماتریس. به عنوان مثال ، یک ماتریس 100 عنصر را در نظر بگیرید که در آن 98 سلول حاوی صفر هستند. محاسبه کمبود به شرح زیر است:
مشخصات مشخصات به کمبود یک بردار ویژگی اشاره دارد. پراکندگی مدل به کمبود وزن مدل اشاره دارد.
از دست دادن لولا مربع
مربع از دست دادن لولا . از دست دادن لولای مربع مجازات های سخت تر از دست دادن لولای معمولی را مجازات می کند.
از دست دادن مربع
مترادف برای از دست دادن L 2 .
تی
از دست دادن
یک متریک که از دست دادن یک مدل در برابر مجموعه آزمون است. هنگام ساختن یک مدل ، معمولاً سعی می کنید از دست دادن آزمایش به حداقل برسید. دلیل این امر این است که از دست دادن کم تست یک سیگنال با کیفیت قوی تر از ضرر کم آموزش یا از دست دادن اعتبار سنجی کم است.
فاصله زیادی بین از دست دادن آزمون و از دست دادن آموزش یا از دست دادن اعتبار سنجی گاهی اوقات نشان می دهد که شما نیاز به افزایش نرخ منظم دارید.
دقت
درصد زمانهایی که "برچسب هدف" در اولین موقعیت K لیست های تولید شده ظاهر می شود. لیست ها می توانند توصیه های شخصی یا لیستی از موارد سفارش داده شده توسط SoftMax باشند.
دقت بالا K نیز به عنوان دقت در K شناخته می شود.
سمیت
میزان سوءاستفاده ، تهدیدآمیز یا توهین آمیز است. بسیاری از مدل های یادگیری ماشین می توانند سمیت را شناسایی و اندازه گیری کنند. بسیاری از این مدل ها سمیت را در طول پارامترهای متعدد ، مانند سطح زبان سوءاستفاده و سطح زبان تهدیدآمیز مشخص می کنند.
از دست دادن آموزش
یک متریک نشان دهنده ضرر یک مدل در طی یک تکرار آموزش خاص است. به عنوان مثال ، فرض کنید عملکرد از دست دادن به معنای خطای مربع است. شاید از دست دادن آموزش (میانگین خطای مربع) برای تکرار 10 2.2 باشد و از دست دادن تمرین برای 100 تکرار 1.9 است.
یک منحنی ضرر از دست دادن آموزش در مقابل تعداد تکرارها را ترسیم می کند. منحنی ضرر نکات زیر را در مورد آموزش ارائه می دهد:
- یک شیب رو به پایین دلالت بر این دارد که مدل در حال بهبود است.
- یک شیب رو به بالا دلالت بر این دارد که مدل بدتر می شود.
- یک شیب مسطح دلالت بر این دارد که این مدل به همگرایی رسیده است.
به عنوان مثال ، منحنی از دست دادن تا حدودی ایده آل نشان می دهد:
- شیب شیب دار به سمت پایین در طول تکرار اولیه ، که دلالت بر بهبود سریع مدل دارد.
- یک شیب به تدریج مسطح (اما هنوز هم پایین) تا پایان آموزش ، که حاکی از بهبود مدل با سرعت کمی کندتر و سپس در طول تکرار اولیه است.
- شیب مسطح به سمت پایان آموزش ، که نشان دهنده همگرایی است.
اگرچه از دست دادن آموزش مهم است ، اما به تعمیم نیز مراجعه کنید.
منفی واقعی (TN)
نمونه ای که در آن مدل به درستی کلاس منفی را پیش بینی می کند. به عنوان مثال ، این مدل نشان می دهد که یک پیام ایمیل خاص هرزنامه نیست و پیام ایمیل واقعاً هرزنامه نیست .
مثبت واقعی (TP)
نمونه ای که در آن مدل به درستی کلاس مثبت را پیش بینی می کند. به عنوان مثال ، این مدل نشان می دهد که یک پیام ایمیل خاص هرزنامه است و پیام ایمیل واقعاً هرزنامه است.
نرخ مثبت واقعی (TPR)
مترادف برای فراخوان . یعنی:
نرخ مثبت واقعی محور y در یک منحنی ROC است.
V
از دست دادن اعتبار سنجی
یک متریک که از دست دادن یک مدل در اعتبار سنجی در طول تکرار خاص آموزش است.
همچنین به منحنی تعمیم مراجعه کنید.
واردات متغیر
مجموعه ای از نمرات که نشان دهنده اهمیت نسبی هر ویژگی برای مدل است.
به عنوان مثال ، یک درخت تصمیم را در نظر بگیرید که قیمت خانه را تخمین می زند. فرض کنید این درخت تصمیم از سه ویژگی استفاده می کند: اندازه ، سن و سبک. اگر مجموعه ای از واردات متغیر برای سه ویژگی محاسبه شود که اندازه = 5.8 ، سن = 2.5 ، سبک = 4.7} باشد ، اندازه آن برای درخت تصمیم گیری از سن یا سبک مهمتر است.
معیارهای مختلف اهمیت متغیر وجود دارد ، که می تواند متخصصان ML را در مورد جنبه های مختلف مدل ها آگاه کند.
دبلیو
از دست دادن Wasserstein
یکی از توابع ضرر که معمولاً در شبکه های مخالف تولیدی مورد استفاده قرار می گیرد ، بر اساس فاصله حرکت زمین بین توزیع داده های تولید شده و داده های واقعی.
،این صفحه شامل اصطلاحات واژه نامه معیارها است. برای همه شرایط واژه نامه ، اینجا را کلیک کنید .
الف
دقت
تعداد پیش بینی های طبقه بندی صحیح تقسیم بر تعداد کل پیش بینی ها. یعنی:
به عنوان مثال ، مدلی که 40 پیش بینی صحیح و 10 پیش بینی نادرست را انجام داده است ، دقت دارد:
طبقه بندی باینری نام های خاصی را برای دسته های مختلف پیش بینی های صحیح و پیش بینی های نادرست فراهم می کند. بنابراین ، فرمول دقت برای طبقه بندی باینری به شرح زیر است:
کجا:
- TP تعداد مثبت واقعی (پیش بینی های صحیح) است.
- TN تعداد منفی های واقعی (پیش بینی های صحیح) است.
- FP تعداد مثبت کاذب (پیش بینی های نادرست) است.
- FN تعداد منفی های کاذب (پیش بینی های نادرست) است.
دقت و کنتراست را با دقت و فراخوان مقایسه کنید.
برای کسب اطلاعات بیشتر به طبقه بندی: دقت ، فراخوان ، دقت و معیارهای مرتبط در دوره تصادف یادگیری ماشین مراجعه کنید.
منطقه زیر منحنی روابط عمومی
به PR AUC (منطقه زیر منحنی PR) مراجعه کنید.
ناحیه زیر منحنی ROC
به AUC (منطقه زیر منحنی ROC) مراجعه کنید.
AUC (منطقه زیر منحنی ROC)
تعدادی بین 0.0 تا 1.0 نشان دهنده توانایی یک مدل طبقه بندی باینری برای جدا کردن کلاس های مثبت از کلاس های منفی است. هرچه AUC به 1.0 نزدیکتر باشد ، توانایی مدل برای جدا کردن کلاس ها از یکدیگر بهتر می شود.
به عنوان مثال ، تصویر زیر یک مدل طبقه بندی را نشان می دهد که کلاس های مثبت (تخمدان های سبز) را از کلاس های منفی (مستطیل های بنفش) کاملاً جدا می کند. این مدل غیر واقعی کامل دارای AUC 1.0 است:
در مقابل ، تصویر زیر نتایج یک مدل طبقه بندی را نشان می دهد که نتایج تصادفی ایجاد می کند. این مدل دارای AUC 0.5 است:
بله ، مدل قبلی دارای AUC 0.5 است ، نه 0.0.
بیشتر مدل ها در جایی بین دو افراط قرار دارند. به عنوان مثال ، مدل زیر مثبت از منفی ها را تا حدودی از هم جدا می کند ، بنابراین AUC در جایی بین 0.5 تا 1.0 دارد:
AUC هر مقداری را که برای آستانه طبقه بندی تعیین کرده اید نادیده می گیرد. در عوض ، AUC تمام آستانه های طبقه بندی ممکن را در نظر می گیرد.
برای کسب اطلاعات بیشتر به طبقه بندی: ROC و AUC در دوره Crash Machine Learning مراجعه کنید.
دقت متوسط در k
یک متریک برای خلاصه کردن عملکرد یک مدل در یک فرایند واحد که نتایج رتبه بندی شده را ایجاد می کند ، مانند لیست شماره گذاری شده از توصیه های کتاب. میانگین دقت در K ، به خوبی ، میانگین دقت در مقادیر K برای هر نتیجه مربوطه است. فرمول برای دقت متوسط در k بنابراین:
\[{\text{average precision at k}} = \frac{1}{n} \sum_{i=1}^n {\text{precision at k for each relevant item} } \]
کجا:
- \(n\) تعداد موارد مربوطه در لیست است.
تضاد با فراخوان در k .
ب
خط پایه
مدلی که به عنوان یک نقطه مرجع برای مقایسه چگونگی عملکرد یک مدل دیگر (به طور معمول ، یک مدل پیچیده تر) استفاده می شود. به عنوان مثال ، یک مدل رگرسیون لجستیک ممکن است به عنوان یک پایه خوب برای یک مدل عمیق عمل کند.
برای یک مشکل خاص ، پایه به توسعه دهندگان مدل کمک می کند تا حداقل عملکرد مورد انتظار را که یک مدل جدید باید برای مدل جدید مفید باشد ، تعیین کند.
سی
هزینه
مترادف برای از دست دادن .
انصاف ضد خلاف
یک متریک انصاف که بررسی می کند که آیا یک مدل طبقه بندی نتیجه یکسان را برای یک فرد تولید می کند ، همانطور که برای فرد دیگری که با اولی یکسان است ، به جز با توجه به یک یا چند ویژگی حساس است. ارزیابی یک مدل طبقه بندی برای انصاف ضد عملی ، یکی از روشهای برای گسترش منابع بالقوه تعصب در یک مدل است.
برای اطلاعات بیشتر به هر یک از موارد زیر مراجعه کنید:
- انصاف: انصاف ضد خلاف در دوره تصادف یادگیری ماشین.
- هنگامی که جهان ها با هم برخورد می کنند: ادغام فرضیات ضد خلاف مختلف در انصاف
فاش کردن
تعمیم از دست دادن ورود به مشکلات طبقه بندی چند طبقه . آنتروپی متقاطع تفاوت بین دو توزیع احتمال را تعیین می کند. همچنین به گیج کننده مراجعه کنید.
عملکرد توزیع تجمعی (CDF)
تابعی که فرکانس نمونه ها را کمتر یا مساوی با یک مقدار هدف تعریف می کند. به عنوان مثال ، توزیع عادی مقادیر مداوم را در نظر بگیرید. CDF به شما می گوید که تقریباً 50 ٪ از نمونه ها باید کمتر از یا مساوی با میانگین باشند و تقریباً 84 ٪ نمونه ها باید کمتر از یا مساوی با یک انحراف استاندارد بالاتر از میانگین باشند.
D
برابری جمعیتی
متریک انصاف که اگر نتایج طبقه بندی یک مدل به یک ویژگی حساس خاص وابسته نباشد ، راضی است.
به عنوان مثال ، اگر هر دو لیلیپوتیایی و Brobdingnagians در دانشگاه Glubbdubdrib اعمال شوند ، در صورتی که درصد لیلیپوتیان پذیرفته شده همانند درصد BrobdingNagians اعتراف کند ، بدون توجه به اینکه یک گروه به طور متوسط نسبت به گروه دیگر واجد شرایط تر هستند ، برابری جمعیتی حاصل می شود.
تضاد با شانس مساوی و برابری فرصت ، که باعث می شود طبقه بندی منجر به وابستگی به ویژگی های حساس شود ، اما نتایج طبقه بندی را برای برخی از برچسب های حقیقت مشخص شده زمین به ویژگی های حساس وابسته نمی کند. برای تجسم در مورد تجارت در هنگام بهینه سازی برای برابری جمعیتی ، به "حمله به تبعیض با یادگیری ماشین هوشمند" مراجعه کنید.
See Fairness: demographic parity in Machine Learning Crash Course for more information.
E
earth mover's distance (EMD)
A measure of the relative similarity of two distributions . The lower the earth mover's distance, the more similar the distributions.
edit distance
A measurement of how similar two text strings are to each other. In machine learning, edit distance is useful for the following reasons:
- Edit distance is easy to compute.
- Edit distance can compare two strings known to be similar to each other.
- Edit distance can determine the degree to which different strings are similar to a given string.
There are several definitions of edit distance, each using different string operations. See Levenshtein distance for an example.
empirical cumulative distribution function (eCDF or EDF)
A cumulative distribution function based on empirical measurements from a real dataset. The value of the function at any point along the x-axis is the fraction of observations in the dataset that are less than or equal to the specified value.
آنتروپی
In information theory , a description of how unpredictable a probability distribution is. Alternatively, entropy is also defined as how much information each example contains. A distribution has the highest possible entropy when all values of a random variable are equally likely.
The entropy of a set with two possible values "0" and "1" (for example, the labels in a binary classification problem) has the following formula:
H = -p log p - q log q = -p log p - (1-p) * log (1-p)
کجا:
- H is the entropy.
- p is the fraction of "1" examples.
- q is the fraction of "0" examples. Note that q = (1 - p)
- log is generally log 2 . In this case, the entropy unit is a bit.
برای مثال موارد زیر را فرض کنید:
- 100 examples contain the value "1"
- 300 examples contain the value "0"
Therefore, the entropy value is:
- p = 0.25
- q = 0.75
- H = (-0.25)log 2 (0.25) - (0.75)log 2 (0.75) = 0.81 bits per example
A set that is perfectly balanced (for example, 200 "0"s and 200 "1"s) would have an entropy of 1.0 bit per example. As a set becomes more imbalanced , its entropy moves towards 0.0.
In decision trees , entropy helps formulate information gain to help the splitter select the conditions during the growth of a classification decision tree.
Compare entropy with:
- ناخالصی جینی
- cross-entropy loss function
Entropy is often called Shannon's entropy .
See Exact splitter for binary classification with numerical features in the Decision Forests course for more information.
برابری فرصت ها
A fairness metric to assess whether a model is predicting the desirable outcome equally well for all values of a sensitive attribute . In other words, if the desirable outcome for a model is the positive class , the goal would be to have the true positive rate be the same for all groups.
Equality of opportunity is related to equalized odds , which requires that both the true positive rates and false positive rates are the same for all groups.
Suppose Glubbdubdrib University admits both Lilliputians and Brobdingnagians to a rigorous mathematics program. Lilliputians' secondary schools offer a robust curriculum of math classes, and the vast majority of students are qualified for the university program. Brobdingnagians' secondary schools don't offer math classes at all, and as a result, far fewer of their students are qualified. Equality of opportunity is satisfied for the preferred label of "admitted" with respect to nationality (Lilliputian or Brobdingnagian) if qualified students are equally likely to be admitted irrespective of whether they're a Lilliputian or a Brobdingnagian.
For example, suppose 100 Lilliputians and 100 Brobdingnagians apply to Glubbdubdrib University, and admissions decisions are made as follows:
Table 1. Lilliputian applicants (90% are qualified)
واجد شرایط | فاقد صلاحیت | |
---|---|---|
پذیرفته شد | 45 | 3 |
رد شد | 45 | 7 |
مجموع | 90 | 10 |
Percentage of qualified students admitted: 45/90 = 50% Percentage of unqualified students rejected: 7/10 = 70% Total percentage of Lilliputian students admitted: (45+3)/100 = 48% |
Table 2. Brobdingnagian applicants (10% are qualified):
واجد شرایط | فاقد صلاحیت | |
---|---|---|
پذیرفته شد | 5 | 9 |
رد شد | 5 | 81 |
مجموع | 10 | 90 |
Percentage of qualified students admitted: 5/10 = 50% Percentage of unqualified students rejected: 81/90 = 90% Total percentage of Brobdingnagian students admitted: (5+9)/100 = 14% |
The preceding examples satisfy equality of opportunity for acceptance of qualified students because qualified Lilliputians and Brobdingnagians both have a 50% chance of being admitted.
While equality of opportunity is satisfied, the following two fairness metrics are not satisfied:
- demographic parity : Lilliputians and Brobdingnagians are admitted to the university at different rates; 48% of Lilliputians students are admitted, but only 14% of Brobdingnagian students are admitted.
- equalized odds : While qualified Lilliputian and Brobdingnagian students both have the same chance of being admitted, the additional constraint that unqualified Lilliputians and Brobdingnagians both have the same chance of being rejected is not satisfied. Unqualified Lilliputians have a 70% rejection rate, whereas unqualified Brobdingnagians have a 90% rejection rate.
See Fairness: Equality of opportunity in Machine Learning Crash Course for more information.
equalized odds
A fairness metric to assess whether a model is predicting outcomes equally well for all values of a sensitive attribute with respect to both the positive class and negative class —not just one class or the other exclusively. In other words, both the true positive rate and false negative rate should be the same for all groups.
Equalized odds is related to equality of opportunity , which only focuses on error rates for a single class (positive or negative).
For example, suppose Glubbdubdrib University admits both Lilliputians and Brobdingnagians to a rigorous mathematics program. Lilliputians' secondary schools offer a robust curriculum of math classes, and the vast majority of students are qualified for the university program. Brobdingnagians' secondary schools don't offer math classes at all, and as a result, far fewer of their students are qualified. Equalized odds is satisfied provided that no matter whether an applicant is a Lilliputian or a Brobdingnagian, if they are qualified, they are equally as likely to get admitted to the program, and if they are not qualified, they are equally as likely to get rejected.
Suppose 100 Lilliputians and 100 Brobdingnagians apply to Glubbdubdrib University, and admissions decisions are made as follows:
Table 3. Lilliputian applicants (90% are qualified)
واجد شرایط | فاقد صلاحیت | |
---|---|---|
پذیرفته شد | 45 | 2 |
رد شد | 45 | 8 |
مجموع | 90 | 10 |
Percentage of qualified students admitted: 45/90 = 50% Percentage of unqualified students rejected: 8/10 = 80% Total percentage of Lilliputian students admitted: (45+2)/100 = 47% |
Table 4. Brobdingnagian applicants (10% are qualified):
واجد شرایط | فاقد صلاحیت | |
---|---|---|
پذیرفته شد | 5 | 18 |
رد شد | 5 | 72 |
مجموع | 10 | 90 |
Percentage of qualified students admitted: 5/10 = 50% Percentage of unqualified students rejected: 72/90 = 80% Total percentage of Brobdingnagian students admitted: (5+18)/100 = 23% |
Equalized odds is satisfied because qualified Lilliputian and Brobdingnagian students both have a 50% chance of being admitted, and unqualified Lilliputian and Brobdingnagian have an 80% chance of being rejected.
Equalized odds is formally defined in "Equality of Opportunity in Supervised Learning" as follows: "predictor Ŷ satisfies equalized odds with respect to protected attribute A and outcome Y if Ŷ and A are independent, conditional on Y."
evals
Primarily used as an abbreviation for LLM evaluations . More broadly, evals is an abbreviation for any form of evaluation .
ارزیابی
The process of measuring a model's quality or comparing different models against each other.
To evaluate a supervised machine learning model, you typically judge it against a validation set and a test set . Evaluating a LLM typically involves broader quality and safety assessments.
اف
F 1
A "roll-up" binary classification metric that relies on both precision and recall . این فرمول است:
fairness metric
A mathematical definition of "fairness" that is measurable. Some commonly used fairness metrics include:
Many fairness metrics are mutually exclusive; see incompatibility of fairness metrics .
false negative (FN)
An example in which the model mistakenly predicts the negative class . For example, the model predicts that a particular email message is not spam (the negative class), but that email message actually is spam .
false negative rate
The proportion of actual positive examples for which the model mistakenly predicted the negative class. The following formula calculates the false negative rate:
See Thresholds and the confusion matrix in Machine Learning Crash Course for more information.
false positive (FP)
An example in which the model mistakenly predicts the positive class . For example, the model predicts that a particular email message is spam (the positive class), but that email message is actually not spam .
See Thresholds and the confusion matrix in Machine Learning Crash Course for more information.
false positive rate (FPR)
The proportion of actual negative examples for which the model mistakenly predicted the positive class. The following formula calculates the false positive rate:
The false positive rate is the x-axis in an ROC curve .
See Classification: ROC and AUC in Machine Learning Crash Course for more information.
اهمیت ویژگی ها
Synonym for variable importances .
fraction of successes
A metric for evaluating an ML model's generated text . The fraction of successes is the number of "successful" generated text outputs divided by the total number of generated text outputs. For example, if a large language model generated 10 blocks of code, five of which were successful, then the fraction of successes would be 50%.
Although fraction of successes is broadly useful throughout statistics, within ML, this metric is primarily useful for measuring verifiable tasks like code generation or math problems.
جی
ناخالصی جینی
A metric similar to entropy . Splitters use values derived from either gini impurity or entropy to compose conditions for classification decision trees . Information gain is derived from entropy. There is no universally accepted equivalent term for the metric derived from gini impurity; however, this unnamed metric is just as important as information gain.
Gini impurity is also called gini index , or simply gini .
اچ
hinge loss
A family of loss functions for classification designed to find the decision boundary as distant as possible from each training example, thus maximizing the margin between examples and the boundary. KSVMs use hinge loss (or a related function, such as squared hinge loss). For binary classification, the hinge loss function is defined as follows:
where y is the true label, either -1 or +1, and y' is the raw output of the classification model :
Consequently, a plot of hinge loss versus (y * y') looks as follows:
من
incompatibility of fairness metrics
The idea that some notions of fairness are mutually incompatible and cannot be satisfied simultaneously. As a result, there is no single universal metric for quantifying fairness that can be applied to all ML problems.
While this may seem discouraging, incompatibility of fairness metrics doesn't imply that fairness efforts are fruitless. Instead, it suggests that fairness must be defined contextually for a given ML problem, with the goal of preventing harms specific to its use cases.
See "On the (im)possibility of fairness" for a more detailed discussion of the incompatibility of fairness metrics.
individual fairness
A fairness metric that checks whether similar individuals are classified similarly. For example, Brobdingnagian Academy might want to satisfy individual fairness by ensuring that two students with identical grades and standardized test scores are equally likely to gain admission.
Note that individual fairness relies entirely on how you define "similarity" (in this case, grades and test scores), and you can run the risk of introducing new fairness problems if your similarity metric misses important information (such as the rigor of a student's curriculum).
See "Fairness Through Awareness" for a more detailed discussion of individual fairness.
information gain
In decision forests , the difference between a node's entropy and the weighted (by number of examples) sum of the entropy of its children nodes. A node's entropy is the entropy of the examples in that node.
For example, consider the following entropy values:
- entropy of parent node = 0.6
- entropy of one child node with 16 relevant examples = 0.2
- entropy of another child node with 24 relevant examples = 0.1
So 40% of the examples are in one child node and 60% are in the other child node. بنابراین:
- weighted entropy sum of child nodes = (0.4 * 0.2) + (0.6 * 0.1) = 0.14
So, the information gain is:
- information gain = entropy of parent node - weighted entropy sum of child nodes
- information gain = 0.6 - 0.14 = 0.46
Most splitters seek to create conditions that maximize information gain.
inter-rater agreement
A measurement of how often human raters agree when doing a task. If raters disagree, the task instructions may need to be improved. Also sometimes called inter-annotator agreement or inter-rater reliability . See also Cohen's kappa , which is one of the most popular inter-rater agreement measurements.
See Categorical data: Common issues in Machine Learning Crash Course for more information.
L
L 1 loss
A loss function that calculates the absolute value of the difference between actual label values and the values that a model predicts. For example, here's the calculation of L 1 loss for a batch of five examples :
Actual value of example | Model's predicted value | Absolute value of delta |
---|---|---|
7 | 6 | 1 |
5 | 4 | 1 |
8 | 11 | 3 |
4 | 6 | 2 |
9 | 8 | 1 |
8 = L 1 loss |
L 1 loss is less sensitive to outliers than L 2 loss .
The Mean Absolute Error is the average L 1 loss per example.
See Linear regression: Loss in Machine Learning Crash Course for more information.
L 2 loss
A loss function that calculates the square of the difference between actual label values and the values that a model predicts. For example, here's the calculation of L 2 loss for a batch of five examples :
Actual value of example | Model's predicted value | Square of delta |
---|---|---|
7 | 6 | 1 |
5 | 4 | 1 |
8 | 11 | 9 |
4 | 6 | 4 |
9 | 8 | 1 |
16 = L 2 loss |
Due to squaring, L 2 loss amplifies the influence of outliers . That is, L 2 loss reacts more strongly to bad predictions than L 1 loss . For example, the L 1 loss for the preceding batch would be 8 rather than 16. Notice that a single outlier accounts for 9 of the 16.
Regression models typically use L 2 loss as the loss function.
The Mean Squared Error is the average L 2 loss per example. Squared loss is another name for L 2 loss.
See Logistic regression: Loss and regularization in Machine Learning Crash Course for more information.
LLM evaluations (evals)
A set of metrics and benchmarks for assessing the performance of large language models (LLMs). At a high level, LLM evaluations:
- Help researchers identify areas where LLMs need improvement.
- Are useful in comparing different LLMs and identifying the best LLM for a particular task.
- Help ensure that LLMs are safe and ethical to use.
See Large language models (LLMs) in Machine Learning Crash Course for more information.
از دست دادن
During the training of a supervised model , a measure of how far a model's prediction is from its label .
A loss function calculates the loss.
See Linear regression: Loss in Machine Learning Crash Course for more information.
عملکرد از دست دادن
During training or testing, a mathematical function that calculates the loss on a batch of examples. A loss function returns a lower loss for models that makes good predictions than for models that make bad predictions.
The goal of training is typically to minimize the loss that a loss function returns.
Many different kinds of loss functions exist. Pick the appropriate loss function for the kind of model you are building. به عنوان مثال:
- L 2 loss (or Mean Squared Error ) is the loss function for linear regression .
- Log Loss is the loss function for logistic regression .
م
میانگین خطای مطلق (MAE)
The average loss per example when L 1 loss is used. Calculate Mean Absolute Error as follows:
- Calculate the L 1 loss for a batch.
- Divide the L 1 loss by the number of examples in the batch.
For example, consider the calculation of L 1 loss on the following batch of five examples:
Actual value of example | Model's predicted value | Loss (difference between actual and predicted) |
---|---|---|
7 | 6 | 1 |
5 | 4 | 1 |
8 | 11 | 3 |
4 | 6 | 2 |
9 | 8 | 1 |
8 = L 1 loss |
So, L 1 loss is 8 and the number of examples is 5. Therefore, the Mean Absolute Error is:
Mean Absolute Error = L1 loss / Number of Examples Mean Absolute Error = 8/5 = 1.6
Contrast Mean Absolute Error with Mean Squared Error and Root Mean Squared Error .
mean average precision at k (mAP@k)
The statistical mean of all average precision at k scores across a validation dataset. One use of mean average precision at k is to judge the quality of recommendations generated by a recommendation system .
Although the phrase "mean average" sounds redundant, the name of the metric is appropriate. After all, this metric finds the mean of multiple average precision at k values.
میانگین مربعات خطا (MSE)
The average loss per example when L 2 loss is used. Calculate Mean Squared Error as follows:
- Calculate the L 2 loss for a batch.
- Divide the L 2 loss by the number of examples in the batch.
For example, consider the loss on the following batch of five examples:
ارزش واقعی | Model's prediction | از دست دادن | Squared loss |
---|---|---|---|
7 | 6 | 1 | 1 |
5 | 4 | 1 | 1 |
8 | 11 | 3 | 9 |
4 | 6 | 2 | 4 |
9 | 8 | 1 | 1 |
16 = L 2 loss |
Therefore, the Mean Squared Error is:
Mean Squared Error = L2 loss / Number of Examples Mean Squared Error = 16/5 = 3.2
Mean Squared Error is a popular training optimizer , particularly for linear regression .
Contrast Mean Squared Error with Mean Absolute Error and Root Mean Squared Error .
TensorFlow Playground uses Mean Squared Error to calculate loss values.
متریک
A statistic that you care about.
An objective is a metric that a machine learning system tries to optimize.
Metrics API (tf.metrics)
A TensorFlow API for evaluating models. For example, tf.metrics.accuracy
determines how often a model's predictions match labels.
minimax loss
A loss function for generative adversarial networks , based on the cross-entropy between the distribution of generated data and real data.
Minimax loss is used in the first paper to describe generative adversarial networks.
See Loss Functions in the Generative Adversarial Networks course for more information.
model capacity
The complexity of problems that a model can learn. The more complex the problems that a model can learn, the higher the model's capacity. A model's capacity typically increases with the number of model parameters. For a formal definition of classification model capacity, see VC dimension .
ن
negative class
In binary classification , one class is termed positive and the other is termed negative . The positive class is the thing or event that the model is testing for and the negative class is the other possibility. به عنوان مثال:
- The negative class in a medical test might be "not tumor."
- The negative class in an email classification model might be "not spam."
Contrast with positive class .
O
هدف
A metric that your algorithm is trying to optimize.
تابع هدف
The mathematical formula or metric that a model aims to optimize. For example, the objective function for linear regression is usually Mean Squared Loss . Therefore, when training a linear regression model, training aims to minimize Mean Squared Loss.
In some cases, the goal is to maximize the objective function. For example, if the objective function is accuracy, the goal is to maximize accuracy.
See also loss .
پ
pass at k (pass@k)
A metric to determine the quality of code (for example, Python) that a large language model generates. More specifically, pass at k tells you the likelihood that at least one generated block of code out of k generated blocks of code will pass all of its unit tests.
Large language models often struggle to generate good code for complex programming problems. Software engineers adapt to this problem by prompting the large language model to generate multiple ( k ) solutions for the same problem. Then, software engineers test each of the solutions against unit tests. The calculation of pass at k depends on the outcome of the unit tests:
- If one or more of those solutions pass the unit test, then the LLM Passes that code generation challenge.
- If none of the solutions pass the unit test, then the LLM Fails that code generation challenge.
The formula for pass at k is as follows:
\[\text{pass at k} = \frac{\text{total number of passes}} {\text{total number of challenges}}\]
In general, higher values of k produce higher pass at k scores; however, higher values of k require more large language model and unit testing resources.
عملکرد
Overloaded term with the following meanings:
- The standard meaning within software engineering. Namely: How fast (or efficiently) does this piece of software run?
- The meaning within machine learning. Here, performance answers the following question: How correct is this model ? That is, how good are the model's predictions?
permutation variable importances
A type of variable importance that evaluates the increase in the prediction error of a model after permuting the feature's values. Permutation variable importance is a model-independent metric.
گیجی
One measure of how well a model is accomplishing its task. For example, suppose your task is to read the first few letters of a word a user is typing on a phone keyboard, and to offer a list of possible completion words. Perplexity, P, for this task is approximately the number of guesses you need to offer in order for your list to contain the actual word the user is trying to type.
Perplexity is related to cross-entropy as follows:
positive class
The class you are testing for.
For example, the positive class in a cancer model might be "tumor." The positive class in an email classification model might be "spam."
Contrast with negative class .
PR AUC (area under the PR curve)
Area under the interpolated precision-recall curve , obtained by plotting (recall, precision) points for different values of the classification threshold .
دقت
A metric for classification models that answers the following question:
When the model predicted the positive class , what percentage of the predictions were correct?
این فرمول است:
کجا:
- true positive means the model correctly predicted the positive class.
- false positive means the model mistakenly predicted the positive class.
For example, suppose a model made 200 positive predictions. Of these 200 positive predictions:
- 150 were true positives.
- 50 were false positives.
در این مورد:
Contrast with accuracy and recall .
See Classification: Accuracy, recall, precision and related metrics in Machine Learning Crash Course for more information.
precision at k (precision@k)
A metric for evaluating a ranked (ordered) list of items. Precision at k identifies the fraction of the first k items in that list that are "relevant." یعنی:
\[\text{precision at k} = \frac{\text{relevant items in first k items of the list}} {\text{k}}\]
The value of k must be less than or equal to the length of the returned list. Note that the length of the returned list is not part of the calculation.
Relevance is often subjective; even expert human evaluators often disagree on which items are relevant.
مقایسه کنید با:
منحنی فراخوان دقیق
A curve of precision versus recall at different classification thresholds .
prediction bias
A value indicating how far apart the average of predictions is from the average of labels in the dataset.
Not to be confused with the bias term in machine learning models or with bias in ethics and fairness .
predictive parity
A fairness metric that checks whether, for a given classifier, the precision rates are equivalent for subgroups under consideration.
For example, a model that predicts college acceptance would satisfy predictive parity for nationality if its precision rate is the same for Lilliputians and Brobdingnagians.
Predictive parity is sometime also called predictive rate parity .
See "Fairness Definitions Explained" (section 3.2.1) for a more detailed discussion of predictive parity.
predictive rate parity
Another name for predictive parity .
تابع چگالی احتمال
A function that identifies the frequency of data samples having exactly a particular value. When a dataset's values are continuous floating-point numbers, exact matches rarely occur. However, integrating a probability density function from value x
to value y
yields the expected frequency of data samples between x
and y
.
For example, consider a normal distribution having a mean of 200 and a standard deviation of 30. To determine the expected frequency of data samples falling within the range 211.4 to 218.7, you can integrate the probability density function for a normal distribution from 211.4 to 218.7.
آر
به یاد بیاور
A metric for classification models that answers the following question:
When ground truth was the positive class , what percentage of predictions did the model correctly identify as the positive class?
این فرمول است:
\[\text{Recall} = \frac{\text{true positives}} {\text{true positives} + \text{false negatives}} \]
کجا:
- true positive means the model correctly predicted the positive class.
- false negative means that the model mistakenly predicted the negative class .
For instance, suppose your model made 200 predictions on examples for which ground truth was the positive class. Of these 200 predictions:
- 180 were true positives.
- 20 were false negatives.
در این مورد:
\[\text{Recall} = \frac{\text{180}} {\text{180} + \text{20}} = 0.9 \]
See Classification: Accuracy, recall, precision and related metrics for more information.
recall at k (recall@k)
A metric for evaluating systems that output a ranked (ordered) list of items. Recall at k identifies the fraction of relevant items in the first k items in that list out of the total number of relevant items returned.
\[\text{recall at k} = \frac{\text{relevant items in first k items of the list}} {\text{total number of relevant items in the list}}\]
Contrast with precision at k .
ROC (receiver operating characteristic) Curve
A graph of true positive rate versus false positive rate for different classification thresholds in binary classification.
The shape of an ROC curve suggests a binary classification model's ability to separate positive classes from negative classes. Suppose, for example, that a binary classification model perfectly separates all the negative classes from all the positive classes:
The ROC curve for the preceding model looks as follows:
In contrast, the following illustration graphs the raw logistic regression values for a terrible model that can't separate negative classes from positive classes at all:
The ROC curve for this model looks as follows:
Meanwhile, back in the real world, most binary classification models separate positive and negative classes to some degree, but usually not perfectly. So, a typical ROC curve falls somewhere between the two extremes:
The point on an ROC curve closest to (0.0,1.0) theoretically identifies the ideal classification threshold. However, several other real-world issues influence the selection of the ideal classification threshold. For example, perhaps false negatives cause far more pain than false positives.
A numerical metric called AUC summarizes the ROC curve into a single floating-point value.
ریشه میانگین مربعات خطا (RMSE)
The square root of the Mean Squared Error .
ROUGE (مطالعه فراخوان یادآوری گرا برای ارزیابی Gisting)
A family of metrics that evaluate automatic summarization and machine translation models. ROUGE metrics determine the degree to which a reference text overlaps an ML model's generated text . Each member of the ROUGE family measures overlap in a different way. Higher ROUGE scores indicate more similarity between the reference text and generated text than lower ROUGE scores.
Each ROUGE family member typically generates the following metrics:
- دقت
- به یاد بیاورید
- F 1
For details and examples, see:
ROUGE-L
A member of the ROUGE family focused on the length of the longest common subsequence in the reference text and generated text . The following formulas calculate recall and precision for ROUGE-L:
You can then use F 1 to roll up ROUGE-L recall and ROUGE-L precision into a single metric:
ROUGE-L ignores any newlines in the reference text and generated text, so the longest common subsequence could cross multiple sentences. When the reference text and generated text involve multiple sentences, a variation of ROUGE-L called ROUGE-Lsum is generally a better metric. ROUGE-Lsum determines the longest common subsequence for each sentence in a passage and then calculates the mean of those longest common subsequences.
ROUGE-N
A set of metrics within the ROUGE family that compares the shared N-grams of a certain size in the reference text and generated text . به عنوان مثال:
- ROUGE-1 measures the number of shared tokens in the reference text and generated text.
- ROUGE-2 measures the number of shared bigrams (2-grams) in the reference text and generated text.
- ROUGE-3 measures the number of shared trigrams (3-grams) in the reference text and generated text.
You can use the following formulas to calculate ROUGE-N recall and ROUGE-N precision for any member of the ROUGE-N family:
You can then use F 1 to roll up ROUGE-N recall and ROUGE-N precision into a single metric:
ROUGE-S
A forgiving form of ROUGE-N that enables skip-gram matching. That is, ROUGE-N only counts N-grams that match exactly , but ROUGE-S also counts N-grams separated by one or more words. برای مثال موارد زیر را در نظر بگیرید:
- reference text : White clouds
- generated text : White billowing clouds
When calculating ROUGE-N, the 2-gram, White clouds doesn't match White billowing clouds . However, when calculating ROUGE-S, White clouds does match White billowing clouds .
R-squared
A regression metric indicating how much variation in a label is due to an individual feature or to a feature set. R-squared is a value between 0 and 1, which you can interpret as follows:
- An R-squared of 0 means that none of a label's variation is due to the feature set.
- An R-squared of 1 means that all of a label's variation is due to the feature set.
- An R-squared between 0 and 1 indicates the extent to which the label's variation can be predicted from a particular feature or the feature set. For example, an R-squared of 0.10 means that 10 percent of the variance in the label is due to the feature set, an R-squared of 0.20 means that 20 percent is due to the feature set, and so on.
R-squared is the square of the Pearson correlation coefficient between the values that a model predicted and ground truth .
اس
به ثمر رساندن
The part of a recommendation system that provides a value or ranking for each item produced by the candidate generation phase.
اندازه گیری شباهت
In clustering algorithms, the metric used to determine how alike (how similar) any two examples are.
پراکندگی
The number of elements set to zero (or null) in a vector or matrix divided by the total number of entries in that vector or matrix. For example, consider a 100-element matrix in which 98 cells contain zero. The calculation of sparsity is as follows:
Feature sparsity refers to the sparsity of a feature vector; model sparsity refers to the sparsity of the model weights.
squared hinge loss
The square of the hinge loss . Squared hinge loss penalizes outliers more harshly than regular hinge loss.
squared loss
Synonym for L 2 loss .
تی
test loss
A metric representing a model's loss against the test set . When building a model , you typically try to minimize test loss. That's because a low test loss is a stronger quality signal than a low training loss or low validation loss .
A large gap between test loss and training loss or validation loss sometimes suggests that you need to increase the regularization rate .
top-k accuracy
The percentage of times that a "target label" appears within the first k positions of generated lists. The lists could be personalized recommendations or a list of items ordered by softmax .
Top-k accuracy is also known as accuracy at k .
سمیت
The degree to which content is abusive, threatening, or offensive. Many machine learning models can identify and measure toxicity. Most of these models identify toxicity along multiple parameters, such as the level of abusive language and the level of threatening language.
training loss
A metric representing a model's loss during a particular training iteration. For example, suppose the loss function is Mean Squared Error . Perhaps the training loss (the Mean Squared Error) for the 10th iteration is 2.2, and the training loss for the 100th iteration is 1.9.
A loss curve plots training loss versus the number of iterations. A loss curve provides the following hints about training:
- A downward slope implies that the model is improving.
- An upward slope implies that the model is getting worse.
- A flat slope implies that the model has reached convergence .
For example, the following somewhat idealized loss curve shows:
- A steep downward slope during the initial iterations, which implies rapid model improvement.
- A gradually flattening (but still downward) slope until close to the end of training, which implies continued model improvement at a somewhat slower pace then during the initial iterations.
- A flat slope towards the end of training, which suggests convergence.
Although training loss is important, see also generalization .
true negative (TN)
An example in which the model correctly predicts the negative class . For example, the model infers that a particular email message is not spam , and that email message really is not spam .
true positive (TP)
An example in which the model correctly predicts the positive class . For example, the model infers that a particular email message is spam, and that email message really is spam.
true positive rate (TPR)
Synonym for recall . یعنی:
True positive rate is the y-axis in an ROC curve .
V
validation loss
A metric representing a model's loss on the validation set during a particular iteration of training.
See also generalization curve .
variable importances
A set of scores that indicates the relative importance of each feature to the model.
For example, consider a decision tree that estimates house prices. Suppose this decision tree uses three features: size, age, and style. If a set of variable importances for the three features are calculated to be {size=5.8, age=2.5, style=4.7}, then size is more important to the decision tree than age or style.
Different variable importance metrics exist, which can inform ML experts about different aspects of models.
دبلیو
Wasserstein loss
One of the loss functions commonly used in generative adversarial networks , based on the earth mover's distance between the distribution of generated data and real data.
،This page contains Metrics glossary terms. For all glossary terms, click here .
الف
دقت
The number of correct classification predictions divided by the total number of predictions. یعنی:
For example, a model that made 40 correct predictions and 10 incorrect predictions would have an accuracy of:
Binary classification provides specific names for the different categories of correct predictions and incorrect predictions . So, the accuracy formula for binary classification is as follows:
کجا:
- TP is the number of true positives (correct predictions).
- TN is the number of true negatives (correct predictions).
- FP is the number of false positives (incorrect predictions).
- FN is the number of false negatives (incorrect predictions).
Compare and contrast accuracy with precision and recall .
See Classification: Accuracy, recall, precision and related metrics in Machine Learning Crash Course for more information.
area under the PR curve
See PR AUC (Area under the PR Curve) .
ناحیه زیر منحنی ROC
See AUC (Area under the ROC curve) .
AUC (Area under the ROC curve)
A number between 0.0 and 1.0 representing a binary classification model's ability to separate positive classes from negative classes . The closer the AUC is to 1.0, the better the model's ability to separate classes from each other.
For example, the following illustration shows a classification model that separates positive classes (green ovals) from negative classes (purple rectangles) perfectly. This unrealistically perfect model has an AUC of 1.0:
Conversely, the following illustration shows the results for a classification model that generated random results. This model has an AUC of 0.5:
Yes, the preceding model has an AUC of 0.5, not 0.0.
Most models are somewhere between the two extremes. For instance, the following model separates positives from negatives somewhat, and therefore has an AUC somewhere between 0.5 and 1.0:
AUC ignores any value you set for classification threshold . Instead, AUC considers all possible classification thresholds.
See Classification: ROC and AUC in Machine Learning Crash Course for more information.
average precision at k
A metric for summarizing a model's performance on a single prompt that generates ranked results, such as a numbered list of book recommendations. Average precision at k is, well, the average of the precision at k values for each relevant result. The formula for average precision at k is therefore:
\[{\text{average precision at k}} = \frac{1}{n} \sum_{i=1}^n {\text{precision at k for each relevant item} } \]
کجا:
- \(n\) is the number of relevant items in the list.
Contrast with recall at k .
ب
خط پایه
A model used as a reference point for comparing how well another model (typically, a more complex one) is performing. For example, a logistic regression model might serve as a good baseline for a deep model .
For a particular problem, the baseline helps model developers quantify the minimal expected performance that a new model must achieve for the new model to be useful.
سی
هزینه
Synonym for loss .
counterfactual fairness
A fairness metric that checks whether a classification model produces the same result for one individual as it does for another individual who is identical to the first, except with respect to one or more sensitive attributes . Evaluating a classification model for counterfactual fairness is one method for surfacing potential sources of bias in a model.
See either of the following for more information:
- Fairness: Counterfactual fairness in Machine Learning Crash Course.
- When Worlds Collide: Integrating Different Counterfactual Assumptions in Fairness
cross-entropy
A generalization of Log Loss to multi-class classification problems . Cross-entropy quantifies the difference between two probability distributions. See also perplexity .
cumulative distribution function (CDF)
A function that defines the frequency of samples less than or equal to a target value. For example, consider a normal distribution of continuous values. A CDF tells you that approximately 50% of samples should be less than or equal to the mean and that approximately 84% of samples should be less than or equal to one standard deviation above the mean.
D
demographic parity
A fairness metric that is satisfied if the results of a model's classification are not dependent on a given sensitive attribute .
For example, if both Lilliputians and Brobdingnagians apply to Glubbdubdrib University, demographic parity is achieved if the percentage of Lilliputians admitted is the same as the percentage of Brobdingnagians admitted, irrespective of whether one group is on average more qualified than the other.
Contrast with equalized odds and equality of opportunity , which permit classification results in aggregate to depend on sensitive attributes, but don't permit classification results for certain specified ground truth labels to depend on sensitive attributes. See "Attacking discrimination with smarter machine learning" for a visualization exploring the tradeoffs when optimizing for demographic parity.
See Fairness: demographic parity in Machine Learning Crash Course for more information.
E
earth mover's distance (EMD)
A measure of the relative similarity of two distributions . The lower the earth mover's distance, the more similar the distributions.
edit distance
A measurement of how similar two text strings are to each other. In machine learning, edit distance is useful for the following reasons:
- Edit distance is easy to compute.
- Edit distance can compare two strings known to be similar to each other.
- Edit distance can determine the degree to which different strings are similar to a given string.
There are several definitions of edit distance, each using different string operations. See Levenshtein distance for an example.
empirical cumulative distribution function (eCDF or EDF)
A cumulative distribution function based on empirical measurements from a real dataset. The value of the function at any point along the x-axis is the fraction of observations in the dataset that are less than or equal to the specified value.
آنتروپی
In information theory , a description of how unpredictable a probability distribution is. Alternatively, entropy is also defined as how much information each example contains. A distribution has the highest possible entropy when all values of a random variable are equally likely.
The entropy of a set with two possible values "0" and "1" (for example, the labels in a binary classification problem) has the following formula:
H = -p log p - q log q = -p log p - (1-p) * log (1-p)
کجا:
- H is the entropy.
- p is the fraction of "1" examples.
- q is the fraction of "0" examples. Note that q = (1 - p)
- log is generally log 2 . In this case, the entropy unit is a bit.
برای مثال موارد زیر را فرض کنید:
- 100 examples contain the value "1"
- 300 examples contain the value "0"
Therefore, the entropy value is:
- p = 0.25
- q = 0.75
- H = (-0.25)log 2 (0.25) - (0.75)log 2 (0.75) = 0.81 bits per example
A set that is perfectly balanced (for example, 200 "0"s and 200 "1"s) would have an entropy of 1.0 bit per example. As a set becomes more imbalanced , its entropy moves towards 0.0.
In decision trees , entropy helps formulate information gain to help the splitter select the conditions during the growth of a classification decision tree.
Compare entropy with:
- ناخالصی جینی
- cross-entropy loss function
Entropy is often called Shannon's entropy .
See Exact splitter for binary classification with numerical features in the Decision Forests course for more information.
برابری فرصت ها
A fairness metric to assess whether a model is predicting the desirable outcome equally well for all values of a sensitive attribute . In other words, if the desirable outcome for a model is the positive class , the goal would be to have the true positive rate be the same for all groups.
Equality of opportunity is related to equalized odds , which requires that both the true positive rates and false positive rates are the same for all groups.
Suppose Glubbdubdrib University admits both Lilliputians and Brobdingnagians to a rigorous mathematics program. Lilliputians' secondary schools offer a robust curriculum of math classes, and the vast majority of students are qualified for the university program. Brobdingnagians' secondary schools don't offer math classes at all, and as a result, far fewer of their students are qualified. Equality of opportunity is satisfied for the preferred label of "admitted" with respect to nationality (Lilliputian or Brobdingnagian) if qualified students are equally likely to be admitted irrespective of whether they're a Lilliputian or a Brobdingnagian.
For example, suppose 100 Lilliputians and 100 Brobdingnagians apply to Glubbdubdrib University, and admissions decisions are made as follows:
Table 1. Lilliputian applicants (90% are qualified)
واجد شرایط | فاقد صلاحیت | |
---|---|---|
پذیرفته شد | 45 | 3 |
رد شد | 45 | 7 |
مجموع | 90 | 10 |
Percentage of qualified students admitted: 45/90 = 50% Percentage of unqualified students rejected: 7/10 = 70% Total percentage of Lilliputian students admitted: (45+3)/100 = 48% |
Table 2. Brobdingnagian applicants (10% are qualified):
واجد شرایط | فاقد صلاحیت | |
---|---|---|
پذیرفته شد | 5 | 9 |
رد شد | 5 | 81 |
مجموع | 10 | 90 |
Percentage of qualified students admitted: 5/10 = 50% Percentage of unqualified students rejected: 81/90 = 90% Total percentage of Brobdingnagian students admitted: (5+9)/100 = 14% |
The preceding examples satisfy equality of opportunity for acceptance of qualified students because qualified Lilliputians and Brobdingnagians both have a 50% chance of being admitted.
While equality of opportunity is satisfied, the following two fairness metrics are not satisfied:
- demographic parity : Lilliputians and Brobdingnagians are admitted to the university at different rates; 48% of Lilliputians students are admitted, but only 14% of Brobdingnagian students are admitted.
- equalized odds : While qualified Lilliputian and Brobdingnagian students both have the same chance of being admitted, the additional constraint that unqualified Lilliputians and Brobdingnagians both have the same chance of being rejected is not satisfied. Unqualified Lilliputians have a 70% rejection rate, whereas unqualified Brobdingnagians have a 90% rejection rate.
See Fairness: Equality of opportunity in Machine Learning Crash Course for more information.
equalized odds
A fairness metric to assess whether a model is predicting outcomes equally well for all values of a sensitive attribute with respect to both the positive class and negative class —not just one class or the other exclusively. In other words, both the true positive rate and false negative rate should be the same for all groups.
Equalized odds is related to equality of opportunity , which only focuses on error rates for a single class (positive or negative).
For example, suppose Glubbdubdrib University admits both Lilliputians and Brobdingnagians to a rigorous mathematics program. Lilliputians' secondary schools offer a robust curriculum of math classes, and the vast majority of students are qualified for the university program. Brobdingnagians' secondary schools don't offer math classes at all, and as a result, far fewer of their students are qualified. Equalized odds is satisfied provided that no matter whether an applicant is a Lilliputian or a Brobdingnagian, if they are qualified, they are equally as likely to get admitted to the program, and if they are not qualified, they are equally as likely to get rejected.
Suppose 100 Lilliputians and 100 Brobdingnagians apply to Glubbdubdrib University, and admissions decisions are made as follows:
Table 3. Lilliputian applicants (90% are qualified)
واجد شرایط | فاقد صلاحیت | |
---|---|---|
پذیرفته شد | 45 | 2 |
رد شد | 45 | 8 |
مجموع | 90 | 10 |
Percentage of qualified students admitted: 45/90 = 50% Percentage of unqualified students rejected: 8/10 = 80% Total percentage of Lilliputian students admitted: (45+2)/100 = 47% |
Table 4. Brobdingnagian applicants (10% are qualified):
واجد شرایط | فاقد صلاحیت | |
---|---|---|
پذیرفته شد | 5 | 18 |
رد شد | 5 | 72 |
مجموع | 10 | 90 |
Percentage of qualified students admitted: 5/10 = 50% Percentage of unqualified students rejected: 72/90 = 80% Total percentage of Brobdingnagian students admitted: (5+18)/100 = 23% |
Equalized odds is satisfied because qualified Lilliputian and Brobdingnagian students both have a 50% chance of being admitted, and unqualified Lilliputian and Brobdingnagian have an 80% chance of being rejected.
Equalized odds is formally defined in "Equality of Opportunity in Supervised Learning" as follows: "predictor Ŷ satisfies equalized odds with respect to protected attribute A and outcome Y if Ŷ and A are independent, conditional on Y."
evals
Primarily used as an abbreviation for LLM evaluations . More broadly, evals is an abbreviation for any form of evaluation .
ارزیابی
The process of measuring a model's quality or comparing different models against each other.
To evaluate a supervised machine learning model, you typically judge it against a validation set and a test set . Evaluating a LLM typically involves broader quality and safety assessments.
اف
F 1
A "roll-up" binary classification metric that relies on both precision and recall . این فرمول است:
fairness metric
A mathematical definition of "fairness" that is measurable. Some commonly used fairness metrics include:
Many fairness metrics are mutually exclusive; see incompatibility of fairness metrics .
false negative (FN)
An example in which the model mistakenly predicts the negative class . For example, the model predicts that a particular email message is not spam (the negative class), but that email message actually is spam .
false negative rate
The proportion of actual positive examples for which the model mistakenly predicted the negative class. The following formula calculates the false negative rate:
See Thresholds and the confusion matrix in Machine Learning Crash Course for more information.
false positive (FP)
An example in which the model mistakenly predicts the positive class . For example, the model predicts that a particular email message is spam (the positive class), but that email message is actually not spam .
See Thresholds and the confusion matrix in Machine Learning Crash Course for more information.
false positive rate (FPR)
The proportion of actual negative examples for which the model mistakenly predicted the positive class. The following formula calculates the false positive rate:
The false positive rate is the x-axis in an ROC curve .
See Classification: ROC and AUC in Machine Learning Crash Course for more information.
اهمیت ویژگی ها
Synonym for variable importances .
fraction of successes
A metric for evaluating an ML model's generated text . The fraction of successes is the number of "successful" generated text outputs divided by the total number of generated text outputs. For example, if a large language model generated 10 blocks of code, five of which were successful, then the fraction of successes would be 50%.
Although fraction of successes is broadly useful throughout statistics, within ML, this metric is primarily useful for measuring verifiable tasks like code generation or math problems.
جی
ناخالصی جینی
A metric similar to entropy . Splitters use values derived from either gini impurity or entropy to compose conditions for classification decision trees . Information gain is derived from entropy. There is no universally accepted equivalent term for the metric derived from gini impurity; however, this unnamed metric is just as important as information gain.
Gini impurity is also called gini index , or simply gini .
اچ
hinge loss
A family of loss functions for classification designed to find the decision boundary as distant as possible from each training example, thus maximizing the margin between examples and the boundary. KSVMs use hinge loss (or a related function, such as squared hinge loss). For binary classification, the hinge loss function is defined as follows:
where y is the true label, either -1 or +1, and y' is the raw output of the classification model :
Consequently, a plot of hinge loss versus (y * y') looks as follows:
من
incompatibility of fairness metrics
The idea that some notions of fairness are mutually incompatible and cannot be satisfied simultaneously. As a result, there is no single universal metric for quantifying fairness that can be applied to all ML problems.
While this may seem discouraging, incompatibility of fairness metrics doesn't imply that fairness efforts are fruitless. Instead, it suggests that fairness must be defined contextually for a given ML problem, with the goal of preventing harms specific to its use cases.
See "On the (im)possibility of fairness" for a more detailed discussion of the incompatibility of fairness metrics.
individual fairness
A fairness metric that checks whether similar individuals are classified similarly. For example, Brobdingnagian Academy might want to satisfy individual fairness by ensuring that two students with identical grades and standardized test scores are equally likely to gain admission.
Note that individual fairness relies entirely on how you define "similarity" (in this case, grades and test scores), and you can run the risk of introducing new fairness problems if your similarity metric misses important information (such as the rigor of a student's curriculum).
See "Fairness Through Awareness" for a more detailed discussion of individual fairness.
information gain
In decision forests , the difference between a node's entropy and the weighted (by number of examples) sum of the entropy of its children nodes. A node's entropy is the entropy of the examples in that node.
For example, consider the following entropy values:
- entropy of parent node = 0.6
- entropy of one child node with 16 relevant examples = 0.2
- entropy of another child node with 24 relevant examples = 0.1
So 40% of the examples are in one child node and 60% are in the other child node. بنابراین:
- weighted entropy sum of child nodes = (0.4 * 0.2) + (0.6 * 0.1) = 0.14
So, the information gain is:
- information gain = entropy of parent node - weighted entropy sum of child nodes
- information gain = 0.6 - 0.14 = 0.46
Most splitters seek to create conditions that maximize information gain.
inter-rater agreement
A measurement of how often human raters agree when doing a task. If raters disagree, the task instructions may need to be improved. Also sometimes called inter-annotator agreement or inter-rater reliability . See also Cohen's kappa , which is one of the most popular inter-rater agreement measurements.
See Categorical data: Common issues in Machine Learning Crash Course for more information.
L
L 1 loss
A loss function that calculates the absolute value of the difference between actual label values and the values that a model predicts. For example, here's the calculation of L 1 loss for a batch of five examples :
Actual value of example | Model's predicted value | Absolute value of delta |
---|---|---|
7 | 6 | 1 |
5 | 4 | 1 |
8 | 11 | 3 |
4 | 6 | 2 |
9 | 8 | 1 |
8 = L 1 loss |
L 1 loss is less sensitive to outliers than L 2 loss .
The Mean Absolute Error is the average L 1 loss per example.
See Linear regression: Loss in Machine Learning Crash Course for more information.
L 2 loss
A loss function that calculates the square of the difference between actual label values and the values that a model predicts. For example, here's the calculation of L 2 loss for a batch of five examples :
Actual value of example | Model's predicted value | Square of delta |
---|---|---|
7 | 6 | 1 |
5 | 4 | 1 |
8 | 11 | 9 |
4 | 6 | 4 |
9 | 8 | 1 |
16 = L 2 loss |
Due to squaring, L 2 loss amplifies the influence of outliers . That is, L 2 loss reacts more strongly to bad predictions than L 1 loss . For example, the L 1 loss for the preceding batch would be 8 rather than 16. Notice that a single outlier accounts for 9 of the 16.
Regression models typically use L 2 loss as the loss function.
The Mean Squared Error is the average L 2 loss per example. Squared loss is another name for L 2 loss.
See Logistic regression: Loss and regularization in Machine Learning Crash Course for more information.
LLM evaluations (evals)
A set of metrics and benchmarks for assessing the performance of large language models (LLMs). At a high level, LLM evaluations:
- Help researchers identify areas where LLMs need improvement.
- Are useful in comparing different LLMs and identifying the best LLM for a particular task.
- Help ensure that LLMs are safe and ethical to use.
See Large language models (LLMs) in Machine Learning Crash Course for more information.
از دست دادن
During the training of a supervised model , a measure of how far a model's prediction is from its label .
A loss function calculates the loss.
See Linear regression: Loss in Machine Learning Crash Course for more information.
عملکرد از دست دادن
During training or testing, a mathematical function that calculates the loss on a batch of examples. A loss function returns a lower loss for models that makes good predictions than for models that make bad predictions.
The goal of training is typically to minimize the loss that a loss function returns.
Many different kinds of loss functions exist. Pick the appropriate loss function for the kind of model you are building. به عنوان مثال:
- L 2 loss (or Mean Squared Error ) is the loss function for linear regression .
- Log Loss is the loss function for logistic regression .
م
میانگین خطای مطلق (MAE)
The average loss per example when L 1 loss is used. Calculate Mean Absolute Error as follows:
- Calculate the L 1 loss for a batch.
- Divide the L 1 loss by the number of examples in the batch.
For example, consider the calculation of L 1 loss on the following batch of five examples:
Actual value of example | Model's predicted value | Loss (difference between actual and predicted) |
---|---|---|
7 | 6 | 1 |
5 | 4 | 1 |
8 | 11 | 3 |
4 | 6 | 2 |
9 | 8 | 1 |
8 = L 1 loss |
So, L 1 loss is 8 and the number of examples is 5. Therefore, the Mean Absolute Error is:
Mean Absolute Error = L1 loss / Number of Examples Mean Absolute Error = 8/5 = 1.6
Contrast Mean Absolute Error with Mean Squared Error and Root Mean Squared Error .
mean average precision at k (mAP@k)
The statistical mean of all average precision at k scores across a validation dataset. One use of mean average precision at k is to judge the quality of recommendations generated by a recommendation system .
Although the phrase "mean average" sounds redundant, the name of the metric is appropriate. After all, this metric finds the mean of multiple average precision at k values.
میانگین مربعات خطا (MSE)
The average loss per example when L 2 loss is used. Calculate Mean Squared Error as follows:
- Calculate the L 2 loss for a batch.
- Divide the L 2 loss by the number of examples in the batch.
For example, consider the loss on the following batch of five examples:
ارزش واقعی | Model's prediction | از دست دادن | Squared loss |
---|---|---|---|
7 | 6 | 1 | 1 |
5 | 4 | 1 | 1 |
8 | 11 | 3 | 9 |
4 | 6 | 2 | 4 |
9 | 8 | 1 | 1 |
16 = L 2 loss |
Therefore, the Mean Squared Error is:
Mean Squared Error = L2 loss / Number of Examples Mean Squared Error = 16/5 = 3.2
Mean Squared Error is a popular training optimizer , particularly for linear regression .
Contrast Mean Squared Error with Mean Absolute Error and Root Mean Squared Error .
TensorFlow Playground uses Mean Squared Error to calculate loss values.
متریک
A statistic that you care about.
An objective is a metric that a machine learning system tries to optimize.
Metrics API (tf.metrics)
A TensorFlow API for evaluating models. For example, tf.metrics.accuracy
determines how often a model's predictions match labels.
minimax loss
A loss function for generative adversarial networks , based on the cross-entropy between the distribution of generated data and real data.
Minimax loss is used in the first paper to describe generative adversarial networks.
See Loss Functions in the Generative Adversarial Networks course for more information.
model capacity
The complexity of problems that a model can learn. The more complex the problems that a model can learn, the higher the model's capacity. A model's capacity typically increases with the number of model parameters. For a formal definition of classification model capacity, see VC dimension .
ن
negative class
In binary classification , one class is termed positive and the other is termed negative . The positive class is the thing or event that the model is testing for and the negative class is the other possibility. به عنوان مثال:
- The negative class in a medical test might be "not tumor."
- The negative class in an email classification model might be "not spam."
Contrast with positive class .
O
هدف
A metric that your algorithm is trying to optimize.
تابع هدف
The mathematical formula or metric that a model aims to optimize. For example, the objective function for linear regression is usually Mean Squared Loss . Therefore, when training a linear regression model, training aims to minimize Mean Squared Loss.
In some cases, the goal is to maximize the objective function. For example, if the objective function is accuracy, the goal is to maximize accuracy.
See also loss .
پ
pass at k (pass@k)
A metric to determine the quality of code (for example, Python) that a large language model generates. More specifically, pass at k tells you the likelihood that at least one generated block of code out of k generated blocks of code will pass all of its unit tests.
Large language models often struggle to generate good code for complex programming problems. Software engineers adapt to this problem by prompting the large language model to generate multiple ( k ) solutions for the same problem. Then, software engineers test each of the solutions against unit tests. The calculation of pass at k depends on the outcome of the unit tests:
- If one or more of those solutions pass the unit test, then the LLM Passes that code generation challenge.
- If none of the solutions pass the unit test, then the LLM Fails that code generation challenge.
The formula for pass at k is as follows:
\[\text{pass at k} = \frac{\text{total number of passes}} {\text{total number of challenges}}\]
In general, higher values of k produce higher pass at k scores; however, higher values of k require more large language model and unit testing resources.
عملکرد
Overloaded term with the following meanings:
- The standard meaning within software engineering. Namely: How fast (or efficiently) does this piece of software run?
- The meaning within machine learning. Here, performance answers the following question: How correct is this model ? That is, how good are the model's predictions?
permutation variable importances
A type of variable importance that evaluates the increase in the prediction error of a model after permuting the feature's values. Permutation variable importance is a model-independent metric.
گیجی
One measure of how well a model is accomplishing its task. For example, suppose your task is to read the first few letters of a word a user is typing on a phone keyboard, and to offer a list of possible completion words. Perplexity, P, for this task is approximately the number of guesses you need to offer in order for your list to contain the actual word the user is trying to type.
Perplexity is related to cross-entropy as follows:
positive class
The class you are testing for.
For example, the positive class in a cancer model might be "tumor." The positive class in an email classification model might be "spam."
Contrast with negative class .
PR AUC (area under the PR curve)
Area under the interpolated precision-recall curve , obtained by plotting (recall, precision) points for different values of the classification threshold .
دقت
A metric for classification models that answers the following question:
When the model predicted the positive class , what percentage of the predictions were correct?
این فرمول است:
کجا:
- true positive means the model correctly predicted the positive class.
- false positive means the model mistakenly predicted the positive class.
For example, suppose a model made 200 positive predictions. Of these 200 positive predictions:
- 150 were true positives.
- 50 were false positives.
در این مورد:
Contrast with accuracy and recall .
See Classification: Accuracy, recall, precision and related metrics in Machine Learning Crash Course for more information.
precision at k (precision@k)
A metric for evaluating a ranked (ordered) list of items. Precision at k identifies the fraction of the first k items in that list that are "relevant." یعنی:
\[\text{precision at k} = \frac{\text{relevant items in first k items of the list}} {\text{k}}\]
The value of k must be less than or equal to the length of the returned list. Note that the length of the returned list is not part of the calculation.
Relevance is often subjective; even expert human evaluators often disagree on which items are relevant.
مقایسه کنید با:
منحنی فراخوان دقیق
A curve of precision versus recall at different classification thresholds .
prediction bias
A value indicating how far apart the average of predictions is from the average of labels in the dataset.
Not to be confused with the bias term in machine learning models or with bias in ethics and fairness .
predictive parity
A fairness metric that checks whether, for a given classifier, the precision rates are equivalent for subgroups under consideration.
For example, a model that predicts college acceptance would satisfy predictive parity for nationality if its precision rate is the same for Lilliputians and Brobdingnagians.
Predictive parity is sometime also called predictive rate parity .
See "Fairness Definitions Explained" (section 3.2.1) for a more detailed discussion of predictive parity.
predictive rate parity
Another name for predictive parity .
تابع چگالی احتمال
A function that identifies the frequency of data samples having exactly a particular value. When a dataset's values are continuous floating-point numbers, exact matches rarely occur. However, integrating a probability density function from value x
to value y
yields the expected frequency of data samples between x
and y
.
For example, consider a normal distribution having a mean of 200 and a standard deviation of 30. To determine the expected frequency of data samples falling within the range 211.4 to 218.7, you can integrate the probability density function for a normal distribution from 211.4 to 218.7.
آر
به یاد بیاور
A metric for classification models that answers the following question:
When ground truth was the positive class , what percentage of predictions did the model correctly identify as the positive class?
این فرمول است:
\[\text{Recall} = \frac{\text{true positives}} {\text{true positives} + \text{false negatives}} \]
کجا:
- true positive means the model correctly predicted the positive class.
- false negative means that the model mistakenly predicted the negative class .
For instance, suppose your model made 200 predictions on examples for which ground truth was the positive class. Of these 200 predictions:
- 180 were true positives.
- 20 were false negatives.
در این مورد:
\[\text{Recall} = \frac{\text{180}} {\text{180} + \text{20}} = 0.9 \]
See Classification: Accuracy, recall, precision and related metrics for more information.
recall at k (recall@k)
A metric for evaluating systems that output a ranked (ordered) list of items. Recall at k identifies the fraction of relevant items in the first k items in that list out of the total number of relevant items returned.
\[\text{recall at k} = \frac{\text{relevant items in first k items of the list}} {\text{total number of relevant items in the list}}\]
Contrast with precision at k .
ROC (receiver operating characteristic) Curve
A graph of true positive rate versus false positive rate for different classification thresholds in binary classification.
The shape of an ROC curve suggests a binary classification model's ability to separate positive classes from negative classes. Suppose, for example, that a binary classification model perfectly separates all the negative classes from all the positive classes:
The ROC curve for the preceding model looks as follows:
In contrast, the following illustration graphs the raw logistic regression values for a terrible model that can't separate negative classes from positive classes at all:
The ROC curve for this model looks as follows:
Meanwhile, back in the real world, most binary classification models separate positive and negative classes to some degree, but usually not perfectly. So, a typical ROC curve falls somewhere between the two extremes:
The point on an ROC curve closest to (0.0,1.0) theoretically identifies the ideal classification threshold. However, several other real-world issues influence the selection of the ideal classification threshold. For example, perhaps false negatives cause far more pain than false positives.
A numerical metric called AUC summarizes the ROC curve into a single floating-point value.
ریشه میانگین مربعات خطا (RMSE)
The square root of the Mean Squared Error .
ROUGE (مطالعه فراخوان یادآوری گرا برای ارزیابی Gisting)
A family of metrics that evaluate automatic summarization and machine translation models. ROUGE metrics determine the degree to which a reference text overlaps an ML model's generated text . Each member of the ROUGE family measures overlap in a different way. Higher ROUGE scores indicate more similarity between the reference text and generated text than lower ROUGE scores.
Each ROUGE family member typically generates the following metrics:
- دقت
- به یاد بیاورید
- F 1
For details and examples, see:
ROUGE-L
A member of the ROUGE family focused on the length of the longest common subsequence in the reference text and generated text . The following formulas calculate recall and precision for ROUGE-L:
You can then use F 1 to roll up ROUGE-L recall and ROUGE-L precision into a single metric:
ROUGE-L ignores any newlines in the reference text and generated text, so the longest common subsequence could cross multiple sentences. When the reference text and generated text involve multiple sentences, a variation of ROUGE-L called ROUGE-Lsum is generally a better metric. ROUGE-Lsum determines the longest common subsequence for each sentence in a passage and then calculates the mean of those longest common subsequences.
ROUGE-N
A set of metrics within the ROUGE family that compares the shared N-grams of a certain size in the reference text and generated text . به عنوان مثال:
- ROUGE-1 measures the number of shared tokens in the reference text and generated text.
- ROUGE-2 measures the number of shared bigrams (2-grams) in the reference text and generated text.
- ROUGE-3 measures the number of shared trigrams (3-grams) in the reference text and generated text.
You can use the following formulas to calculate ROUGE-N recall and ROUGE-N precision for any member of the ROUGE-N family:
You can then use F 1 to roll up ROUGE-N recall and ROUGE-N precision into a single metric:
ROUGE-S
A forgiving form of ROUGE-N that enables skip-gram matching. That is, ROUGE-N only counts N-grams that match exactly , but ROUGE-S also counts N-grams separated by one or more words. برای مثال موارد زیر را در نظر بگیرید:
- reference text : White clouds
- generated text : White billowing clouds
When calculating ROUGE-N, the 2-gram, White clouds doesn't match White billowing clouds . However, when calculating ROUGE-S, White clouds does match White billowing clouds .
R-squared
A regression metric indicating how much variation in a label is due to an individual feature or to a feature set. R-squared is a value between 0 and 1, which you can interpret as follows:
- An R-squared of 0 means that none of a label's variation is due to the feature set.
- An R-squared of 1 means that all of a label's variation is due to the feature set.
- An R-squared between 0 and 1 indicates the extent to which the label's variation can be predicted from a particular feature or the feature set. For example, an R-squared of 0.10 means that 10 percent of the variance in the label is due to the feature set, an R-squared of 0.20 means that 20 percent is due to the feature set, and so on.
R-squared is the square of the Pearson correlation coefficient between the values that a model predicted and ground truth .
اس
به ثمر رساندن
The part of a recommendation system that provides a value or ranking for each item produced by the candidate generation phase.
اندازه گیری شباهت
In clustering algorithms, the metric used to determine how alike (how similar) any two examples are.
پراکندگی
The number of elements set to zero (or null) in a vector or matrix divided by the total number of entries in that vector or matrix. For example, consider a 100-element matrix in which 98 cells contain zero. The calculation of sparsity is as follows:
Feature sparsity refers to the sparsity of a feature vector; model sparsity refers to the sparsity of the model weights.
squared hinge loss
The square of the hinge loss . Squared hinge loss penalizes outliers more harshly than regular hinge loss.
squared loss
Synonym for L 2 loss .
تی
test loss
A metric representing a model's loss against the test set . When building a model , you typically try to minimize test loss. That's because a low test loss is a stronger quality signal than a low training loss or low validation loss .
A large gap between test loss and training loss or validation loss sometimes suggests that you need to increase the regularization rate .
top-k accuracy
The percentage of times that a "target label" appears within the first k positions of generated lists. The lists could be personalized recommendations or a list of items ordered by softmax .
Top-k accuracy is also known as accuracy at k .
سمیت
The degree to which content is abusive, threatening, or offensive. Many machine learning models can identify and measure toxicity. Most of these models identify toxicity along multiple parameters, such as the level of abusive language and the level of threatening language.
training loss
A metric representing a model's loss during a particular training iteration. For example, suppose the loss function is Mean Squared Error . Perhaps the training loss (the Mean Squared Error) for the 10th iteration is 2.2, and the training loss for the 100th iteration is 1.9.
A loss curve plots training loss versus the number of iterations. A loss curve provides the following hints about training:
- A downward slope implies that the model is improving.
- An upward slope implies that the model is getting worse.
- A flat slope implies that the model has reached convergence .
For example, the following somewhat idealized loss curve shows:
- A steep downward slope during the initial iterations, which implies rapid model improvement.
- A gradually flattening (but still downward) slope until close to the end of training, which implies continued model improvement at a somewhat slower pace then during the initial iterations.
- A flat slope towards the end of training, which suggests convergence.
Although training loss is important, see also generalization .
true negative (TN)
An example in which the model correctly predicts the negative class . For example, the model infers that a particular email message is not spam , and that email message really is not spam .
true positive (TP)
An example in which the model correctly predicts the positive class . For example, the model infers that a particular email message is spam, and that email message really is spam.
true positive rate (TPR)
Synonym for recall . یعنی:
True positive rate is the y-axis in an ROC curve .
V
validation loss
A metric representing a model's loss on the validation set during a particular iteration of training.
See also generalization curve .
variable importances
A set of scores that indicates the relative importance of each feature to the model.
For example, consider a decision tree that estimates house prices. Suppose this decision tree uses three features: size, age, and style. If a set of variable importances for the three features are calculated to be {size=5.8, age=2.5, style=4.7}, then size is more important to the decision tree than age or style.
Different variable importance metrics exist, which can inform ML experts about different aspects of models.
دبلیو
Wasserstein loss
One of the loss functions commonly used in generative adversarial networks , based on the earth mover's distance between the distribution of generated data and real data.
،This page contains Metrics glossary terms. For all glossary terms, click here .
الف
دقت
The number of correct classification predictions divided by the total number of predictions. یعنی:
For example, a model that made 40 correct predictions and 10 incorrect predictions would have an accuracy of:
Binary classification provides specific names for the different categories of correct predictions and incorrect predictions . So, the accuracy formula for binary classification is as follows:
کجا:
- TP is the number of true positives (correct predictions).
- TN is the number of true negatives (correct predictions).
- FP is the number of false positives (incorrect predictions).
- FN is the number of false negatives (incorrect predictions).
Compare and contrast accuracy with precision and recall .
See Classification: Accuracy, recall, precision and related metrics in Machine Learning Crash Course for more information.
area under the PR curve
See PR AUC (Area under the PR Curve) .
ناحیه زیر منحنی ROC
See AUC (Area under the ROC curve) .
AUC (Area under the ROC curve)
A number between 0.0 and 1.0 representing a binary classification model's ability to separate positive classes from negative classes . The closer the AUC is to 1.0, the better the model's ability to separate classes from each other.
For example, the following illustration shows a classification model that separates positive classes (green ovals) from negative classes (purple rectangles) perfectly. This unrealistically perfect model has an AUC of 1.0:
Conversely, the following illustration shows the results for a classification model that generated random results. This model has an AUC of 0.5:
Yes, the preceding model has an AUC of 0.5, not 0.0.
Most models are somewhere between the two extremes. For instance, the following model separates positives from negatives somewhat, and therefore has an AUC somewhere between 0.5 and 1.0:
AUC ignores any value you set for classification threshold . Instead, AUC considers all possible classification thresholds.
See Classification: ROC and AUC in Machine Learning Crash Course for more information.
average precision at k
A metric for summarizing a model's performance on a single prompt that generates ranked results, such as a numbered list of book recommendations. Average precision at k is, well, the average of the precision at k values for each relevant result. The formula for average precision at k is therefore:
\[{\text{average precision at k}} = \frac{1}{n} \sum_{i=1}^n {\text{precision at k for each relevant item} } \]
کجا:
- \(n\) is the number of relevant items in the list.
Contrast with recall at k .
ب
خط پایه
A model used as a reference point for comparing how well another model (typically, a more complex one) is performing. For example, a logistic regression model might serve as a good baseline for a deep model .
For a particular problem, the baseline helps model developers quantify the minimal expected performance that a new model must achieve for the new model to be useful.
سی
هزینه
Synonym for loss .
counterfactual fairness
A fairness metric that checks whether a classification model produces the same result for one individual as it does for another individual who is identical to the first, except with respect to one or more sensitive attributes . Evaluating a classification model for counterfactual fairness is one method for surfacing potential sources of bias in a model.
See either of the following for more information:
- Fairness: Counterfactual fairness in Machine Learning Crash Course.
- When Worlds Collide: Integrating Different Counterfactual Assumptions in Fairness
cross-entropy
A generalization of Log Loss to multi-class classification problems . Cross-entropy quantifies the difference between two probability distributions. See also perplexity .
cumulative distribution function (CDF)
A function that defines the frequency of samples less than or equal to a target value. For example, consider a normal distribution of continuous values. A CDF tells you that approximately 50% of samples should be less than or equal to the mean and that approximately 84% of samples should be less than or equal to one standard deviation above the mean.
D
demographic parity
A fairness metric that is satisfied if the results of a model's classification are not dependent on a given sensitive attribute .
For example, if both Lilliputians and Brobdingnagians apply to Glubbdubdrib University, demographic parity is achieved if the percentage of Lilliputians admitted is the same as the percentage of Brobdingnagians admitted, irrespective of whether one group is on average more qualified than the other.
Contrast with equalized odds and equality of opportunity , which permit classification results in aggregate to depend on sensitive attributes, but don't permit classification results for certain specified ground truth labels to depend on sensitive attributes. See "Attacking discrimination with smarter machine learning" for a visualization exploring the tradeoffs when optimizing for demographic parity.
See Fairness: demographic parity in Machine Learning Crash Course for more information.
E
earth mover's distance (EMD)
A measure of the relative similarity of two distributions . The lower the earth mover's distance, the more similar the distributions.
edit distance
A measurement of how similar two text strings are to each other. In machine learning, edit distance is useful for the following reasons:
- Edit distance is easy to compute.
- Edit distance can compare two strings known to be similar to each other.
- Edit distance can determine the degree to which different strings are similar to a given string.
There are several definitions of edit distance, each using different string operations. See Levenshtein distance for an example.
empirical cumulative distribution function (eCDF or EDF)
A cumulative distribution function based on empirical measurements from a real dataset. The value of the function at any point along the x-axis is the fraction of observations in the dataset that are less than or equal to the specified value.
آنتروپی
In information theory , a description of how unpredictable a probability distribution is. Alternatively, entropy is also defined as how much information each example contains. A distribution has the highest possible entropy when all values of a random variable are equally likely.
The entropy of a set with two possible values "0" and "1" (for example, the labels in a binary classification problem) has the following formula:
H = -p log p - q log q = -p log p - (1-p) * log (1-p)
کجا:
- H is the entropy.
- p is the fraction of "1" examples.
- q is the fraction of "0" examples. Note that q = (1 - p)
- log is generally log 2 . In this case, the entropy unit is a bit.
برای مثال موارد زیر را فرض کنید:
- 100 examples contain the value "1"
- 300 examples contain the value "0"
Therefore, the entropy value is:
- p = 0.25
- q = 0.75
- H = (-0.25)log 2 (0.25) - (0.75)log 2 (0.75) = 0.81 bits per example
A set that is perfectly balanced (for example, 200 "0"s and 200 "1"s) would have an entropy of 1.0 bit per example. As a set becomes more imbalanced , its entropy moves towards 0.0.
In decision trees , entropy helps formulate information gain to help the splitter select the conditions during the growth of a classification decision tree.
Compare entropy with:
- ناخالصی جینی
- cross-entropy loss function
Entropy is often called Shannon's entropy .
See Exact splitter for binary classification with numerical features in the Decision Forests course for more information.
برابری فرصت ها
A fairness metric to assess whether a model is predicting the desirable outcome equally well for all values of a sensitive attribute . In other words, if the desirable outcome for a model is the positive class , the goal would be to have the true positive rate be the same for all groups.
Equality of opportunity is related to equalized odds , which requires that both the true positive rates and false positive rates are the same for all groups.
Suppose Glubbdubdrib University admits both Lilliputians and Brobdingnagians to a rigorous mathematics program. Lilliputians' secondary schools offer a robust curriculum of math classes, and the vast majority of students are qualified for the university program. Brobdingnagians' secondary schools don't offer math classes at all, and as a result, far fewer of their students are qualified. Equality of opportunity is satisfied for the preferred label of "admitted" with respect to nationality (Lilliputian or Brobdingnagian) if qualified students are equally likely to be admitted irrespective of whether they're a Lilliputian or a Brobdingnagian.
For example, suppose 100 Lilliputians and 100 Brobdingnagians apply to Glubbdubdrib University, and admissions decisions are made as follows:
Table 1. Lilliputian applicants (90% are qualified)
واجد شرایط | فاقد صلاحیت | |
---|---|---|
پذیرفته شد | 45 | 3 |
رد شد | 45 | 7 |
مجموع | 90 | 10 |
Percentage of qualified students admitted: 45/90 = 50% Percentage of unqualified students rejected: 7/10 = 70% Total percentage of Lilliputian students admitted: (45+3)/100 = 48% |
Table 2. Brobdingnagian applicants (10% are qualified):
واجد شرایط | فاقد صلاحیت | |
---|---|---|
پذیرفته شد | 5 | 9 |
رد شد | 5 | 81 |
مجموع | 10 | 90 |
Percentage of qualified students admitted: 5/10 = 50% Percentage of unqualified students rejected: 81/90 = 90% Total percentage of Brobdingnagian students admitted: (5+9)/100 = 14% |
The preceding examples satisfy equality of opportunity for acceptance of qualified students because qualified Lilliputians and Brobdingnagians both have a 50% chance of being admitted.
While equality of opportunity is satisfied, the following two fairness metrics are not satisfied:
- demographic parity : Lilliputians and Brobdingnagians are admitted to the university at different rates; 48% of Lilliputians students are admitted, but only 14% of Brobdingnagian students are admitted.
- equalized odds : While qualified Lilliputian and Brobdingnagian students both have the same chance of being admitted, the additional constraint that unqualified Lilliputians and Brobdingnagians both have the same chance of being rejected is not satisfied. Unqualified Lilliputians have a 70% rejection rate, whereas unqualified Brobdingnagians have a 90% rejection rate.
See Fairness: Equality of opportunity in Machine Learning Crash Course for more information.
equalized odds
A fairness metric to assess whether a model is predicting outcomes equally well for all values of a sensitive attribute with respect to both the positive class and negative class —not just one class or the other exclusively. In other words, both the true positive rate and false negative rate should be the same for all groups.
Equalized odds is related to equality of opportunity , which only focuses on error rates for a single class (positive or negative).
For example, suppose Glubbdubdrib University admits both Lilliputians and Brobdingnagians to a rigorous mathematics program. Lilliputians' secondary schools offer a robust curriculum of math classes, and the vast majority of students are qualified for the university program. Brobdingnagians' secondary schools don't offer math classes at all, and as a result, far fewer of their students are qualified. Equalized odds is satisfied provided that no matter whether an applicant is a Lilliputian or a Brobdingnagian, if they are qualified, they are equally as likely to get admitted to the program, and if they are not qualified, they are equally as likely to get rejected.
Suppose 100 Lilliputians and 100 Brobdingnagians apply to Glubbdubdrib University, and admissions decisions are made as follows:
Table 3. Lilliputian applicants (90% are qualified)
واجد شرایط | فاقد صلاحیت | |
---|---|---|
پذیرفته شد | 45 | 2 |
رد شد | 45 | 8 |
مجموع | 90 | 10 |
Percentage of qualified students admitted: 45/90 = 50% Percentage of unqualified students rejected: 8/10 = 80% Total percentage of Lilliputian students admitted: (45+2)/100 = 47% |
Table 4. Brobdingnagian applicants (10% are qualified):
واجد شرایط | فاقد صلاحیت | |
---|---|---|
پذیرفته شد | 5 | 18 |
رد شد | 5 | 72 |
مجموع | 10 | 90 |
Percentage of qualified students admitted: 5/10 = 50% Percentage of unqualified students rejected: 72/90 = 80% Total percentage of Brobdingnagian students admitted: (5+18)/100 = 23% |
Equalized odds is satisfied because qualified Lilliputian and Brobdingnagian students both have a 50% chance of being admitted, and unqualified Lilliputian and Brobdingnagian have an 80% chance of being rejected.
Equalized odds is formally defined in "Equality of Opportunity in Supervised Learning" as follows: "predictor Ŷ satisfies equalized odds with respect to protected attribute A and outcome Y if Ŷ and A are independent, conditional on Y."
evals
Primarily used as an abbreviation for LLM evaluations . More broadly, evals is an abbreviation for any form of evaluation .
ارزیابی
The process of measuring a model's quality or comparing different models against each other.
To evaluate a supervised machine learning model, you typically judge it against a validation set and a test set . Evaluating a LLM typically involves broader quality and safety assessments.
اف
F 1
A "roll-up" binary classification metric that relies on both precision and recall . این فرمول است:
fairness metric
A mathematical definition of "fairness" that is measurable. Some commonly used fairness metrics include:
Many fairness metrics are mutually exclusive; see incompatibility of fairness metrics .
false negative (FN)
An example in which the model mistakenly predicts the negative class . For example, the model predicts that a particular email message is not spam (the negative class), but that email message actually is spam .
false negative rate
The proportion of actual positive examples for which the model mistakenly predicted the negative class. The following formula calculates the false negative rate:
See Thresholds and the confusion matrix in Machine Learning Crash Course for more information.
false positive (FP)
An example in which the model mistakenly predicts the positive class . For example, the model predicts that a particular email message is spam (the positive class), but that email message is actually not spam .
See Thresholds and the confusion matrix in Machine Learning Crash Course for more information.
false positive rate (FPR)
The proportion of actual negative examples for which the model mistakenly predicted the positive class. The following formula calculates the false positive rate:
The false positive rate is the x-axis in an ROC curve .
See Classification: ROC and AUC in Machine Learning Crash Course for more information.
اهمیت ویژگی ها
Synonym for variable importances .
fraction of successes
A metric for evaluating an ML model's generated text . The fraction of successes is the number of "successful" generated text outputs divided by the total number of generated text outputs. For example, if a large language model generated 10 blocks of code, five of which were successful, then the fraction of successes would be 50%.
Although fraction of successes is broadly useful throughout statistics, within ML, this metric is primarily useful for measuring verifiable tasks like code generation or math problems.
جی
ناخالصی جینی
A metric similar to entropy . Splitters use values derived from either gini impurity or entropy to compose conditions for classification decision trees . Information gain is derived from entropy. There is no universally accepted equivalent term for the metric derived from gini impurity; however, this unnamed metric is just as important as information gain.
Gini impurity is also called gini index , or simply gini .
اچ
hinge loss
A family of loss functions for classification designed to find the decision boundary as distant as possible from each training example, thus maximizing the margin between examples and the boundary. KSVMs use hinge loss (or a related function, such as squared hinge loss). For binary classification, the hinge loss function is defined as follows:
where y is the true label, either -1 or +1, and y' is the raw output of the classification model :
Consequently, a plot of hinge loss versus (y * y') looks as follows:
من
incompatibility of fairness metrics
The idea that some notions of fairness are mutually incompatible and cannot be satisfied simultaneously. As a result, there is no single universal metric for quantifying fairness that can be applied to all ML problems.
While this may seem discouraging, incompatibility of fairness metrics doesn't imply that fairness efforts are fruitless. Instead, it suggests that fairness must be defined contextually for a given ML problem, with the goal of preventing harms specific to its use cases.
See "On the (im)possibility of fairness" for a more detailed discussion of the incompatibility of fairness metrics.
individual fairness
A fairness metric that checks whether similar individuals are classified similarly. For example, Brobdingnagian Academy might want to satisfy individual fairness by ensuring that two students with identical grades and standardized test scores are equally likely to gain admission.
Note that individual fairness relies entirely on how you define "similarity" (in this case, grades and test scores), and you can run the risk of introducing new fairness problems if your similarity metric misses important information (such as the rigor of a student's curriculum).
See "Fairness Through Awareness" for a more detailed discussion of individual fairness.
information gain
In decision forests , the difference between a node's entropy and the weighted (by number of examples) sum of the entropy of its children nodes. A node's entropy is the entropy of the examples in that node.
For example, consider the following entropy values:
- entropy of parent node = 0.6
- entropy of one child node with 16 relevant examples = 0.2
- entropy of another child node with 24 relevant examples = 0.1
So 40% of the examples are in one child node and 60% are in the other child node. بنابراین:
- weighted entropy sum of child nodes = (0.4 * 0.2) + (0.6 * 0.1) = 0.14
So, the information gain is:
- information gain = entropy of parent node - weighted entropy sum of child nodes
- information gain = 0.6 - 0.14 = 0.46
Most splitters seek to create conditions that maximize information gain.
inter-rater agreement
A measurement of how often human raters agree when doing a task. If raters disagree, the task instructions may need to be improved. Also sometimes called inter-annotator agreement or inter-rater reliability . See also Cohen's kappa , which is one of the most popular inter-rater agreement measurements.
See Categorical data: Common issues in Machine Learning Crash Course for more information.
L
L 1 loss
A loss function that calculates the absolute value of the difference between actual label values and the values that a model predicts. For example, here's the calculation of L 1 loss for a batch of five examples :
Actual value of example | Model's predicted value | Absolute value of delta |
---|---|---|
7 | 6 | 1 |
5 | 4 | 1 |
8 | 11 | 3 |
4 | 6 | 2 |
9 | 8 | 1 |
8 = L 1 loss |
L 1 loss is less sensitive to outliers than L 2 loss .
The Mean Absolute Error is the average L 1 loss per example.
See Linear regression: Loss in Machine Learning Crash Course for more information.
L 2 loss
A loss function that calculates the square of the difference between actual label values and the values that a model predicts. For example, here's the calculation of L 2 loss for a batch of five examples :
Actual value of example | Model's predicted value | Square of delta |
---|---|---|
7 | 6 | 1 |
5 | 4 | 1 |
8 | 11 | 9 |
4 | 6 | 4 |
9 | 8 | 1 |
16 = L 2 loss |
Due to squaring, L 2 loss amplifies the influence of outliers . That is, L 2 loss reacts more strongly to bad predictions than L 1 loss . For example, the L 1 loss for the preceding batch would be 8 rather than 16. Notice that a single outlier accounts for 9 of the 16.
Regression models typically use L 2 loss as the loss function.
The Mean Squared Error is the average L 2 loss per example. Squared loss is another name for L 2 loss.
See Logistic regression: Loss and regularization in Machine Learning Crash Course for more information.
LLM evaluations (evals)
A set of metrics and benchmarks for assessing the performance of large language models (LLMs). At a high level, LLM evaluations:
- Help researchers identify areas where LLMs need improvement.
- Are useful in comparing different LLMs and identifying the best LLM for a particular task.
- Help ensure that LLMs are safe and ethical to use.
See Large language models (LLMs) in Machine Learning Crash Course for more information.
از دست دادن
During the training of a supervised model , a measure of how far a model's prediction is from its label .
A loss function calculates the loss.
See Linear regression: Loss in Machine Learning Crash Course for more information.
عملکرد از دست دادن
During training or testing, a mathematical function that calculates the loss on a batch of examples. A loss function returns a lower loss for models that makes good predictions than for models that make bad predictions.
The goal of training is typically to minimize the loss that a loss function returns.
Many different kinds of loss functions exist. Pick the appropriate loss function for the kind of model you are building. به عنوان مثال:
- L 2 loss (or Mean Squared Error ) is the loss function for linear regression .
- Log Loss is the loss function for logistic regression .
م
میانگین خطای مطلق (MAE)
The average loss per example when L 1 loss is used. Calculate Mean Absolute Error as follows:
- Calculate the L 1 loss for a batch.
- Divide the L 1 loss by the number of examples in the batch.
For example, consider the calculation of L 1 loss on the following batch of five examples:
Actual value of example | Model's predicted value | Loss (difference between actual and predicted) |
---|---|---|
7 | 6 | 1 |
5 | 4 | 1 |
8 | 11 | 3 |
4 | 6 | 2 |
9 | 8 | 1 |
8 = L 1 loss |
So, L 1 loss is 8 and the number of examples is 5. Therefore, the Mean Absolute Error is:
Mean Absolute Error = L1 loss / Number of Examples Mean Absolute Error = 8/5 = 1.6
Contrast Mean Absolute Error with Mean Squared Error and Root Mean Squared Error .
mean average precision at k (mAP@k)
The statistical mean of all average precision at k scores across a validation dataset. One use of mean average precision at k is to judge the quality of recommendations generated by a recommendation system .
Although the phrase "mean average" sounds redundant, the name of the metric is appropriate. After all, this metric finds the mean of multiple average precision at k values.
میانگین مربعات خطا (MSE)
The average loss per example when L 2 loss is used. Calculate Mean Squared Error as follows:
- Calculate the L 2 loss for a batch.
- Divide the L 2 loss by the number of examples in the batch.
For example, consider the loss on the following batch of five examples:
ارزش واقعی | Model's prediction | از دست دادن | Squared loss |
---|---|---|---|
7 | 6 | 1 | 1 |
5 | 4 | 1 | 1 |
8 | 11 | 3 | 9 |
4 | 6 | 2 | 4 |
9 | 8 | 1 | 1 |
16 = L 2 loss |
Therefore, the Mean Squared Error is:
Mean Squared Error = L2 loss / Number of Examples Mean Squared Error = 16/5 = 3.2
Mean Squared Error is a popular training optimizer , particularly for linear regression .
Contrast Mean Squared Error with Mean Absolute Error and Root Mean Squared Error .
TensorFlow Playground uses Mean Squared Error to calculate loss values.
متریک
A statistic that you care about.
An objective is a metric that a machine learning system tries to optimize.
Metrics API (tf.metrics)
A TensorFlow API for evaluating models. For example, tf.metrics.accuracy
determines how often a model's predictions match labels.
minimax loss
A loss function for generative adversarial networks , based on the cross-entropy between the distribution of generated data and real data.
Minimax loss is used in the first paper to describe generative adversarial networks.
See Loss Functions in the Generative Adversarial Networks course for more information.
model capacity
The complexity of problems that a model can learn. The more complex the problems that a model can learn, the higher the model's capacity. A model's capacity typically increases with the number of model parameters. For a formal definition of classification model capacity, see VC dimension .
ن
negative class
In binary classification , one class is termed positive and the other is termed negative . The positive class is the thing or event that the model is testing for and the negative class is the other possibility. به عنوان مثال:
- The negative class in a medical test might be "not tumor."
- The negative class in an email classification model might be "not spam."
Contrast with positive class .
O
هدف
A metric that your algorithm is trying to optimize.
تابع هدف
The mathematical formula or metric that a model aims to optimize. For example, the objective function for linear regression is usually Mean Squared Loss . Therefore, when training a linear regression model, training aims to minimize Mean Squared Loss.
In some cases, the goal is to maximize the objective function. For example, if the objective function is accuracy, the goal is to maximize accuracy.
See also loss .
پ
pass at k (pass@k)
A metric to determine the quality of code (for example, Python) that a large language model generates. More specifically, pass at k tells you the likelihood that at least one generated block of code out of k generated blocks of code will pass all of its unit tests.
Large language models often struggle to generate good code for complex programming problems. Software engineers adapt to this problem by prompting the large language model to generate multiple ( k ) solutions for the same problem. Then, software engineers test each of the solutions against unit tests. The calculation of pass at k depends on the outcome of the unit tests:
- If one or more of those solutions pass the unit test, then the LLM Passes that code generation challenge.
- If none of the solutions pass the unit test, then the LLM Fails that code generation challenge.
The formula for pass at k is as follows:
\[\text{pass at k} = \frac{\text{total number of passes}} {\text{total number of challenges}}\]
In general, higher values of k produce higher pass at k scores; however, higher values of k require more large language model and unit testing resources.
عملکرد
Overloaded term with the following meanings:
- The standard meaning within software engineering. Namely: How fast (or efficiently) does this piece of software run?
- The meaning within machine learning. Here, performance answers the following question: How correct is this model ? That is, how good are the model's predictions?
permutation variable importances
A type of variable importance that evaluates the increase in the prediction error of a model after permuting the feature's values. Permutation variable importance is a model-independent metric.
گیجی
One measure of how well a model is accomplishing its task. For example, suppose your task is to read the first few letters of a word a user is typing on a phone keyboard, and to offer a list of possible completion words. Perplexity, P, for this task is approximately the number of guesses you need to offer in order for your list to contain the actual word the user is trying to type.
Perplexity is related to cross-entropy as follows:
positive class
The class you are testing for.
For example, the positive class in a cancer model might be "tumor." The positive class in an email classification model might be "spam."
Contrast with negative class .
PR AUC (area under the PR curve)
Area under the interpolated precision-recall curve , obtained by plotting (recall, precision) points for different values of the classification threshold .
دقت
A metric for classification models that answers the following question:
When the model predicted the positive class , what percentage of the predictions were correct?
این فرمول است:
کجا:
- true positive means the model correctly predicted the positive class.
- false positive means the model mistakenly predicted the positive class.
For example, suppose a model made 200 positive predictions. Of these 200 positive predictions:
- 150 were true positives.
- 50 were false positives.
در این مورد:
Contrast with accuracy and recall .
See Classification: Accuracy, recall, precision and related metrics in Machine Learning Crash Course for more information.
precision at k (precision@k)
A metric for evaluating a ranked (ordered) list of items. Precision at k identifies the fraction of the first k items in that list that are "relevant." یعنی:
\[\text{precision at k} = \frac{\text{relevant items in first k items of the list}} {\text{k}}\]
The value of k must be less than or equal to the length of the returned list. Note that the length of the returned list is not part of the calculation.
Relevance is often subjective; even expert human evaluators often disagree on which items are relevant.
مقایسه کنید با:
منحنی فراخوان دقیق
A curve of precision versus recall at different classification thresholds .
prediction bias
A value indicating how far apart the average of predictions is from the average of labels in the dataset.
Not to be confused with the bias term in machine learning models or with bias in ethics and fairness .
predictive parity
A fairness metric that checks whether, for a given classifier, the precision rates are equivalent for subgroups under consideration.
For example, a model that predicts college acceptance would satisfy predictive parity for nationality if its precision rate is the same for Lilliputians and Brobdingnagians.
Predictive parity is sometime also called predictive rate parity .
See "Fairness Definitions Explained" (section 3.2.1) for a more detailed discussion of predictive parity.
predictive rate parity
Another name for predictive parity .
تابع چگالی احتمال
A function that identifies the frequency of data samples having exactly a particular value. When a dataset's values are continuous floating-point numbers, exact matches rarely occur. However, integrating a probability density function from value x
to value y
yields the expected frequency of data samples between x
and y
.
For example, consider a normal distribution having a mean of 200 and a standard deviation of 30. To determine the expected frequency of data samples falling within the range 211.4 to 218.7, you can integrate the probability density function for a normal distribution from 211.4 to 218.7.
آر
به یاد بیاور
A metric for classification models that answers the following question:
When ground truth was the positive class , what percentage of predictions did the model correctly identify as the positive class?
این فرمول است:
\[\text{Recall} = \frac{\text{true positives}} {\text{true positives} + \text{false negatives}} \]
کجا:
- true positive means the model correctly predicted the positive class.
- false negative means that the model mistakenly predicted the negative class .
For instance, suppose your model made 200 predictions on examples for which ground truth was the positive class. Of these 200 predictions:
- 180 were true positives.
- 20 were false negatives.
در این مورد:
\[\text{Recall} = \frac{\text{180}} {\text{180} + \text{20}} = 0.9 \]
See Classification: Accuracy, recall, precision and related metrics for more information.
recall at k (recall@k)
A metric for evaluating systems that output a ranked (ordered) list of items. Recall at k identifies the fraction of relevant items in the first k items in that list out of the total number of relevant items returned.
\[\text{recall at k} = \frac{\text{relevant items in first k items of the list}} {\text{total number of relevant items in the list}}\]
Contrast with precision at k .
ROC (receiver operating characteristic) Curve
A graph of true positive rate versus false positive rate for different classification thresholds in binary classification.
The shape of an ROC curve suggests a binary classification model's ability to separate positive classes from negative classes. Suppose, for example, that a binary classification model perfectly separates all the negative classes from all the positive classes:
The ROC curve for the preceding model looks as follows:
In contrast, the following illustration graphs the raw logistic regression values for a terrible model that can't separate negative classes from positive classes at all:
The ROC curve for this model looks as follows:
Meanwhile, back in the real world, most binary classification models separate positive and negative classes to some degree, but usually not perfectly. So, a typical ROC curve falls somewhere between the two extremes:
The point on an ROC curve closest to (0.0,1.0) theoretically identifies the ideal classification threshold. However, several other real-world issues influence the selection of the ideal classification threshold. For example, perhaps false negatives cause far more pain than false positives.
A numerical metric called AUC summarizes the ROC curve into a single floating-point value.
ریشه میانگین مربعات خطا (RMSE)
The square root of the Mean Squared Error .
ROUGE (مطالعه فراخوان یادآوری گرا برای ارزیابی Gisting)
A family of metrics that evaluate automatic summarization and machine translation models. ROUGE metrics determine the degree to which a reference text overlaps an ML model's generated text . Each member of the ROUGE family measures overlap in a different way. Higher ROUGE scores indicate more similarity between the reference text and generated text than lower ROUGE scores.
Each ROUGE family member typically generates the following metrics:
- دقت
- به یاد بیاورید
- F 1
For details and examples, see:
ROUGE-L
A member of the ROUGE family focused on the length of the longest common subsequence in the reference text and generated text . The following formulas calculate recall and precision for ROUGE-L:
You can then use F 1 to roll up ROUGE-L recall and ROUGE-L precision into a single metric:
ROUGE-L ignores any newlines in the reference text and generated text, so the longest common subsequence could cross multiple sentences. When the reference text and generated text involve multiple sentences, a variation of ROUGE-L called ROUGE-Lsum is generally a better metric. ROUGE-Lsum determines the longest common subsequence for each sentence in a passage and then calculates the mean of those longest common subsequences.
ROUGE-N
A set of metrics within the ROUGE family that compares the shared N-grams of a certain size in the reference text and generated text . به عنوان مثال:
- ROUGE-1 measures the number of shared tokens in the reference text and generated text.
- ROUGE-2 measures the number of shared bigrams (2-grams) in the reference text and generated text.
- ROUGE-3 measures the number of shared trigrams (3-grams) in the reference text and generated text.
You can use the following formulas to calculate ROUGE-N recall and ROUGE-N precision for any member of the ROUGE-N family:
You can then use F 1 to roll up ROUGE-N recall and ROUGE-N precision into a single metric:
ROUGE-S
A forgiving form of ROUGE-N that enables skip-gram matching. That is, ROUGE-N only counts N-grams that match exactly , but ROUGE-S also counts N-grams separated by one or more words. برای مثال موارد زیر را در نظر بگیرید:
- reference text : White clouds
- generated text : White billowing clouds
When calculating ROUGE-N, the 2-gram, White clouds doesn't match White billowing clouds . However, when calculating ROUGE-S, White clouds does match White billowing clouds .
R-squared
A regression metric indicating how much variation in a label is due to an individual feature or to a feature set. R-squared is a value between 0 and 1, which you can interpret as follows:
- An R-squared of 0 means that none of a label's variation is due to the feature set.
- An R-squared of 1 means that all of a label's variation is due to the feature set.
- An R-squared between 0 and 1 indicates the extent to which the label's variation can be predicted from a particular feature or the feature set. For example, an R-squared of 0.10 means that 10 percent of the variance in the label is due to the feature set, an R-squared of 0.20 means that 20 percent is due to the feature set, and so on.
R-squared is the square of the Pearson correlation coefficient between the values that a model predicted and ground truth .
اس
به ثمر رساندن
The part of a recommendation system that provides a value or ranking for each item produced by the candidate generation phase.
اندازه گیری شباهت
In clustering algorithms, the metric used to determine how alike (how similar) any two examples are.
پراکندگی
The number of elements set to zero (or null) in a vector or matrix divided by the total number of entries in that vector or matrix. For example, consider a 100-element matrix in which 98 cells contain zero. The calculation of sparsity is as follows:
Feature sparsity refers to the sparsity of a feature vector; model sparsity refers to the sparsity of the model weights.
squared hinge loss
The square of the hinge loss . Squared hinge loss penalizes outliers more harshly than regular hinge loss.
squared loss
Synonym for L 2 loss .
تی
test loss
A metric representing a model's loss against the test set . When building a model , you typically try to minimize test loss. That's because a low test loss is a stronger quality signal than a low training loss or low validation loss .
A large gap between test loss and training loss or validation loss sometimes suggests that you need to increase the regularization rate .
top-k accuracy
The percentage of times that a "target label" appears within the first k positions of generated lists. The lists could be personalized recommendations or a list of items ordered by softmax .
Top-k accuracy is also known as accuracy at k .
سمیت
The degree to which content is abusive, threatening, or offensive. Many machine learning models can identify and measure toxicity. Most of these models identify toxicity along multiple parameters, such as the level of abusive language and the level of threatening language.
training loss
A metric representing a model's loss during a particular training iteration. For example, suppose the loss function is Mean Squared Error . Perhaps the training loss (the Mean Squared Error) for the 10th iteration is 2.2, and the training loss for the 100th iteration is 1.9.
A loss curve plots training loss versus the number of iterations. A loss curve provides the following hints about training:
- A downward slope implies that the model is improving.
- An upward slope implies that the model is getting worse.
- A flat slope implies that the model has reached convergence .
For example, the following somewhat idealized loss curve shows:
- A steep downward slope during the initial iterations, which implies rapid model improvement.
- A gradually flattening (but still downward) slope until close to the end of training, which implies continued model improvement at a somewhat slower pace then during the initial iterations.
- A flat slope towards the end of training, which suggests convergence.
Although training loss is important, see also generalization .
true negative (TN)
An example in which the model correctly predicts the negative class . For example, the model infers that a particular email message is not spam , and that email message really is not spam .
true positive (TP)
An example in which the model correctly predicts the positive class . For example, the model infers that a particular email message is spam, and that email message really is spam.
true positive rate (TPR)
Synonym for recall . یعنی:
True positive rate is the y-axis in an ROC curve .
V
validation loss
A metric representing a model's loss on the validation set during a particular iteration of training.
See also generalization curve .
variable importances
A set of scores that indicates the relative importance of each feature to the model.
For example, consider a decision tree that estimates house prices. Suppose this decision tree uses three features: size, age, and style. If a set of variable importances for the three features are calculated to be {size=5.8, age=2.5, style=4.7}, then size is more important to the decision tree than age or style.
Different variable importance metrics exist, which can inform ML experts about different aspects of models.
دبلیو
Wasserstein loss
One of the loss functions commonly used in generative adversarial networks , based on the earth mover's distance between the distribution of generated data and real data.