{"id":4966,"date":"2020-02-11T12:26:13","date_gmt":"2020-02-11T08:56:13","guid":{"rendered":"https:\/\/shahaab-co.ir\/mag\/?p=4966"},"modified":"2025-12-23T19:32:52","modified_gmt":"2025-12-23T16:02:52","slug":"getting-started-with-tensorflow-the-easy-way-part-4","status":"publish","type":"post","link":"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/getting-started-with-tensorflow-the-easy-way-part-4\/","title":{"rendered":"\u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc TensorFlow \u0628\u0647 \u0631\u0648\u0634\u06cc \u0633\u0627\u062f\u0647 (\u0628\u062e\u0634 \u0686\u0647\u0627\u0631\u0645)"},"content":{"rendered":"<p style=\"text-align: justify;\">\u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647 \u0642\u0633\u0645\u062a \u0686\u0647\u0627\u0631\u0645 \u0627\u0632 \u0633\u0631\u06cc \u0645\u0642\u0627\u0644\u0647 \u0647\u0627\u06cc \u0622\u0645\u0648\u0632\u0634 <a href=\"https:\/\/www.tensorflow.org\/\" target=\"_blank\" rel=\"noopener\">TensorFlow<\/a> \u0628\u0647 \u0631\u0648\u0634\u06cc \u0633\u0627\u062f\u0647 \u0627\u0633\u062a \u06a9\u0647 \u062f\u0631 \u0627\u06cc\u0646 \u0642\u0633\u0645\u062a \u0628\u0647 \u0628\u0631\u0631\u0633\u06cc \u06cc\u06a9 \u0645\u062b\u0627\u0644 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u062f\u0631 \u062a\u0646\u0633\u0648\u0631 \u0641\u0644\u0648 \u0628\u0627 \u0639\u0646\u0648\u0627\u0646 &#8220;\u0627\u062c\u0631\u0627\u06cc \u06cc\u06a9 \u0645\u062b\u0627\u0644 \u0627\u0632 \u0637\u0628\u0642\u0647 \u0628\u0646\u062f\u06cc \u062f\u0631 Tensorflow&#8221; \u062e\u0648\u0627\u0647\u06cc\u0645 \u067e\u0631\u062f\u0627\u062e\u062a.<\/p>\n<div class=\"clear\"><\/div><div style=\"margin-top:20px; margin-bottom:20px;\" class=\"divider divider-normal\"><\/div>\n<p><strong>\u0645\u0642\u0627\u0644\u0647 \u0645\u0631\u062a\u0628\u0637 :<\/strong><\/p>\n<ul>\n<li><strong><a href=\"https:\/\/shahaab-co.ir\/mag\/edu\/deep-learning\/getting-started-with-tensorflow-the-easy-way\/\" rel=\"bookmark noopener\" target=\"_blank\">\u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc TensorFlow \u0628\u0647 \u0631\u0648\u0634 \u0633\u0627\u062f\u0647 (\u0628\u062e\u0634 \u0627\u0648\u0644)<\/a><\/strong><\/li>\n<li>\n<p class=\"post-box-title\"><strong><a href=\"https:\/\/shahaab-co.ir\/mag\/edu\/getting-started-with-tensorflow-the-easy-way-part-2\/\" rel=\"bookmark noopener\" target=\"_blank\">\u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc TensorFlow \u0628\u0647 \u0631\u0648\u0634 \u0633\u0627\u062f\u0647 (\u0628\u062e\u0634 \u062f\u0648\u0645)<\/a><\/strong><\/p>\n<\/li>\n<li>\n<p class=\"post-box-title\"><strong><a href=\"https:\/\/shahaab-co.ir\/mag\/edu\/getting-started-with-tensorflow-the-easy-way-part-3\/\" rel=\"bookmark noopener\" target=\"_blank\">\u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc TensorFlow \u0628\u0647 \u0631\u0648\u0634 \u0633\u0627\u062f\u0647 (\u0628\u062e\u0634 \u0633\u0648\u0645)<\/a><\/strong><\/p>\n<\/li>\n<\/ul>\n<div class=\"clear\"><\/div><div style=\"margin-top:20px; margin-bottom:20px;\" class=\"divider divider-normal\"><\/div>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 counter-hierarchy ez-toc-counter-rtl ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u0622\u0646\u0686\u0647 \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0637\u0644\u0628 \u062e\u0648\u0627\u0647\u06cc\u0645 \u062e\u0648\u0627\u0646\u062f :<\/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: #0044bf;color:#0044bf\" 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: #0044bf;color:#0044bf\" 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 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/getting-started-with-tensorflow-the-easy-way-part-4\/#i\" >\u00a0<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/getting-started-with-tensorflow-the-easy-way-part-4\/#%D8%B9%D9%86%D9%88%D8%A7%D9%86_%D9%85%D8%B3%D8%A6%D9%84%D9%87\" >\u0639\u0646\u0648\u0627\u0646 \u0645\u0633\u0626\u0644\u0647:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/getting-started-with-tensorflow-the-easy-way-part-4\/#%D9%84%DB%8C%D8%B3%D8%AA_%D9%88%D8%A7%DA%98%DA%AF%D8%A7%D9%86\" >\u0644\u06cc\u0633\u062a \u0648\u0627\u0698\u06af\u0627\u0646<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/getting-started-with-tensorflow-the-easy-way-part-4\/#Hash_Bucket\" >Hash Bucket<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"i\"><\/span>\u00a0<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"1024\" height=\"614\" src=\"https:\/\/shahaab-co.ir\/mag\/wp-content\/uploads\/2020\/01\/\u0637\u0628\u0642\u0647-\u0628\u0646\u062f\u06cc-\u062f\u0631-\u062a\u0646\u0633\u0648\u0631-\u0641\u0644\u0648-1024x614.jpg\" alt=\"\u0637\u0628\u0642\u0647 \u0628\u0646\u062f\u06cc \u062f\u0631 \u062a\u0646\u0633\u0648\u0631 \u0641\u0644\u0648\" class=\"wp-image-4967\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u0637\u0628\u0642\u0647-\u0628\u0646\u062f\u06cc-\u062f\u0631-\u062a\u0646\u0633\u0648\u0631-\u0641\u0644\u0648-1024x614.jpg 1024w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u0637\u0628\u0642\u0647-\u0628\u0646\u062f\u06cc-\u062f\u0631-\u062a\u0646\u0633\u0648\u0631-\u0641\u0644\u0648-300x180.jpg 300w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u0637\u0628\u0642\u0647-\u0628\u0646\u062f\u06cc-\u062f\u0631-\u062a\u0646\u0633\u0648\u0631-\u0641\u0644\u0648-768x460.jpg 768w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u0637\u0628\u0642\u0647-\u0628\u0646\u062f\u06cc-\u062f\u0631-\u062a\u0646\u0633\u0648\u0631-\u0641\u0644\u0648.jpg 1050w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>\u0645\u062b\u0627\u0644\u06cc \u0627\u0632 \u0637\u0628\u0642\u0647 \u0628\u0646\u062f\u06cc \u062f\u0627\u062f\u0647 \u0647\u0627 \u062f\u0631 \u062a\u0646\u0633\u0648\u0631 \u0641\u0644\u0648<\/figcaption><\/figure><\/div>\n\n\n<p style=\"text-align: justify\">&nbsp;\u062d\u0644 \u0645\u0634\u06a9\u0644\u0627\u062a \u0648 \u0645\u0633\u0627\u0626\u0644 \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u0637\u0628\u0642\u0647 \u0628\u0646\u062f\u06cc \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062a\u06a9\u0646\u06cc\u06a9 \u0647\u0627\u06cc \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0645\u0627\u0634\u06cc\u0646 \u0648 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0639\u0645\u06cc\u0642\u060c \u0628\u0633\u06cc\u0627\u0631 \u0647\u06cc\u062c\u0627\u0646 \u0627\u0646\u06af\u06cc\u0632 \u0645\u06cc \u0628\u0627\u0634\u0646\u062f. \u0645\u0648\u0627\u0631\u062f \u0645\u062e\u062a\u0644\u0641\u06cc \u0627\u0632 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u0634\u0627\u063a\u0644 \u0627\u0632 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0647\u0627\u06cc \u0637\u0628\u0642\u0647 \u0628\u0646\u062f\u06cc \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f &#8211; \u0627\u0632 \u062a\u06a9\u0646\u06cc\u06a9 \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u06a9\u0631\u0648\u06cc (churn prediction) &nbsp;\u06af\u0631\u0641\u062a\u0647 \u062a\u0627\u062a\u0634\u062e\u06cc\u0635 \u0645\u062a\u0646 \u0647\u0627\u06cc \u0627\u0633\u067e\u0645 \u0648 \u0647\u0631\u0632\u0646\u0627\u0645\u0647.<\/p>\n<p style=\"text-align: justify\">\u062f\u0631 \u0627\u06cc\u0646 \u0628\u062e\u0634\u060c \u0645\u0627 \u06cc\u06a9 \u0645\u062b\u0627\u0644 \u0637\u0628\u0642\u0647 \u0628\u0646\u062f\u06cc \u0627\u0632 \u0646\u0648\u0639 \u062e\u0637\u06cc \u062f\u0631 Tensorflow \u0631\u0627 \u06a9\u062f\u0646\u0648\u06cc\u0633\u06cc \u0645\u06cc \u06a9\u0646\u06cc\u0645\u060c \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0647\u0627\u06cc \u062e\u0648\u062f \u0631\u0627 \u062a\u062c\u0632\u06cc\u0647 \u0648 \u062a\u062d\u0644\u06cc\u0644 \u06a9\u0631\u062f\u0647 \u0648 \u0622\u0646 \u0647\u0627 \u0631\u0627 \u062a\u0623\u06cc\u06cc\u062f \u0645\u06cc \u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u0645\u062f\u0644 \u0645\u0627 \u0646\u0633\u0628\u062a \u0628\u0647 \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0647\u0646\u0648\u0632 \u0628\u0647 \u0648\u062c\u0648\u062f \u0646\u06cc\u0627\u0645\u062f\u0647 \u0627\u0646\u062f \u0686\u0642\u062f\u0631 \u062f\u0642\u06cc\u0642 \u0639\u0645\u0644 \u0645\u06cc \u06a9\u0646\u062f. \u062a\u0645\u0627\u0645 \u0639\u0645\u0644\u06af\u0631 \u0647\u0627 \u0648 \u062a\u0648\u0627\u0628\u0639&nbsp;&nbsp; tensorflow \u06a9\u0647 \u062f\u0631 \u0642\u0633\u0645\u062a \u0647\u0627\u06cc \u0642\u0628\u0644 \u0628\u0647 \u0622\u0646 \u0647\u0627 \u067e\u0631\u062f\u0627\u062e\u062a\u0647 \u0634\u062f\u0647 \u0627\u0646\u062f \u062f\u0631 \u0627\u06cc\u0646 \u0642\u0633\u0645\u062a \u0627\u0634\u0627\u0631\u0647 \u0627\u06cc \u0628\u0647 \u0622\u0646 \u0647\u0627 \u0646\u062e\u0648\u0627\u0647\u062f \u0634\u062f. \u0627\u06af\u0631 \u0628\u0627 \u0645\u0641\u0627\u0647\u06cc\u0645 \u0648 \u0645\u062a\u063a\u06cc\u0631\u0647\u0627\u06cc \u0645\u0648\u062c\u0648\u062f \u062f\u0631 tensorflow \u0622\u0634\u0646\u0627\u06cc\u06cc \u0646\u062f\u0627\u0631\u06cc\u062f \u0645\u06cc\u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0647 \u0642\u0633\u0645\u062a \u0647\u0627\u06cc \u0642\u0628\u0644\u06cc \u0627\u06cc\u0646 \u0645\u062c\u0645\u0648\u0639\u0647 \u0627\u0632 \u0645\u0642\u0627\u0644\u0627\u062a \u0622\u0645\u0648\u0632\u0634\u06cc \u0645\u0631\u0627\u062c\u0639\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%D8%B9%D9%86%D9%88%D8%A7%D9%86_%D9%85%D8%B3%D8%A6%D9%84%D9%87\"><\/span>\u0639\u0646\u0648\u0627\u0646 \u0645\u0633\u0626\u0644\u0647:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify\">\u0628\u0627 \u062a\u0648\u062c\u0647 \u0628\u0647 \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u06cc\u06a9 \u0641\u0631\u062f\u060c \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0627\u06cc\u0646\u06a9\u0647 \u0628\u0647 \u06a9\u062f\u0627\u0645 \u0637\u0628\u0642\u0647 \u062f\u0631\u0622\u0645\u062f\u06cc \u062a\u0639\u0644\u0642 \u062e\u0648\u0627\u0647\u062f \u062f\u0627\u0634\u062a\u060c \u0628\u0627\u0644\u0627\u06cc \u06f5\u06f0 \u0647\u0632\u0627\u0631 \u062f\u0644\u0627\u0631 \u06cc\u0627 \u0632\u06cc\u0631 \u06f5\u06f0 \u0647\u0632\u0627 \u062f\u0644\u0627\u0631\u060c \u0645\u0633\u0626\u0644\u0647 \u0627\u06cc \u0647\u0633\u062a \u06a9\u0647 \u0628\u0647 \u062f\u0646\u0628\u0627\u0644 \u062d\u0644 \u0622\u0646 \u0647\u0633\u062a\u06cc\u0645 .<\/p>\n<p style=\"text-align: justify\">\u062f\u0631 \u0632\u06cc\u0631 \u0645\u0631\u0648\u0631\u06cc \u0628\u0631 \u0633\u062a\u0648\u0646 \u0647\u0627\u06cc \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u0627\u06cc\u0646 \u0645\u0633\u0626\u0644\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a<\/p>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"1024\" height=\"409\" src=\"https:\/\/shahaab-co.ir\/mag\/wp-content\/uploads\/2020\/01\/\u062f\u0627\u062f\u0647-\u0627\u0648\u0644\u06cc\u0647-1024x409.jpg\" alt=\"\u062f\u0627\u062f\u0647 \u0627\u0648\u0644\u06cc\u0647\" class=\"wp-image-4968\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u062f\u0627\u062f\u0647-\u0627\u0648\u0644\u06cc\u0647-1024x409.jpg 1024w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u062f\u0627\u062f\u0647-\u0627\u0648\u0644\u06cc\u0647-300x120.jpg 300w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u062f\u0627\u062f\u0647-\u0627\u0648\u0644\u06cc\u0647-768x307.jpg 768w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u062f\u0627\u062f\u0647-\u0627\u0648\u0644\u06cc\u0647.jpg 1050w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>\u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u0627\u0648\u0644\u06cc\u0647 \u0637\u0628\u0642\u0647 \u0628\u0646\u062f\u06cc<\/figcaption><\/figure><\/div>\n\n\n<p style=\"text-align: justify;\">\u0627\u0628\u062a\u062f\u0627 \u06a9\u0627\u0631\u0645\u0627\u0646 \u0631\u0627 \u0628\u0627\u0631\u06af\u06cc\u0631\u06cc \u0645\u062c\u0645\u0648\u0639\u0647 \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u062e\u0648\u062f \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 pandas \u0622\u063a\u0627\u0632 \u0645\u06cc\u06a9\u0646\u06cc\u0645.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">import pandas as pd\nimport tensorflow as tf<\/pre>\n<p style=\"text-align: justify;\">\u0645\u062c\u0645\u0648\u0639\u0647 \u062f\u0627\u062f\u0647 \u06cc \u0628\u0627\u0631\u06af\u06cc\u0631\u06cc \u0634\u062f\u0647 \u0627\u0632 \u062f\u0627\u0646\u0634\u06af\u0627\u0647 UCI \u0645\u0639\u0645\u0648\u0644\u0627\u064b \u0641\u0631\u0645\u062a \u0627\u0633\u062a\u0627\u0646\u062f\u0627\u0631\u062f csv \u0631\u0627 \u0646\u062f\u0627\u0631\u062f. \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646\u060c \u0627\u062c\u0627\u0632\u0647 \u062f\u0647\u06cc\u062f \u0646\u0627\u0645 \u0633\u062a\u0648\u0646 \u0647\u0627 \u0631\u0627 \u0627\u0632 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0627\u0631\u0627\u0626\u0647 \u0634\u062f\u0647 \u062f\u0631 \u0635\u0641\u062d\u0647 \u062f\u0627\u062f\u0647 \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u06cc\u0645.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">census = pd.read_csv(\"adult.csv\", header=None)\ncensus.columns = ['age', 'workclass','fnlwgt', 'education', 'education_num', 'marital_status',\n'occupation', 'relationship', 'race', 'gender', 'capital_gain',\n'capital_loss', 'hours_per_week', 'native_country', 'income_bracket']<\/pre>\n<p>\u00a0<\/p>\n<p style=\"text-align: right;\">\u0628\u0631\u0627\u06cc \u062f\u06cc\u062f\u0646 \u0646\u0627\u0645 dataframe \u062c\u062f\u0648\u0644\u060c \u0647\u062f\u0631 \u0631\u0627 \u0628\u0631\u0631\u0633\u06cc \u06a9\u0646\u06cc\u062f.<\/p>\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1024\" height=\"438\" src=\"https:\/\/shahaab-co.ir\/mag\/wp-content\/uploads\/2020\/01\/\u062f\u0627\u062f\u0647-\u0647\u0627\u06cc-\u0637\u0628\u0642\u0647-\u0628\u0646\u062f\u06cc-2-1024x438.jpg\" alt=\"\u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u0637\u0628\u0642\u0647 \u0628\u0646\u062f\u06cc 2\" class=\"wp-image-4969\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u062f\u0627\u062f\u0647-\u0647\u0627\u06cc-\u0637\u0628\u0642\u0647-\u0628\u0646\u062f\u06cc-2-1024x438.jpg 1024w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u062f\u0627\u062f\u0647-\u0647\u0627\u06cc-\u0637\u0628\u0642\u0647-\u0628\u0646\u062f\u06cc-2-300x128.jpg 300w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u062f\u0627\u062f\u0647-\u0647\u0627\u06cc-\u0637\u0628\u0642\u0647-\u0628\u0646\u062f\u06cc-2-768x329.jpg 768w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u062f\u0627\u062f\u0647-\u0647\u0627\u06cc-\u0637\u0628\u0642\u0647-\u0628\u0646\u062f\u06cc-2.jpg 1050w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>\u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u0637\u0628\u0642\u062e \u0628\u0646\u062f\u06cc<\/figcaption><\/figure>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">def label_fix(label):\nif label==' &lt;=50K':\nreturn 0\nelse:\nreturn 1\ncensus['income_bracket'] = census['income_bracket'].apply(label_fix)\ncensus['income_bracket'].unique()<\/pre>\n<p style=\"text-align: justify;\">\u0645\u062a\u063a\u06cc\u0631 \u0647\u062f\u0641 \u0645\u0627 \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0648\u0631\u062f \u06cc\u06a9 \u0631\u0634\u062a\u0647 \u0627\u0633\u062a. \u0628\u0631\u0627\u06cc \u0645\u062b\u0627\u0644\u06f5\u06f0K&gt;, &lt;=50K<\/p>\n<p style=\"text-align: justify;\">\u0645\u062a\u0623\u0633\u0641\u0627\u0646\u0647 \u060c TensorFlow \u0646\u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u0631\u0634\u062a\u0647 \u0647\u0627 \u0631\u0627 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0628\u0631\u0686\u0633\u0628 \u0628\u0634\u0646\u0627\u0633\u062f\u060c \u0628\u0631\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06cc\u06a9 \u062a\u0627\u0628\u0639 \u0645\u0639\u0645\u0648\u0644 \u06a9\u0647 \u0622\u0646\u0647\u0627 \u0631\u0627 \u0628\u0647 \u06f0 \u0648 \u06f1 \u062a\u0628\u062f\u06cc\u0644 \u0645\u06cc \u06a9\u0646\u062f \u060c \u0628\u0627\u06cc\u062f \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 pandas \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645.<\/p>\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1024\" height=\"295\" src=\"https:\/\/shahaab-co.ir\/mag\/wp-content\/uploads\/2020\/01\/\u06a9\u062f-\u062a\u0646\u0633\u0648\u0631-\u0641\u0644\u0648png-1024x295.jpg\" alt=\"\u06a9\u062f \u062a\u0646\u0633\u0648\u0631 \u0641\u0644\u0648\" class=\"wp-image-4970\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u06a9\u062f-\u062a\u0646\u0633\u0648\u0631-\u0641\u0644\u0648png-1024x295.jpg 1024w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u06a9\u062f-\u062a\u0646\u0633\u0648\u0631-\u0641\u0644\u0648png-300x86.jpg 300w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u06a9\u062f-\u062a\u0646\u0633\u0648\u0631-\u0641\u0644\u0648png-768x221.jpg 768w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u06a9\u062f-\u062a\u0646\u0633\u0648\u0631-\u0641\u0644\u0648png.jpg 1050w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>\u06a9\u062f \u062a\u0646\u0633\u0648\u0631 \u0641\u0644\u0648<\/figcaption><\/figure>\n\n\n<p style=\"text-align: justify;\">\u062e\u0631\u0648\u062c\u06cc \u0628\u0627\u06cc\u062f \u06f0 \u06cc\u0627 \u06f1 \u0628\u0627\u0634\u062f. \u0627\u06a9\u0646\u0648\u0646 \u060c \u0645\u0627 \u0642\u0631\u0627\u0631 \u0627\u0633\u062a \u062c\u0631\u06cc\u0627\u0646 tensorflow \u0631\u0627 \u0628\u0627 \u06a9\u062f\u06af\u0630\u0627\u0631\u06cc \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u062e\u0648\u062f \u0628\u0647 \u0645\u062c\u0645\u0648\u0639\u0647 \u0647\u0627\u06cc train \u0648 test\u00a0 \u06a9\u062f \u06af\u0632\u0627\u0631\u06cc \u06a9\u0646\u06cc\u0645.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">from sklearn.model_selection import train_test_splitx_data =\n\ncensus.drop('income_bracket',axis=1)\n\ny_labels = census['income_bracket']X_train, X_test, y_train, y_test =\n\ntrain_test_split(x_data,y_labels,test_size=0.3,random_state=101)<\/pre>\n<p style=\"text-align: right;\">\u0627\u06af\u0631 \u0645\u0642\u0627\u0644\u0647 \u0647\u0627\u06cc \u0642\u0633\u0645\u062a \u0647\u0627\u06cc \u0642\u0628\u0644\u06cc \u0631\u0627 \u062f\u0646\u0628\u0627\u0644 \u06a9\u0631\u062f\u0647 \u0628\u0627\u0634\u06cc\u062f\u060c \u0628\u0627\u06cc\u062f \u062a\u0648\u062c\u0647 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f \u06a9\u0647 \u0642\u0628\u0644\u0627\u064b \u0627\u0632 \u0647\u06cc\u0686 \u0646\u0648\u0639 \u0631\u0634\u062a\u0647 \u0627\u06cc \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0648\u06cc\u0698\u06af\u06cc \u00a0(feature)\u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u06a9\u0631\u062f\u0647 \u0627\u06cc\u0645. \u0628\u0647 \u0646\u0638\u0631 \u0634\u0645\u0627 \u0686\u06af\u0648\u0646\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u0645 \u0648\u06cc\u0698\u06af\u06cc\u0647\u0627\u06cc \u0645\u0631\u062a\u0628\u0637 \u0628\u0627 \u0637\u0628\u0642\u0647 \u0628\u0646\u062f\u06cc \u0631\u0627 \u0628\u0647 \u06cc\u06a9 \u0645\u062f\u0644 tensorflow \u0645\u0646\u062a\u0642\u0644 \u06a9\u0646\u06cc\u0645\u061f \u062f\u0631 \u0648\u0627\u0642\u0639 \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u062f\u0648 \u0631\u0648\u0634 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f.<\/p>\n<p style=\"text-align: right;\">\u06f1-\u0644\u06cc\u0633\u062a \u0648\u0627\u0698\u06af\u0627\u0646 (Vocabulary List)<\/p>\n<p style=\"text-align: right;\">\u06f2-\u0633\u0637\u0644 \u0647\u0634 (Hash Bucket)<\/p>\n<h3 style=\"text-align: right;\"><span class=\"ez-toc-section\" id=\"%D9%84%DB%8C%D8%B3%D8%AA_%D9%88%D8%A7%DA%98%DA%AF%D8%A7%D9%86\"><\/span>\u0644\u06cc\u0633\u062a \u0648\u0627\u0698\u06af\u0627\u0646<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: right;\">\u062f\u0631 \u0631\u0648\u0634 \u0644\u06cc\u0633\u062a \u0648\u0627\u0698\u06af\u0627\u0646 \u060c \u0628\u0627\u06cc\u062f \u0646\u0627\u0645 \u0633\u062a\u0648\u0646 \u0648 \u062a\u0645\u0627\u0645 \u0628\u0631\u0686\u0633\u0628 \u0647\u0627\u06cc \u0645\u0646\u062d\u0635\u0631 \u0628\u0647 \u0641\u0631\u062f \u0645\u0648\u062c\u0648\u062f \u0628\u0631\u0627\u06cc \u0622\u0646 \u0633\u062a\u0648\u0646 \u0631\u0627 \u0645\u0646\u062a\u0642\u0644 \u06a9\u0646\u06cc\u0645. \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0628\u0631\u0627\u06cc \u0631\u0645\u0632\u06af\u0630\u0627\u0631\u06cc \u0633\u062a\u0648\u0646 \u0647\u0627 \u0628\u0627 \u06f2 \u062a\u0627 \u06f4 \u0645\u0642\u062f\u0627\u0631 \u0645\u0646\u062d\u0635\u0631 \u0628\u0647 \u0641\u0631\u062f \u0627\u0645\u06a9\u0627\u0646 \u067e\u0630\u06cc\u0631 \u0627\u0633\u062a.<\/p>\n<h3 style=\"text-align: right;\"><span class=\"ez-toc-section\" id=\"Hash_Bucket\"><\/span>Hash Bucket<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: right;\">\u062f\u0631 \u0627\u06cc\u0646 \u0631\u0648\u0634 \u0647\u0634 \u062a\u0645\u0627\u0645 \u0645\u0642\u0627\u062f\u06cc\u0631 \u0645\u0646\u062d\u0635\u0631 \u0628\u0647 \u0641\u0631\u062f \u0628\u0627 \u0628\u0631\u0686\u0633\u0628 \u0647\u0627 \u0645\u062d\u0627\u0633\u0628\u0647 \u0648 \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646 \u0645\u06cc \u0634\u0648\u062f. \u062f\u0627\u0634\u062a\u0646 \u0633\u062a\u0648\u0646\u0647\u0627\u06cc \u0628\u0632\u0631\u06af \u06a9\u0647 \u062f\u0631 \u0622\u0646 \u0646\u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0644\u06cc\u0633\u062a\u06cc \u0627\u0632 \u062a\u0645\u0627\u0645 \u0645\u062a\u063a\u06cc\u0631 \u0647\u0627\u06cc \u0645\u0646\u062d\u0635\u0631 \u0628\u0647 \u0641\u0631\u062f \u0631\u0627 \u0645\u0646\u062a\u0642\u0644 \u06a9\u0646\u06cc\u062f \u0628\u0631\u0627\u06cc \u0634\u0645\u0627 \u0631\u0627\u062d\u062a \u062a\u0631 \u0627\u0633\u062a.<\/p>\n<p style=\"text-align: right;\">\u062f\u0631 \u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627 \u0645\u0633\u0626\u0644\u0647 \u062c\u0646\u0633\u06cc\u062a \u0627\u062c\u0627\u0632\u0647 \u062f\u0647\u06cc\u062f \u0627\u0632 \u0631\u0648\u0634 \u0644\u06cc\u0633\u062a \u0648\u0627\u0698\u06af\u0627\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">gender = tf.feature_column.categorical_column_with_vocabulary_list(\"gender\", [\"Female\", \"Male\"])<\/pre>\n<p style=\"text-align: right;\">\u0648 \u0628\u0631\u0627\u06cc \u0633\u062a\u0648\u0646\u0647\u0627\u06cc \u0627\u0635\u0644\u06cc \u0627\u0632 Hsh Bucket \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">occupation = tf.feature_column.categorical_column_with_hash_bucket(\"occupation\", hash_bucket_size=1000)\nmarital_status = tf.feature_column.categorical_column_with_hash_bucket(\"marital_status\", hash_bucket_size=1000)\nrelationship = tf.feature_column.categorical_column_with_hash_bucket(\"relationship\", hash_bucket_size=1000)\neducation = tf.feature_column.categorical_column_with_hash_bucket(\"education\", hash_bucket_size=1000)\nworkclass = tf.feature_column.categorical_column_with_hash_bucket(\"workclass\", hash_bucket_size=1000)\nnative_country = tf.feature_column.categorical_column_with_hash_bucket(\"native_country\", hash_bucket_size=1000)<\/pre>\n<p style=\"text-align: right;\">\u0633\u062a\u0648\u0646 \u0647\u0627\u06cc \u0639\u062f\u062f\u06cc \u067e\u06cc\u0648\u0633\u062a\u0647\u060c \u0622\u0633\u0627\u0646 \u0648 \u0634\u0628\u06cc\u0647 \u0645\u0648\u0627\u0631\u062f \u0641\u0648\u0642 \u0647\u0633\u062a\u0646\u062f.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">tf.feature_columns.numeric_column\n\nage = tf.feature_column.numeric_column(\"age\")\neducation_num = tf.feature_column.numeric_column(\"education_num\")\ncapital_gain = tf.feature_column.numeric_column(\"capital_gain\")\ncapital_loss = tf.feature_column.numeric_column(\"capital_loss\")\nhours_per_week = tf.feature_column.numeric_column(\"hours_per_week\")<\/pre>\n<p style=\"text-align: justify;\">\u06a9\u0627\u0631 \u0645\u0627 \u062f\u0631 \u0627\u06cc\u0646 \u062c\u0627 \u062a\u0642\u0631\u06cc\u0628\u0627 \u062a\u0645\u0627\u0645 \u0627\u0633\u062a. \u0627\u06a9\u0646\u0648\u0646 \u060c \u0641\u0642\u0637 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062e\u0637 \u06a9\u062f \u0632\u06cc\u0631\u060c \u062a\u0645\u0627\u0645 \u0627\u06cc\u0646 \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627 \u0631\u0627 \u062f\u0631 \u06cc\u06a9 \u0644\u06cc\u0633\u062a \u0627\u0634\u06cc\u0627\u0621 \u0642\u0631\u0627\u0631 \u062f\u0647\u06cc\u062f<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">feat_cols = [gender,occupation,marital_status,relationship,education,workclass,native_country, age,education_num,capital_gain,capital_loss,hours_per_week]input_func=tf.estimator.inputs.pandas_input_fn(x=X_train,y=y_train,batch_size=100,num_epochs=None,shuffle=True)<\/pre>\n<p style=\"text-align: justify;\">\u0627\u06a9\u0646\u0648\u0646 \u06a9\u0647 \u0628\u0627 \u062a\u0642\u0633\u06cc\u0645 \u062f\u0627\u062f\u0647 \u0647\u0627 \u0648 \u0647\u0645\u0686\u0646\u06cc\u0646 \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0622\u0646 \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632 \u0627\u0633\u062a \u0622\u0634\u0646\u0627 \u0634\u062f\u0647 \u0627\u06cc\u0645\u060c \u0628\u0627\u06cc\u062f \u0645\u062f\u0644 \u0631\u0627 \u0637\u0631\u0627\u062d\u06cc \u06a9\u0646\u06cc\u0645.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">input_func=tf.estimator.inputs.pandas_input_fn(x=X_train,y=y_train,batch_size=100,num_epochs=None,shuffle=True)model = tf.estimator.LinearClassifier(feature_columns=feat_cols)\nmodel.train(input_fn=input_func,steps=5000)<\/pre>\n<p style=\"text-align: justify;\">\u062f\u0631 \u06cc\u06a9 \u0637\u0631\u0627\u062d\u06cc \u0645\u0648\u0641\u0642 \u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u0628\u0631\u0627\u06cc \u0647\u0631 \u0645\u0631\u062d\u0644\u0647 \/ \u062f\u0648\u0631\u0647 \u0632\u0645\u0627\u0646 \u0627\u0632 \u062f\u0633\u062a \u0631\u0641\u062a\u0647 \u0648 \u0627\u0645\u062a\u06cc\u0627\u0632 \u0628\u062f\u0633\u062a \u0622\u0645\u062f\u0647 \u0628\u0631\u0627\u06cc \u0647\u0631 \u0645\u0631\u062d\u0644\u0647\/\u06af\u0627\u0645 \u0631\u0627 \u0628\u062f\u0633\u062a \u0622\u0648\u0631\u06cc\u062f<\/p>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"1024\" height=\"552\" src=\"https:\/\/shahaab-co.ir\/mag\/wp-content\/uploads\/2020\/01\/\u0637\u0631\u0627\u062d\u06cc-\u0645\u062f\u0644-1024x552.jpg\" alt=\"\u0637\u0631\u0627\u062d\u06cc \u0645\u062f\u0644\" class=\"wp-image-4974\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u0637\u0631\u0627\u062d\u06cc-\u0645\u062f\u0644-1024x552.jpg 1024w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u0637\u0631\u0627\u062d\u06cc-\u0645\u062f\u0644-300x162.jpg 300w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u0637\u0631\u0627\u062d\u06cc-\u0645\u062f\u0644-768x414.jpg 768w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u0637\u0631\u0627\u062d\u06cc-\u0645\u062f\u0644.jpg 1050w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>\u0637\u0631\u0627\u062d\u06cc \u0645\u062f\u0644<\/figcaption><\/figure><\/div>\n\n\n<p style=\"text-align: justify;\">\u0628\u06af\u0630\u0627\u0631\u06cc\u062f \u062f\u0633\u062a\u0648\u0631 pred_fn \u0631\u0627 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u0645\u062c\u0645\u0648\u0639\u0647 \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u0622\u0632\u0645\u0648\u0646 \u0645\u0627 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0647\u0627 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 shuffle=False \u0638\u0628\u0637 \u0645\u06cc\u06a9\u0646\u062f.<\/p>\n<p style=\"text-align: justify;\">\u0646\u06a9\u062a\u0647 \u0645\u0647\u0645: \u062f\u0631 \u062d\u06cc\u0646 \u0637\u0631\u0627\u062d\u06cc \u0645\u062f\u0644 \u060c \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 shuffle = True \u0628\u0631 \u0639\u0647\u062f\u0647 \u0634\u0645\u0627\u0633\u062a. \u0645\u0639\u0645\u0648\u0644\u0627\u064b \u062e\u0648\u0628 \u0627\u0633\u062a \u06a9\u0647 \u0645\u062f\u0644 \u0647\u0627 \u0631\u0627 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 shuffle \u0637\u0631\u0627\u062d\u06cc \u06a9\u0646\u06cc\u062f. \u0627\u0645\u0627 \u060c \u062f\u0631 \u062d\u0627\u0644\u06cc \u06a9\u0647 \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0647\u0627\u06cc \u062e\u0648\u062f \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc \u062f\u0647\u06cc\u062f \u0627\u0637\u0645\u06cc\u0646\u0627\u0646 \u062d\u0627\u0635\u0644 \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u062f\u0633\u062a\u0648\u0631 shuffle=False \u0631\u0627 \u0627\u062c\u0631\u0627 \u06a9\u0631\u062f\u0647 \u0627\u06cc\u062f. \u0686\u0631\u0627 \u06a9\u0647 \u0647\u0631\u06af\u0632 \u0646\u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0646\u062a\u0627\u06cc\u062c \u062e\u0648\u062f \u0631\u0627 \u0627\u0639\u062a\u0628\u0627\u0631 \u06cc\u0627 \u0627\u0646\u062f\u0627\u0632\u0647 \u06af\u06cc\u0631\u06cc \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">pred_fn = tf.estimator.inputs.pandas_input_fn(x=X_test,batch_size=len(X_test),shuffle=False)predictions = list(model.predict(input_fn=pred_fn))\nfinal_preds = []\nfor pred in predictions:\nfinal_preds.append(pred['class_ids'][0])<\/pre>\n<p style=\"text-align: justify;\">\u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0647\u0627 \u0622\u0645\u0627\u062f\u0647 \u0627\u0633\u062a. \u0642\u062f\u0645 \u0628\u0639\u062f\u06cc \u0627\u06cc\u0646 \u0627\u0633\u062a \u06a9\u0647 \u0628\u0628\u06cc\u0646\u06cc\u0645 \u0645\u062f\u0644 Tensorflow \u0645\u0627 \u0686\u06af\u0648\u0646\u0647 \u0639\u0645\u0644 \u06a9\u0631\u062f\u0647 \u0627\u0633\u062a.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">from sklearn.metrics import classification_report\nprint(classification_report(y_test,final_preds))<\/pre>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"1016\" height=\"450\" src=\"https:\/\/shahaab-co.ir\/mag\/wp-content\/uploads\/2020\/01\/\u0646\u062a\u0627\u06cc\u062c-\u0645\u062f\u0644.jpg\" alt=\"\u0646\u062a\u0627\u06cc\u062c \u0645\u062f\u0644\" class=\"wp-image-4975\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u0646\u062a\u0627\u06cc\u062c-\u0645\u062f\u0644.jpg 1016w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u0646\u062a\u0627\u06cc\u062c-\u0645\u062f\u0644-300x133.jpg 300w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u0646\u062a\u0627\u06cc\u062c-\u0645\u062f\u0644-768x340.jpg 768w\" sizes=\"(max-width: 1016px) 100vw, 1016px\" \/><figcaption>\u0646\u062a\u0627\u06cc\u062c \u0645\u062f\u0644<\/figcaption><\/figure><\/div>\n\n\n<p style=\"text-align: justify;\">\u0647\u0645\u0627\u0646 \u0637\u0648\u0631 \u06a9\u0647 \u0645\u06cc\u0628\u06cc\u0646\u06cc\u062f \u06cc\u06a9 \u0627\u0645\u062a\u06cc\u0627\u0632 \u0639\u0627\u0644\u06cc \u0628\u0631\u0627\u06cc \u0645\u062f\u0644 \u0628\u062f\u0633\u062a \u0622\u0645\u062f. \u062d\u0627\u0644 \u060c \u0627\u062c\u0627\u0632\u0647 \u062f\u0647\u06cc\u062f \u0646\u06af\u0627\u0647\u06cc \u0628\u0647 \u0645\u062a\u0631\u06cc\u06a9 AUC \u0628\u0631\u0627\u06cc \u0645\u062f\u0644 \u062e\u0648\u062f \u0628\u06cc\u0646\u062f\u0627\u0632\u06cc\u0645.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">from sklearn.metrics import roc_curve, auc\nfpr, tpr, thresholds = roc_curve(y_test,final_preds)\nroc_auc = auc(fpr, tpr)\nprint(\"ROC AUC Score: {}\".format(roc_auc))\nplt.figure()\nplt.plot(fpr, tpr, color='green', lw=1, label='ROC curve (area = %0.2f)' % roc_auc)\nplt.plot([0, 1], [0, 1], color='navy', linestyle='--')\nplt.xlim([0.0, 1.0])\nplt.ylim([0.0, 1.05])\nplt.xlabel('False Positive Rate')\nplt.ylabel('True Positive Rate')\nplt.title('Receiver operating characteristic')\nplt.legend(loc=\"lower right\")\nplt.show()<\/pre>\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"854\" height=\"652\" src=\"https:\/\/shahaab-co.ir\/mag\/wp-content\/uploads\/2020\/01\/\u0646\u062a\u06cc\u062c\u0647-\u0645\u062f\u0644-2.jpg\" alt=\"\u0646\u062a\u06cc\u062c\u0647 \u0645\u062f\u0644 2\" class=\"wp-image-4976\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u0646\u062a\u06cc\u062c\u0647-\u0645\u062f\u0644-2.jpg 854w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u0646\u062a\u06cc\u062c\u0647-\u0645\u062f\u0644-2-300x229.jpg 300w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/01\/\u0646\u062a\u06cc\u062c\u0647-\u0645\u062f\u0644-2-768x586.jpg 768w\" sizes=\"(max-width: 854px) 100vw, 854px\" \/><figcaption>\u0646\u062a\u06cc\u062c\u0647 \u0645\u062f\u0644<\/figcaption><\/figure>\n\n\n<p style=\"text-align: justify\">\u0645\u062f\u0644 \u0645\u0627 \u0646\u0645\u0631\u0647 AUC \u0642\u0627\u0628\u0644 \u0642\u0628\u0648\u0644 \u06f0\u066b\u06f7\u06f3\u06f8 \u0631\u0627 \u06a9\u0633\u0628 \u06a9\u0631\u062f. \u0628\u0631\u0627\u06cc \u0628\u0647\u06cc\u0646\u0647 \u0633\u0627\u0632\u06cc \u0627\u0645\u062a\u06cc\u0627\u0632\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u0645 \u0637\u0648\u0644 \u0627\u0646\u062c\u0627\u0645 \u062f\u0648\u0631\u0647 \u0631\u0627 \u0627\u0641\u0632\u0627\u06cc\u0634 \u062f\u0647\u06cc\u0645 \u06cc\u0627 \u0645\u0647\u0646\u062f\u0633\u06cc \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627 \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u0645.<\/p>\n<p style=\"text-align: justify\">\u06f1-\u062f\u0633\u062a\u0647 \u0647\u0627 \u0631\u0627 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0633\u062a\u0648\u0646 \u0633\u0646 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f<\/p>\n<p style=\"text-align: justify\">\u06f2-\u0633\u0627\u0639\u0627\u062a \u0645\u062a\u0648\u0633\u0637 \u0628\u0631\u0627\u06cc \u0634\u063a\u0644 \u0631\u0627 \u0645\u062d\u0627\u0633\u0628\u0647 \u06a9\u0646\u06cc\u062f<\/p>\n<p style=\"text-align: justify\">\u06f3-\u0645\u062a\u0648\u0633\u0637 \u0627\u0641\u0632\u0627\u06cc\u0634 \u0633\u0631\u0645\u0627\u06cc\u0647 \u0628\u0631\u0627\u06cc \u0622\u0645\u0648\u0632\u0634 \u0648 \u063a\u06cc\u0631\u0647<\/p>\n<p style=\"text-align: justify\">\u0628\u0642\u06cc\u0647 \u06a9\u0627\u0631 \u0631\u0627 \u0628\u0647 \u0634\u0645\u0627 \u0648\u0627\u06af\u0630\u0627\u0631 \u0645\u06cc \u06a9\u0646\u06cc\u0645. \u0645\u062c\u0645\u0648\u0639\u0647 \u0622\u0645\u0648\u0632\u0634\u06cc \u0645\u0642\u0627\u0644\u0627\u062a \u0645\u0627 \u0628\u0631\u0627\u06cc \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u062a\u0646\u0633\u0648\u0631 \u0641\u0644\u0648 \u062f\u0631 \u0627\u06cc\u0646 \u062c\u0627 \u067e\u0627\u06cc\u0627\u0646 \u0645\u06cc \u06cc\u0627\u0628\u062f.<\/p>\n<h4><strong>\u0628\u06cc\u0634\u062a\u0631 \u0628\u062e\u0648\u0627\u0646\u06cc\u062f:<\/strong><\/h4>\n\n<ul class=\"wp-block-latest-posts__list wp-block-latest-posts\"><li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/shahaab-co.com\/mag\/news\/tesla-vision-ai-lane-detection\/\">\u062a\u0633\u0644\u0627 \u0648\u06cc\u0698\u0646 \u0686\u06cc\u0633\u062a \u0648 \u062e\u0648\u062f\u0631\u0648\u0647\u0627\u06cc \u062a\u0633\u0644\u0627 \u0686\u06af\u0648\u0646\u0647 \u062e\u0637\u0648\u0637 \u062c\u0627\u062f\u0647 \u0631\u0627 \u062a\u0634\u062e\u06cc\u0635 \u0645\u06cc\u200c\u062f\u0647\u0646\u062f\u061f<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/shahaab-co.com\/mag\/news\/offline-ai-for-mobile\/\">\u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0622\u0641\u0644\u0627\u06cc\u0646 \u0628\u0631\u0627\u06cc \u06af\u0648\u0634\u06cc<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/shahaab-co.com\/mag\/news\/which-ai-is-working-now\/\">\u06a9\u062f\u0627\u0645 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0627\u0644\u0627\u0646 \u06a9\u0627\u0631 \u0645\u06cc\u06a9\u0646\u0647\u061f<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/shahaab-co.com\/mag\/news\/how-to-find-hidden-spy-cameras-in-hotels\/\">\u062f\u0648\u0631\u0628\u06cc\u0646 \u0647\u0627\u06cc \u062c\u0627\u0633\u0648\u0633\u06cc \u062f\u0631 \u0647\u062a\u0644 \u0647\u0627! \u0686\u06af\u0648\u0646\u0647 \u067e\u06cc\u062f\u0627\u06cc\u0634\u0627\u0646 \u06a9\u0646\u06cc\u0645\u061f<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/shahaab-co.com\/mag\/news\/how-autonomous-vehicles-see-surroundings\/\">\u062e\u0648\u062f\u0631\u0648\u0647\u0627\u06cc \u0628\u062f\u0648\u0646 \u0633\u0631\u0646\u0634\u06cc\u0646 \u0686\u06af\u0648\u0646\u0647 \u0645\u062d\u06cc\u0637 \u0627\u0637\u0631\u0627\u0641 \u0631\u0627 \u0645\u06cc \u0628\u06cc\u0646\u0646\u062f\u061f<\/a><\/li>\n<\/ul>\n\n<a href=\"#\" class=\"shortc-button small blue \">\u0645\u0646\u0628\u0639<\/a> <a href=\"https:\/\/medium.com\/analytics-vidhya\/getting-started-with-tensorflow-the-easy-way-part-4-b468d99b06\" target=\"_blank\" class=\"shortc-button small gray \" rel=\"noopener\">medium.com<\/a>\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-right kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;4966&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;0&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;0&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;\u0627\u0645\u062a\u06cc\u0627\u0632 \u062f\u0647\u06cc\u062f!&quot;,&quot;legend&quot;:&quot;0\\\/5 - (0 \u0627\u0645\u062a\u06cc\u0627\u0632)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;\u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc TensorFlow \u0628\u0647 \u0631\u0648\u0634\u06cc \u0633\u0627\u062f\u0647 (\u0628\u062e\u0634 \u0686\u0647\u0627\u0631\u0645)&quot;,&quot;width&quot;:&quot;0&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} \u0627\u0645\u062a\u06cc\u0627\u0632)&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 0px;\">\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            <span class=\"kksr-muted\">\u0627\u0645\u062a\u06cc\u0627\u0632 \u062f\u0647\u06cc\u062f!<\/span>\n    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647 \u0642\u0633\u0645\u062a \u0686\u0647\u0627\u0631\u0645 \u0627\u0632 \u0633\u0631\u06cc \u0645\u0642\u0627\u0644\u0647 \u0647\u0627\u06cc \u0622\u0645\u0648\u0632\u0634 TensorFlow \u0628\u0647 \u0631\u0648\u0634\u06cc \u0633\u0627\u062f\u0647 \u0627\u0633\u062a \u06a9\u0647 \u062f\u0631 \u0627\u06cc\u0646 \u0642\u0633\u0645\u062a \u0628\u0647 \u0628\u0631\u0631\u0633\u06cc \u06cc\u06a9 \u0645\u062b\u0627\u0644 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u062f\u0631 \u062a\u0646\u0633\u0648\u0631 \u0641\u0644\u0648 \u0628\u0627 \u0639\u0646\u0648\u0627\u0646 &#8220;\u0627\u062c\u0631\u0627\u06cc \u06cc\u06a9 \u0645\u062b\u0627\u0644 \u0627\u0632 \u0637\u0628\u0642\u0647 \u0628\u0646\u062f\u06cc \u062f\u0631 Tensorflow&#8221; \u062e\u0648\u0627\u0647\u06cc\u0645 \u067e\u0631\u062f\u0627\u062e\u062a. \u0645\u0642\u0627\u0644\u0647 \u0645\u0631\u062a\u0628\u0637 : \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc TensorFlow \u0628\u0647 \u0631\u0648\u0634 \u0633\u0627\u062f\u0647 (\u0628\u062e\u0634 \u0627\u0648\u0644) \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc TensorFlow \u0628\u0647 \u0631\u0648\u0634 \u0633\u0627\u062f\u0647 (\u0628\u062e\u0634 \u062f\u0648\u0645) &hellip;<\/p>\n","protected":false},"author":11,"featured_media":5033,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","footnotes":""},"categories":[19,18],"tags":[96,84,147,82],"class_list":["post-4966","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-deep-learning","category-edu","tag-jupyter-notebook","tag-84","tag-147","tag-82"],"_links":{"self":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/posts\/4966","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/comments?post=4966"}],"version-history":[{"count":1,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/posts\/4966\/revisions"}],"predecessor-version":[{"id":16846,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/posts\/4966\/revisions\/16846"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/media\/5033"}],"wp:attachment":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/media?parent=4966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/categories?post=4966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/tags?post=4966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}