{"id":1838,"date":"2022-05-10T04:17:02","date_gmt":"2022-05-10T04:17:02","guid":{"rendered":"https:\/\/topviecit.vn\/blog\/?p=1838"},"modified":"2022-11-25T02:01:56","modified_gmt":"2022-11-25T02:01:56","slug":"loss-function-la-gi","status":"publish","type":"post","link":"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/","title":{"rendered":"Loss function l\u00e0 g\u00ec? T\u00ecm hi\u1ec3u chi ti\u1ebft v\u1ec1 Loss function"},"content":{"rendered":"\n<p>N\u1ebfu \u0111\u00e3 t\u00ecm hi\u1ec3u v\u1ec1 machine learning, ch\u1eafc b\u1ea1n c\u0169ng kh\u00f4ng c\u00f2n xa l\u1ea1 v\u1edbi kh\u00e1i ni\u1ec7m Loss function. Nh\u01b0ng th\u1ef1c th\u1ebf kh\u00f4ng c\u00f3 nhi\u1ec1u ng\u01b0\u1eddi hi\u1ec3u \u0111\u01b0\u1ee3c c\u1ee5 th\u1ec3 <strong><a href=\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/\" target=\"_blank\" rel=\"noreferrer noopener\">Loss function l\u00e0 g\u00ec<\/a><\/strong>? Nh\u1eefng th\u00f4ng tin li\u00ean quan t\u1edbi Loss function? Trong b\u00e0i vi\u1ebft ng\u00e0y h\u00f4m nay h\u00e3y c\u00f9ng <strong><a href=\"https:\/\/topviecit.vn\/\" target=\"_blank\" rel=\"noreferrer noopener\">topviecit.vn<\/a><\/strong> t\u00ecm hi\u1ec3u c\u00e2u tr\u1ea3 l\u1eddi cho c\u00e2u h\u1ecfi n\u00e0y nh\u00e9!<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_63 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#Loss_function_la_gi\" title=\"Loss function l\u00e0 g\u00ec?\">Loss function l\u00e0 g\u00ec?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#Cach_xay_dung_Loss_function_la_gi\" title=\"C\u00e1ch x\u00e2y d\u1ef1ng Loss function l\u00e0 g\u00ec?\">C\u00e1ch x\u00e2y d\u1ef1ng Loss function l\u00e0 g\u00ec?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#Mot_so_loss_function_co_ban_danh_cho_binary_classification\" title=\"M\u1ed9t s\u1ed1 loss function c\u01a1 b\u1ea3n d\u00e0nh cho binary classification\">M\u1ed9t s\u1ed1 loss function c\u01a1 b\u1ea3n d\u00e0nh cho binary classification<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#0-1_loss\" title=\"0-1 loss\">0-1 loss<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#Perceptron_loss\" title=\"Perceptron loss\">Perceptron loss<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#Hinge_loss\" title=\"Hinge loss\">Hinge loss<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#Logistic_loss_hay_log_loss\" title=\"Logistic loss (hay log loss)\">Logistic loss (hay log loss)<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Loss_function_la_gi\"><\/span><strong>Loss function l\u00e0 g\u00ec?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Loss function l\u00e0 g\u00ec? Loss function \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 h\u00e0m m\u1ea5t m\u00e1t trong ti\u1ebfng Vi\u1ec7t, n\u00f3 th\u1ec3 hi\u1ec7n m\u1ed1i quan h\u1ec7 gi\u1eefa y (l\u00e0 gi\u00e1 tr\u1ecb th\u1ef1c t\u1ebf) v\u00e0&nbsp; y* (l\u00e0 k\u1ebft qu\u1ea3 d\u1ef1 \u0111o\u00e1n c\u1ee7a model). C\u1ee5 th\u1ec3 h\u00e0m m\u1ea5t m\u00e1t s\u1ebd c\u00f3 d\u1ea1ng nh\u01b0 sau: f(y) = (y* &#8211; y)^2.<\/p>\n\n\n\n<p>\u1ede c\u00e1c thu\u1eadt to\u00e1n t\u00ecm ki\u1ebfm c\u1ee7a tr\u00ed tu\u1ec7 nh\u00e2n t\u1ea1o c\u1ed5 \u0111i\u1ec3n, h\u00e0m loss \u0111\u01b0\u1ee3c coi l\u00e0 m\u1ed9t h\u00e0m m\u1ee5c ti\u00eau c\u1ee7a qu\u00e1 tr\u00ecnh t\u00ecm ki\u1ebfm gi\u00fap th\u1ef1c hi\u1ec7n c\u00e1c thay \u0111\u1ed5i hay ph\u01b0\u01a1ng ph\u00e1p di chuy\u1ec3n sao cho h\u00e0m m\u1ee5c ti\u00eau c\u00f3 gi\u00e1 tr\u1ecb nh\u1ecf nh\u1ea5t ho\u1eb7c ch\u1ea5p nh\u1eadn \u0111\u01b0\u1ee3c.<\/p>\n\n\n\n<p>Trong l\u0129nh v\u1ef1c h\u1ecdc m\u00e1y ham \u0111\u01b0\u1ee3c \u0111\u01b0a v\u00e0o v\u1edbi m\u1ee5c \u0111\u00edch l\u00e0 \u0111\u1ec3 t\u1ed1i \u01b0u t\u1ed1i \u01b0u t\u1ed1i nh\u1ea5t model c\u1ee7a m\u00ecnh, \u0111\u1ed3ng th\u1eddi c\u0169ng l\u00e0 \u0111\u1ec3 \u0111\u00e1nh gi\u00e1 \u0111\u1ed9 t\u1ed1t c\u1ee7a model ( y* c\u00e0ng g\u1ea7n y th\u00ec c\u00e0ng t\u1ed1t).<\/p>\n\n\n\n<p>Hi\u1ec3u \u0111\u01a1n gi\u1ea3n ch\u00ednh l\u00e0 d\u1ef1a v\u00e0o h\u00e0m m\u1ea5t m\u00e1t ta c\u00f3 th\u1ec3 t\u00ednh ra gradient descent nh\u1eb1m m\u1ee5c \u0111\u00edch t\u1ed1i \u01b0u loss function c\u00e0ng v\u1ec1 g\u1ea7n 0 c\u00e0ng t\u1ed1t.&nbsp;<\/p>\n\n\n\n<p><strong>T\u00ecm hi\u1ec3u th\u00eam: <a href=\"https:\/\/topviecit.vn\/blog\/hadoop-la-gi\/\" target=\"_blank\" rel=\"noreferrer noopener\">Hadoop L\u00e0 G\u00ec? T\u00ecm Hi\u1ec3u Chi Ti\u1ebft V\u1ec1 HDFS<\/a><\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"500\" src=\"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/image-3.png\" alt=\"Loss function l\u00e0 g\u00ec? \" class=\"wp-image-1854\" title=\"Loss function l\u00e0 g\u00ec? \" srcset=\"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/image-3.png 800w, https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/image-3-640x400.png 640w, https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/image-3-768x480.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption class=\"wp-element-caption\"><em>Loss function l\u00e0 g\u00ec?&nbsp;<\/em><\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Cach_xay_dung_Loss_function_la_gi\"><\/span><strong>C\u00e1ch x\u00e2y d\u1ef1ng Loss function l\u00e0 g\u00ec?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>C\u00e1ch x\u00e2y d\u1ef1ng Loss function l\u00e0 g\u00ec? Loss function \u0111\u01b0\u1ee3c d\u00f9ng \u0111\u1ec3 \u0111o \u0111\u1ea1c ch\u00eanh l\u1ec7ch gi\u1eefa $$y$$ v\u00e0 $$\\hat{y}$$, s\u1ef1 ch\u00eanh l\u1ec7ch ch\u00ednh l\u00e0 hi\u1ec7u c\u1ee7a ch\u00fang.&nbsp;<\/p>\n\n\n\n<p>C\u1ee5 th\u1ec3, $$ L(\\hat{y}, y) = \\hat{y} \\ &#8211; \\ y<\/p>\n\n\n\n<p>$$<\/p>\n\n\n\n<p>Th\u1ef1c t\u1ebf h\u00e0m n\u00e0y l\u1ea1i kh\u00f4ng \u0111\u00e1p \u1ee9ng \u0111\u01b0\u1ee3c t\u00ednh ch\u1ea5t kh\u00f4ng \u00e2m c\u1ee7a m\u1ed9t loss function. Do v\u1eady ta ph\u1ea3i l\u1ea5y gi\u00e1 tr\u1ecb tuy\u1ec7t \u0111\u1ed1i c\u1ee7a hi\u1ec7u n\u00e0y:<\/p>\n\n\n\n<p>$$ L(\\hat{y}, y) = |\\hat{y} &#8211; y|<\/p>\n\n\n\n<p>$$<\/p>\n\n\n\n<p>Hi\u1ec7u n\u00e0y th\u1ecfa m\u00e3n t\u00ednh ch\u1ea5t kh\u00f4ng \u00e2m, nh\u01b0ng l\u1ea1i kh\u00f4ng d\u1ec5 \u0111\u1ec3 c\u1ef1c ti\u1ec3u h\u00f3a, l\u00fd do l\u00e0 b\u1edfi \u0111\u1ea1o h\u00e0m c\u1ee7a n\u00f3 kh\u00f4ng li\u00ean t\u1ee5c ( \u0111\u1ea1o h\u00e0m c\u1ee7a $$f(x) = |x|$$ \u0111\u1ee9t qu\u00e3ng t\u1ea1i $$x = 0$$), trong khi c\u00e1c ph\u01b0\u01a1ng ph\u00e1p c\u1ef1c ti\u1ec3u h\u00f3a h\u00e0m s\u1ed1 th\u00f4ng d\u1ee5ng l\u1ea1i ho\u00e0n to\u00e0n c\u00f3 th\u1ec3 t\u00ednh \u0111\u01b0\u1ee3c \u0111\u1ea1o h\u00e0m. Ch\u00fang ta c\u00f2n c\u00f3 m\u1ed9t ph\u01b0\u01a1ng ph\u00e1p t\u00ednh kh\u00e1c \u0111\u00f3 l\u00e0 b\u00ecnh ph\u01b0\u01a1ng c\u1ee7a hi\u1ec7u. C\u1ee5 th\u1ec3 l\u00e0:<\/p>\n\n\n\n<p>$$ L(\\hat{y}, y) = \\frac{1}{2}(\\hat{y} &#8211; y)^2<\/p>\n\n\n\n<p>$$<\/p>\n\n\n\n<p>N\u1ebfu \u0111\u1ea1o h\u00e0m \u0111\u01b0\u1ee3c t\u00ednh theo $$\\hat{y}$$, c\u00f4ng th\u1ee9c s\u1ebd l\u00e0 $$\\nabla L = \\frac{1}{2} \\times 2 \\times (\\hat{y} &#8211; y) =\\hat{y} &#8211; y$$. Trong \u0111\u00f3 ta th\u1ea5y h\u1eb1ng s\u1ed1 $$\\frac{1}{2}$$ kh\u00f4ng c\u00f3 h\u1eb1ng s\u1ed1 ph\u1ee5, xu\u1ea5t hi\u1ec7n ch\u1ec9 nh\u1eb1m m\u1ee5c \u0111\u00edch cho \u0111\u1ea1o h\u00e0m tr\u00f4ng \u0111\u1eb9p m\u1eaft m\u00e0 th\u00f4i. Ng\u01b0\u1eddi ta g\u1ecdi loss function n\u00e0y l\u00e0 square loss, n\u00f3 s\u1eed d\u1ee5ng cho c\u1ea3 regression v\u00e0 classification, nh\u01b0ng c\u00f3 v\u1ebb regression chi\u1ebfm \u01b0u th\u1ebf h\u01a1n.<\/p>\n\n\n\n<p>V\u1edbi binary classification, b\u1ea1n v\u1eabn c\u00f2n m\u1ed9t c\u00e1ch ti\u1ebfp c\u1eadn kh\u00e1c n\u1eefa \u0111\u1ec3 x\u00e2y d\u1ef1ng loss function. \u1ede d\u1ea1ng b\u00e0i n\u00e0y tr\u01b0\u1eddng h\u1ee3p model tr\u1ea3 v\u1ec1 $$\\hat{y} &lt; 0$$ k\u1ebft qu\u1ea3 s\u1ebd l\u00e0 -1,&nbsp; c\u00f2n n\u1ebfu tr\u1ea3 v\u1ec1 $$\\hat{y} \\geq 0$$ th\u00ec \u0111\u00e1p \u00e1n l\u00e0 +1.<\/p>\n\n\n\n<p>Loss function c\u1ee7a binary classification ph\u1ea3i \u0111\u00e1p \u1ee9ng m\u1ed9t s\u1ed1 ti\u00eau ch\u00ed sau:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ph\u1ea1t model nhi\u1ec1u l\u00ean khi ch\u00fang d\u1ef1 \u0111o\u00e1n sai v\u00e0 gi\u1ea3m \u0111i khi ch\u00fang d\u1ef1 \u0111o\u00e1n \u0111\u00fang. N\u1ebfu model d\u1ef1 \u0111o\u00e1n sai ($$y$$ kh\u00e1c d\u1ea5u v\u1edbi $$\\hat{y}$$) th\u00ec loss function s\u1ebd c\u00f3 gi\u00e1 tr\u1ecb \u0111\u01b0\u1ee3c tr\u1ea3 v\u1ec1 l\u1edbn h\u01a1n khi model \u0111\u00fang&nbsp; ($$y$$ c\u00f9ng d\u1ea5u v\u1edbi $$\\hat{y}$$).<\/li>\n\n\n\n<li>Trong tr\u01b0\u1eddng h\u1ee3p c\u00f3 c\u1ea3 hai \u0111\u00e1p \u00e1n $$\\hat{y}_1$$ v\u00e0 $$\\hat{y}_2$$ \u0111\u1ec1u c\u00f9ng d\u1ea5u th\u00ec ph\u01b0\u01a1ng \u00e1n \u0111\u01b0\u1ee3c th\u00edch l\u00e0 ph\u01b0\u01a1ng \u00e1n \u0111\u00fang, model c\u00e0ng th\u00edch th\u00ec s\u1ebd \u0111\u01b0\u1ee3c khuy\u1ebfn kh\u00edch v\u00e0 ph\u1ea1t \u00edt h\u01a1n. C\u00f2n khi kh\u00e1c d\u1ea5u ph\u01b0\u01a1ng \u00e1n \u0111\u01b0\u1ee3c th\u00edch l\u00e0 ph\u01b0\u01a1ng \u00e1n sai n\u00ean model c\u00e0ng th\u00edch th\u00ec c\u00e0ng ph\u1ea3i ph\u1ea1t n\u1eb7ng \u0111\u1ec3 n\u00f3 kh\u00f4ng l\u1eb7p l\u1ea1i l\u1ed7i sai \u0111\u00f3 n\u1eefa.<\/li>\n<\/ul>\n\n\n\n<p>T\u00f3m l\u1ea1i, v\u1edbi binary classification th\u00ec c\u00e1c loss function c\u00f3 c\u00f4ng th\u1ee9c t\u1ed5ng qu\u00e1t nh\u01b0 sau:&nbsp;<\/p>\n\n\n\n<p>$$ L(\\hat{y}, y) = f(y \\cdot \\hat{y})<\/p>\n\n\n\n<p>$$<\/p>\n\n\n\n<p>( M\u00e0 trong \u0111\u00f3 $$f$$ l\u00e0 h\u00e0m kh\u00f4ng \u00e2m c\u0169ng ch\u1eb3ng t\u0103ng).<\/p>\n\n\n\n<p><strong>T\u00ecm hi\u1ec3u th\u00eam: <a href=\"https:\/\/topviecit.vn\/blog\/hoc-it-co-kho-khong\/\" target=\"_blank\" rel=\"noreferrer noopener\">H\u1ecdc IT C\u00f3 Kh\u00f3 Kh\u00f4ng? C\u01a1 H\u1ed9i Vi\u1ec7c L\u00e0m C\u1ee7a Ng\u00e0nh IT Sau Khi Ra Tr\u01b0\u1eddng?<\/a><\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"500\" src=\"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/image-4.png\" alt=\"V\u1edbi binary classification, b\u1ea1n c\u00f3 nhi\u1ec1u c\u00e1ch ti\u1ebfp c\u1eadn kh\u00e1c nhau\" class=\"wp-image-1855\" title=\"V\u1edbi binary classification, b\u1ea1n c\u00f3 nhi\u1ec1u c\u00e1ch ti\u1ebfp c\u1eadn kh\u00e1c nhau\" srcset=\"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/image-4.png 800w, https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/image-4-640x400.png 640w, https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/image-4-768x480.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption class=\"wp-element-caption\"><em>V\u1edbi binary classification, b\u1ea1n c\u00f3 nhi\u1ec1u c\u00e1ch ti\u1ebfp c\u1eadn kh\u00e1c nhau<\/em><\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Mot_so_loss_function_co_ban_danh_cho_binary_classification\"><\/span><strong>M\u1ed9t s\u1ed1 loss function c\u01a1 b\u1ea3n d\u00e0nh cho binary classification<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>D\u01b0\u1edbi \u0111\u00e2y l\u00e0 nh\u1eefng loss function c\u01a1 b\u1ea3n cho binary classification l\u00e0:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"0-1_loss\"><\/span><strong>0-1 loss<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>H\u00e0m n\u00e0y s\u1ebd tr\u1ea3 \u0111\u00e1p \u00e1n v\u1ec1 1 trong tr\u01b0\u1eddng h\u1ee3p $$y \\cdot \\hat{y} &lt; 0$$, v\u00e0 tr\u1ea3 \u0111\u00e1p \u00e1n v\u1ec1 0 khi ng\u01b0\u1ee3c l\u1ea1i. B\u1ea3n ch\u1ea5t c\u1ee7a \u0111i\u1ec1u n\u00e0y t\u01b0\u01a1ng t\u1ef1 nh\u01b0 \u0111\u1ebfm s\u1ed1 c\u00e2u tr\u1ea3 l\u1eddi sai c\u1ee7a model.<\/p>\n\n\n\n<p>H\u00e0m 0-1 loss s\u1ebd \u0111\u01b0\u1ee3c d\u00f9ng \u0111\u1ec3 t\u00ednh error rate c\u1ee7a model ch\u1ee9 kh\u00f4ng d\u00f9ng cho m\u1ee5c \u0111\u00edch hu\u1ea5n luy\u1ec7n model t\u1ea1i v\u00ec \u0111\u1ea1o h\u00e0m c\u1ee7a n\u00f3 kh\u00f4ng n\u1eb1m \u1edf 0.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Perceptron_loss\"><\/span><strong>Perceptron loss<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>C\u00f3 d\u1ea1ng nh\u01b0 sau:<\/p>\n\n\n\n<p>$$ L_{perceptron}(\\hat{y}, y) = \\max(0,- y \\cdot \\hat{y})<\/p>\n\n\n\n<p>$$<\/p>\n\n\n\n<p>H\u00e0m n\u00e0y gi\u00fap s\u1eeda&nbsp; sao cho h\u00e0m $$g$$ tr\u1edf th\u00e0nh kh\u00f4ng \u00e2m (\u0111i\u1ec1u ki\u1ec7n c\u1ee7a h\u00e0m m\u1ea5t m\u00e1t).&nbsp;<\/p>\n\n\n\n<p>&nbsp;N\u1ebfu model \u0111o\u00e1n \u0111\u00fang ($$\\hat{y}$$ c\u00f9ng d\u1ea5u v\u1edbi $$y$$), $$- y \\cdot \\hat{y}$$ s\u1ebd \u00e2m, t\u1ee9c l\u00e0&nbsp; perceptron loss kh\u00f4ng th\u1ec3 ph\u00e2n bi\u1ec7t gi\u1eefa c\u00e1c d\u1ef1 \u0111o\u00e1n \u0111\u00fang, n\u00ean s\u1ebd kh\u00f4ng x\u1ea3y ra hi\u1ec7n t\u01b0\u1ee3ng ph\u1ea1t. C\u00f2n v\u1edbi d\u1ef1 \u0111o\u00e1n sai, th\u00ec perceptron v\u1eabn tu\u00e2n th\u1ee7 quy t\u1eafc model c\u00e0ng th\u00edch th\u00ec ph\u1ea1t c\u00e0ng n\u1eb7ng.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Hinge_loss\"><\/span><strong>Hinge loss<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>C\u00f3 d\u1ea1ng t\u1ed5ng qu\u00e1t nh\u01b0 sau:<\/p>\n\n\n\n<p>$$ L_{hinge}(\\hat{y}, y) = \\max(0, 1 &#8211; y \\cdot \\hat{y})<\/p>\n\n\n\n<p>$$<\/p>\n\n\n\n<p>Hinge loss ch\u00ednh l\u00e0 m\u1ed9t bi\u1ebfn th\u1ec3 t\u1eeb perceptron loss. \u0110i\u1ec3m kh\u00e1c l\u00e0 \u0111\u01a1n v\u1ecb v\u00e0o \u0111\u1ea1i l\u01b0\u1ee3ng $$- y \\cdot \\hat{y}$$ \u0111\u01b0\u1ee3c th\u00eam v\u00e0o, g\u1ecdi t\u1eaft l\u00e0 margin (l\u1ec1).<\/p>\n\n\n\n<p>Kh\u00f4ng kh\u00f3 \u0111\u1ec3 nh\u1eadn ra hinge loss ho\u1ea1t \u0111\u1ed9ng g\u1ea7n gi\u1ed1ng perceptron loss, ngo\u1ea1i tr\u1eeb c\u00e1c d\u1ef1 \u0111o\u00e1n m\u00e0 $$y \\cdot \\hat{y}$$ trong kho\u1ea3ng $$[0, 1]$$ ( D\u1ef1 \u0111o\u00e1n $$y \\cdot \\hat{y}$$ \u1edf trong kho\u1ea3ng n\u00e0y \u0111\u1ec1u s\u1ebd \u0111\u00fang).<\/p>\n\n\n\n<p>Hinge loss ph\u00e2n bi\u1ec7t d\u1ef1 \u0111o\u00e1n \u0111\u00fang, theo nguy\u00ean t\u1eafc model c\u00e0ng th\u00edch th\u00ec c\u00e0ng ph\u1ea1t nh\u1eb9. Khi $$y \\cdot \\hat{y}$$&nbsp; &gt; 1 th\u00ec ch\u00fang kh\u00f4ng th\u1ec3 ph\u00e2n bi\u1ec7t c\u00e1c d\u1ef1 \u0111o\u00e1n n\u1eefa.<\/p>\n\n\n\n<p>L\u00fd do cho \u0111i\u1ec1u n\u00e0y ch\u00ednh l\u00e0 d\u1ef1 \u0111o\u00e1n \u1edf trong margin $$[0, 1]$$ l\u00e0 nh\u1eefng d\u1ef1 \u0111o\u00e1n g\u1ea7n ranh gi\u1edbi, model \u0111ang l\u01b0\u1ee1ng l\u1ef1. M\u00e0 hinge loss \u0111\u00f2i h\u1ecfi model ph\u1ea3i th\u1eadt r\u00f5 r\u00e0ng, t\u1ef1 tin v\u00e0o quy\u1ebft \u0111\u1ecbnh c\u1ee7a n\u00f3 \u0111\u1ec3 c\u00f3 th\u1ec3 \u0111\u01b0a ra nh\u1eefng quy\u1ebft \u0111\u1ecbnh c\u00f3 t\u00ednh ch\u1eafc ch\u1eafn cao.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Logistic_loss_hay_log_loss\"><\/span><strong>Logistic loss (hay log loss)<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>C\u00f3 d\u1ea1ng t\u1ed5ng qu\u00e1t nh\u01b0 sau:<\/p>\n\n\n\n<p>$$ L_{log}(\\hat{y}, y) = \\log_2(1 + \\exp(- y \\cdot \\hat{y}))<\/p>\n\n\n\n<p>$$<\/p>\n\n\n\n<p>Theo c\u00f4ng th\u1ee9c tr\u00ean, h\u00e0m $$\\exp(\\cdot)$$ l\u00e0 h\u00e0m l\u0169y th\u1eeba v\u1edbi c\u01a1 s\u1ed1 $$e$$.&nbsp; Log loss mang t\u1edbi c\u1ea3m gi\u00e1c ph\u1ee9c t\u1ea1p v\u00e0 kh\u00f4ng gi\u1ed1ng v\u1edbi nh\u1eefng h\u00e0m c\u00f2n l\u1ea1i. Nh\u01b0ng th\u1ef1c t\u1ebf n\u00f3 th\u1ecfa m\u00e3n t\u1ea5t c\u1ea3 m\u1ecdi t\u00ednh ch\u1ea5t c\u1ee7a loss function.<\/p>\n\n\n\n<p>H\u00e0m n\u00e0y c\u00f3 t\u00ednh li\u00ean t\u1ee5c, kh\u00f4ng \u00e2m v\u00e0 kh\u00f4ng t\u0103ng. Th\u1eadm ch\u00ed n\u00f3 c\u00f2n c\u00f3 xu h\u01b0\u1edbng gi\u1ea3m, t\u1ee9c l\u00e0 n\u00f3 c\u00f3 kh\u1ea3 n\u0103ng ph\u00e2n bi\u1ec7t gi\u1eefa c\u00e1c d\u1ef1 \u0111o\u00e1n c\u00f3 \u0111\u1ed9 th\u00edch kh\u00e1c nhau b\u1ea5t k\u1ec3 \u0111\u00fang hay sai. Ngo\u00e0i ra \u0111i\u1ec3m kh\u00e1c bi\u1ec7t n\u1eefa n\u1eb1m \u1edf vi\u1ec7c h\u00e0m n\u00e0y c\u00f3 m\u1ed9t \u0111\u1ed9 cong nh\u1ea5t \u0111\u1ecbnh, hi\u1ec3u \u0111\u01a1n gi\u1ea3n ch\u00ednh l\u00e0 kh\u00f4ng gi\u1ea3m d\u00f9 t\u1ed1c \u0111\u1ed9 nh\u01b0 nhau \u1edf m\u1ecdi \u0111i\u1ec3m.<\/p>\n\n\n\n<p><strong>T\u00ecm hi\u1ec3u th\u00eam: <a href=\"https:\/\/topviecit.vn\/blog\/sre-la-gi\/\" target=\"_blank\" rel=\"noreferrer noopener\">SRE L\u00e0 G\u00ec? Kh\u00e1c Bi\u1ec7t Gi\u1eefa SRE V\u00e0 DevOps<\/a><\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"500\" src=\"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/image-5.png\" alt=\"Log loss mang t\u1edbi c\u1ea3m gi\u00e1c ph\u1ee9c t\u1ea1p h\u01a1n c\u00e1c h\u00e0m kh\u00e1c \" class=\"wp-image-1856\" title=\"Log loss mang t\u1edbi c\u1ea3m gi\u00e1c ph\u1ee9c t\u1ea1p h\u01a1n c\u00e1c h\u00e0m kh\u00e1c \" srcset=\"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/image-5.png 800w, https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/image-5-640x400.png 640w, https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/image-5-768x480.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption class=\"wp-element-caption\"><em><em>Log loss mang t\u1edbi c\u1ea3m gi\u00e1c ph\u1ee9c t\u1ea1p h\u01a1n c\u00e1c h\u00e0m kh\u00e1c&nbsp;<\/em><\/em><\/figcaption><\/figure><\/div>\n\n\n<p>C\u00f3 l\u1ebd qua b\u00e0i vi\u1ebft tr\u00ean b\u1ea1n \u0111\u00e3 ph\u1ea7n n\u00e0o hi\u1ec3u \u0111\u01b0\u1ee3c <strong>Loss function l\u00e0 g\u00ec<\/strong>? V\u00e0 nh\u1eefng th\u00f4ng tin xoay quanh n\u00f3. Hy v\u1ecdng th\u00f4ng tin tr\u00ean h\u1eefu \u00edch cho b\u1ea1n! V\u00e0 \u0111\u1eebng qu\u00ean truy c\u1eadp ngay v\u00e0o <strong><a href=\"https:\/\/www.topcv.vn\/\" target=\"_blank\" rel=\"noreferrer noopener\">TopCV<\/a><\/strong> \u0111\u1ec3 c\u1eadp nh\u1eadt <strong><a href=\"https:\/\/www.topcv.vn\/viec-lam-it\" target=\"_blank\" rel=\"noreferrer noopener\">vi\u1ec7c l\u00e0m IT<\/a><\/strong> li\u1ebfn quan \u0111\u1ebfn Loss function m\u1ed7i ng\u00e0y!<\/p>\n\n\n\n<p><strong>C\u00f3 th\u1ec3 b\u1ea1n quan t\u00e2m: <a href=\"https:\/\/topviecit.vn\/blog\/tester-la-gi\/\" target=\"_blank\" rel=\"noreferrer noopener\">Tester l\u00e0 g\u00ec? Tester l\u00e0 l\u00e0m g\u00ec? M\u00f4 t\u1ea3 chi ti\u1ebft c\u00f4ng vi\u1ec7c<\/a><\/strong><\/p>\n\n\n\n<p class=\"has-text-align-right\"><em>H\u00ecnh \u1ea3nh: S\u01b0u t\u1ea7m<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>N\u1ebfu \u0111\u00e3 t\u00ecm hi\u1ec3u v\u1ec1 machine learning, ch\u1eafc b\u1ea1n c\u0169ng kh\u00f4ng c\u00f2n xa l\u1ea1 v\u1edbi kh\u00e1i ni\u1ec7m Loss function. Nh\u01b0ng th\u1ef1c th\u1ebf kh\u00f4ng c\u00f3 nhi\u1ec1u ng\u01b0\u1eddi hi\u1ec3u \u0111\u01b0\u1ee3c c\u1ee5 th\u1ec3 Loss function l\u00e0 g\u00ec? Nh\u1eefng th\u00f4ng tin li\u00ean quan t\u1edbi Loss function? Trong b\u00e0i vi\u1ebft ng\u00e0y h\u00f4m nay h\u00e3y c\u00f9ng topviecit.vn t\u00ecm hi\u1ec3u c\u00e2u tr\u1ea3 [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":1843,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"cybocfi_hide_featured_image":"","footnotes":""},"categories":[86],"tags":[437],"class_list":["post-1838","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chia-se-kinh-nghiem","tag-loss-function-la-gi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Loss function l\u00e0 g\u00ec? T\u00ecm hi\u1ec3u chi ti\u1ebft v\u1ec1 Loss function<\/title>\n<meta name=\"description\" content=\"Loss function l\u00e0 g\u00ec? Loss function \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 h\u00e0m m\u1ea5t m\u00e1t trong ti\u1ebfng Vi\u1ec7t, n\u00f3 th\u1ec3 hi\u1ec7n m\u1ed1i quan h\u1ec7 gi\u1eefa y v\u00e0 y*\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/\" \/>\n<meta property=\"og:locale\" content=\"vi_VN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Loss function l\u00e0 g\u00ec? T\u00ecm hi\u1ec3u chi ti\u1ebft v\u1ec1 Loss function\" \/>\n<meta property=\"og:description\" content=\"Loss function l\u00e0 g\u00ec? Loss function \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 h\u00e0m m\u1ea5t m\u00e1t trong ti\u1ebfng Vi\u1ec7t, n\u00f3 th\u1ec3 hi\u1ec7n m\u1ed1i quan h\u1ec7 gi\u1eefa y v\u00e0 y*\" \/>\n<meta property=\"og:url\" content=\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/\" \/>\n<meta property=\"og:site_name\" content=\"TopviecIT\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-10T04:17:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-25T02:01:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/loss-function-la-gi.png\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Dang Huong\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dang Huong\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 ph\u00fat\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/\"},\"author\":{\"name\":\"Dang Huong\",\"@id\":\"https:\/\/topviecit.vn\/blog\/#\/schema\/person\/bf5d0c56a2c02d2a5dba393c3e18f8de\"},\"headline\":\"Loss function l\u00e0 g\u00ec? T\u00ecm hi\u1ec3u chi ti\u1ebft v\u1ec1 Loss function\",\"datePublished\":\"2022-05-10T04:17:02+00:00\",\"dateModified\":\"2022-11-25T02:01:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/\"},\"wordCount\":1937,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/topviecit.vn\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/loss-function-la-gi.png\",\"keywords\":[\"loss function l\u00e0 g\u00ec\"],\"articleSection\":[\"Chia s\u1ebb kinh nghi\u1ec7m\"],\"inLanguage\":\"vi\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/\",\"url\":\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/\",\"name\":\"Loss function l\u00e0 g\u00ec? T\u00ecm hi\u1ec3u chi ti\u1ebft v\u1ec1 Loss function\",\"isPartOf\":{\"@id\":\"https:\/\/topviecit.vn\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/loss-function-la-gi.png\",\"datePublished\":\"2022-05-10T04:17:02+00:00\",\"dateModified\":\"2022-11-25T02:01:56+00:00\",\"description\":\"Loss function l\u00e0 g\u00ec? Loss function \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 h\u00e0m m\u1ea5t m\u00e1t trong ti\u1ebfng Vi\u1ec7t, n\u00f3 th\u1ec3 hi\u1ec7n m\u1ed1i quan h\u1ec7 gi\u1eefa y v\u00e0 y*\",\"breadcrumb\":{\"@id\":\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#breadcrumb\"},\"inLanguage\":\"vi\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#primaryimage\",\"url\":\"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/loss-function-la-gi.png\",\"contentUrl\":\"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/loss-function-la-gi.png\",\"width\":800,\"height\":500,\"caption\":\"loss-function-la-gi\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Trang ch\u1ee7\",\"item\":\"https:\/\/topviecit.vn\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Loss function l\u00e0 g\u00ec? T\u00ecm hi\u1ec3u chi ti\u1ebft v\u1ec1 Loss function\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/topviecit.vn\/blog\/#website\",\"url\":\"https:\/\/topviecit.vn\/blog\/\",\"name\":\"TopviecIT\",\"description\":\"Chia s\u1ebb kinh nghi\u1ec7m l\u00e0m vi\u1ec7c v\u00e0 vi\u1ec7c l\u00e0m IT m\u1edbi nh\u1ea5t\",\"publisher\":{\"@id\":\"https:\/\/topviecit.vn\/blog\/#organization\"},\"alternateName\":\"TopviecIT\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/topviecit.vn\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"vi\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/topviecit.vn\/blog\/#organization\",\"name\":\"TopviecIT\",\"alternateName\":\"TopviecIT\",\"url\":\"https:\/\/topviecit.vn\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\/\/topviecit.vn\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2023\/05\/logo-topviecit-2.png\",\"contentUrl\":\"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2023\/05\/logo-topviecit-2.png\",\"width\":666,\"height\":375,\"caption\":\"TopviecIT\"},\"image\":{\"@id\":\"https:\/\/topviecit.vn\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/topviecit.vn\/blog\/#\/schema\/person\/bf5d0c56a2c02d2a5dba393c3e18f8de\",\"name\":\"Dang Huong\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\/\/topviecit.vn\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5bd93e039e3da563f1ee9760a82fced7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5bd93e039e3da563f1ee9760a82fced7?s=96&d=mm&r=g\",\"caption\":\"Dang Huong\"},\"sameAs\":[\"hanhngan\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Loss function l\u00e0 g\u00ec? T\u00ecm hi\u1ec3u chi ti\u1ebft v\u1ec1 Loss function","description":"Loss function l\u00e0 g\u00ec? Loss function \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 h\u00e0m m\u1ea5t m\u00e1t trong ti\u1ebfng Vi\u1ec7t, n\u00f3 th\u1ec3 hi\u1ec7n m\u1ed1i quan h\u1ec7 gi\u1eefa y v\u00e0 y*","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/","og_locale":"vi_VN","og_type":"article","og_title":"Loss function l\u00e0 g\u00ec? T\u00ecm hi\u1ec3u chi ti\u1ebft v\u1ec1 Loss function","og_description":"Loss function l\u00e0 g\u00ec? Loss function \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 h\u00e0m m\u1ea5t m\u00e1t trong ti\u1ebfng Vi\u1ec7t, n\u00f3 th\u1ec3 hi\u1ec7n m\u1ed1i quan h\u1ec7 gi\u1eefa y v\u00e0 y*","og_url":"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/","og_site_name":"TopviecIT","article_published_time":"2022-05-10T04:17:02+00:00","article_modified_time":"2022-11-25T02:01:56+00:00","og_image":[{"width":800,"height":500,"url":"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/loss-function-la-gi.png","type":"image\/png"}],"author":"Dang Huong","twitter_card":"summary_large_image","twitter_misc":{"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi":"Dang Huong","\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc":"8 ph\u00fat"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#article","isPartOf":{"@id":"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/"},"author":{"name":"Dang Huong","@id":"https:\/\/topviecit.vn\/blog\/#\/schema\/person\/bf5d0c56a2c02d2a5dba393c3e18f8de"},"headline":"Loss function l\u00e0 g\u00ec? T\u00ecm hi\u1ec3u chi ti\u1ebft v\u1ec1 Loss function","datePublished":"2022-05-10T04:17:02+00:00","dateModified":"2022-11-25T02:01:56+00:00","mainEntityOfPage":{"@id":"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/"},"wordCount":1937,"commentCount":0,"publisher":{"@id":"https:\/\/topviecit.vn\/blog\/#organization"},"image":{"@id":"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#primaryimage"},"thumbnailUrl":"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/loss-function-la-gi.png","keywords":["loss function l\u00e0 g\u00ec"],"articleSection":["Chia s\u1ebb kinh nghi\u1ec7m"],"inLanguage":"vi","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/","url":"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/","name":"Loss function l\u00e0 g\u00ec? T\u00ecm hi\u1ec3u chi ti\u1ebft v\u1ec1 Loss function","isPartOf":{"@id":"https:\/\/topviecit.vn\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#primaryimage"},"image":{"@id":"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#primaryimage"},"thumbnailUrl":"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/loss-function-la-gi.png","datePublished":"2022-05-10T04:17:02+00:00","dateModified":"2022-11-25T02:01:56+00:00","description":"Loss function l\u00e0 g\u00ec? Loss function \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 h\u00e0m m\u1ea5t m\u00e1t trong ti\u1ebfng Vi\u1ec7t, n\u00f3 th\u1ec3 hi\u1ec7n m\u1ed1i quan h\u1ec7 gi\u1eefa y v\u00e0 y*","breadcrumb":{"@id":"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#breadcrumb"},"inLanguage":"vi","potentialAction":[{"@type":"ReadAction","target":["https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/"]}]},{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#primaryimage","url":"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/loss-function-la-gi.png","contentUrl":"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2022\/05\/loss-function-la-gi.png","width":800,"height":500,"caption":"loss-function-la-gi"},{"@type":"BreadcrumbList","@id":"https:\/\/topviecit.vn\/blog\/loss-function-la-gi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Trang ch\u1ee7","item":"https:\/\/topviecit.vn\/blog\/"},{"@type":"ListItem","position":2,"name":"Loss function l\u00e0 g\u00ec? T\u00ecm hi\u1ec3u chi ti\u1ebft v\u1ec1 Loss function"}]},{"@type":"WebSite","@id":"https:\/\/topviecit.vn\/blog\/#website","url":"https:\/\/topviecit.vn\/blog\/","name":"TopviecIT","description":"Chia s\u1ebb kinh nghi\u1ec7m l\u00e0m vi\u1ec7c v\u00e0 vi\u1ec7c l\u00e0m IT m\u1edbi nh\u1ea5t","publisher":{"@id":"https:\/\/topviecit.vn\/blog\/#organization"},"alternateName":"TopviecIT","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/topviecit.vn\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"vi"},{"@type":"Organization","@id":"https:\/\/topviecit.vn\/blog\/#organization","name":"TopviecIT","alternateName":"TopviecIT","url":"https:\/\/topviecit.vn\/blog\/","logo":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/topviecit.vn\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2023\/05\/logo-topviecit-2.png","contentUrl":"https:\/\/topviecit.vn\/blog\/wp-content\/uploads\/2023\/05\/logo-topviecit-2.png","width":666,"height":375,"caption":"TopviecIT"},"image":{"@id":"https:\/\/topviecit.vn\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/topviecit.vn\/blog\/#\/schema\/person\/bf5d0c56a2c02d2a5dba393c3e18f8de","name":"Dang Huong","image":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/topviecit.vn\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5bd93e039e3da563f1ee9760a82fced7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5bd93e039e3da563f1ee9760a82fced7?s=96&d=mm&r=g","caption":"Dang Huong"},"sameAs":["hanhngan"]}]}},"_links":{"self":[{"href":"https:\/\/topviecit.vn\/blog\/wp-json\/wp\/v2\/posts\/1838","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/topviecit.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/topviecit.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/topviecit.vn\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/topviecit.vn\/blog\/wp-json\/wp\/v2\/comments?post=1838"}],"version-history":[{"count":2,"href":"https:\/\/topviecit.vn\/blog\/wp-json\/wp\/v2\/posts\/1838\/revisions"}],"predecessor-version":[{"id":3082,"href":"https:\/\/topviecit.vn\/blog\/wp-json\/wp\/v2\/posts\/1838\/revisions\/3082"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/topviecit.vn\/blog\/wp-json\/wp\/v2\/media\/1843"}],"wp:attachment":[{"href":"https:\/\/topviecit.vn\/blog\/wp-json\/wp\/v2\/media?parent=1838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/topviecit.vn\/blog\/wp-json\/wp\/v2\/categories?post=1838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/topviecit.vn\/blog\/wp-json\/wp\/v2\/tags?post=1838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}