{"id":4834,"date":"2020-02-15T12:20:25","date_gmt":"2020-02-15T12:20:25","guid":{"rendered":"https:\/\/prwatech.in\/blog\/?p=4834"},"modified":"2024-03-15T11:49:43","modified_gmt":"2024-03-15T11:49:43","slug":"naive-bayes-classifier-in-machine-learning","status":"publish","type":"post","link":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/","title":{"rendered":"Naive Bayes Classifier in Machine Learning"},"content":{"rendered":"<h1>Naive Bayes Classifier in Machine Learning<\/h1>\n<p><strong>Naive Bayes Classifier in Machine Learning<\/strong>, in this Tutorial one can learn naive bayes classifier tutorial. Are you the one who is looking for the best platform which provides information about know How Naive Bayes Algorithm Works,introduction to naive bayes algorithm, naive bayes classifier example? Or the one who is looking forward to taking the advanced <a href=\"https:\/\/prwatech.in\/data-science-certification-course-in-bangalore\/\">Data Science Certification Course<\/a> with Machine Learning from India\u2019s Leading <a href=\"https:\/\/prwatech.in\/data-science-training-institutes-in-bangalore\/\">Data Science Training institute<\/a>? Then you\u2019ve landed on the Right Path.<\/p>\n<p><strong>Bayes theorem<\/strong> finds many uses within the applied mathematics and statistics. There\u2019s a micro chance that you just just haven&#8217;t heard about this theorem in your life. seems that this theorem has found its way into the planet of machine learning, to make one in all the highly decorated algorithms. Naive Bayes may be a probabilistic machine learning algorithm supported the Bayes Theorem, utilized in a good style of classification tasks.<\/p>\n<p>The Below mentioned <strong>naive bayes classifier Tutorial<\/strong> will help to Understand the detailed information about Naive Bayes Classifier in Machine Learning, so Just follow all the tutorials of India\u2019s Leading Best <a href=\"https:\/\/prwatech.in\/data-science-training-institutes-in-bangalore\/\">Data Science Training institute in Bangalore<\/a> and Be a Pro <a href=\"https:\/\/prwatech.in\/data-science-certification-course-in-bangalore\/\">Data Scientist<\/a> or Machine Learning Engineer.<\/p>\n<h2>Introduction to Naive Bayes Algorithm<\/h2>\n<p>Naive Bayes is a classification technique which is based on\u00a0Bayes\u2019 Theorem. It holds the assumption of independence among predictors.\u00a0<strong>Bayes\u2019 Theorem<\/strong>\u00a0is a way of calculating a\u00a0probability\u00a0when we know certain other probabilities.<\/p>\n<p>The formula is:<\/p>\n<p style=\"text-align: center;\">P(A|B) =\u00a0(P(A)* P(B|A)) \/ P(B)<\/p>\n<p>P(A|B): indicates how often A happens, given that B occurs.<\/p>\n<p>P(B|A): indicates how often B happens, given that A occurs.<\/p>\n<p>P(A): Indicates how A is on its own.<\/p>\n<p>P(B): Indicates how B is on its own.<\/p>\n<p>Let us say P(Rain) means how often there is Rain, and P(Cloudy) means how often we see Cloudy weather, then:<\/p>\n<p>P(Rain|cloudy) means how often there is rain when we can see cloudy weather.<br \/>\nP(Cloudy|Rain) means how often we can see cloudy weather when there is rain. So, the formula kind of tells us &#8220;forwards&#8221;\u00a0P(Rain|Cloudy)\u00a0when we know &#8220;backwards&#8221;\u00a0P(Cloudy|Rain).<\/p>\n<div class=\"flex-1 overflow-hidden\">\n<div class=\"react-scroll-to-bottom--css-koqot-79elbk h-full\">\n<div class=\"react-scroll-to-bottom--css-koqot-1n7m0yu\">\n<div class=\"flex flex-col text-sm pb-9\">\n<div class=\"w-full text-token-text-primary\" data-testid=\"conversation-turn-15\">\n<div class=\"px-4 py-2 justify-center text-base md:gap-6 m-auto\">\n<div class=\"flex flex-1 text-base mx-auto gap-3 md:px-5 lg:px-1 xl:px-5 md:max-w-3xl lg:max-w-[40rem] xl:max-w-[48rem] group final-completion\">\n<div class=\"relative flex w-full flex-col agent-turn\">\n<div class=\"flex-col gap-1 md:gap-3\">\n<div class=\"flex flex-grow flex-col max-w-full\">\n<div class=\"min-h-[20px] text-message flex flex-col items-start gap-3 whitespace-pre-wrap break-words [.text-message+&amp;]:mt-5 overflow-x-auto\" data-message-author-role=\"assistant\" data-message-id=\"35e4bcea-b99c-4bb5-b8df-78bfed803de6\">\n<div class=\"markdown prose w-full break-words dark:prose-invert light\">\n<p>Bayes&#8217; theorem stands as one of the fundamental probabilistic inference algorithms, pioneered by Reverend Bayes. In essence, the Naive Bayes classifier operates under the assumption that the presence of a particular feature in a class is independent of the presence of any other feature. For instance, consider a tennis ball, which may be identified as such if it exhibits characteristics such as fluorescent yellow color, round shape, and approximately 2.7 inches in diameter. Each of these attributes independently contributes to the probability of the ball being classified as a tennis ball, irrespective of any potential interdependencies between them. Consequently, the classifier is termed &#8216;Naive&#8217; due to its simplistic assumption of feature independence.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Naive Bayes classifiers are an assembly of classification algorithms based on\u00a0Bayes\u2019 Theorem. Unlike single algorithms, it is a family of algorithms where all algorithms will share a mutual principle of having pair of independent features being classified.<\/p>\n<h2>Naive Bayes Classifier Example<\/h2>\n<p>To start with, let us consider a data set.<\/p>\n<table width=\"85%\">\n<tbody>\n<tr>\n<td width=\"8%\"><\/td>\n<td width=\"18%\"><strong>Outlook<\/strong><\/td>\n<td width=\"22%\"><strong>Temperature <\/strong><\/td>\n<td width=\"19%\"><strong>humidity<\/strong><\/td>\n<td width=\"15%\"><strong>windy<\/strong><\/td>\n<td width=\"14%\"><strong>Cricket<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"8%\"><strong>0<\/strong><\/td>\n<td width=\"18%\">Rainy<\/td>\n<td width=\"22%\">Hot<\/td>\n<td width=\"19%\">High<\/td>\n<td width=\"15%\">False<\/td>\n<td width=\"14%\">No<\/td>\n<\/tr>\n<tr>\n<td width=\"8%\"><strong>1<\/strong><\/td>\n<td width=\"18%\">Rainy<\/td>\n<td width=\"22%\">Hot<\/td>\n<td width=\"19%\">High<\/td>\n<td width=\"15%\">True<\/td>\n<td width=\"14%\">No<\/td>\n<\/tr>\n<tr>\n<td width=\"8%\"><strong>2<\/strong><\/td>\n<td width=\"18%\">Overcast<\/td>\n<td width=\"22%\">Hot<\/td>\n<td width=\"19%\">High<\/td>\n<td width=\"15%\">False<\/td>\n<td width=\"14%\">Yes<\/td>\n<\/tr>\n<tr>\n<td width=\"8%\"><strong>3<\/strong><\/td>\n<td width=\"18%\">Sunny<\/td>\n<td width=\"22%\">Mild<\/td>\n<td width=\"19%\">High<\/td>\n<td width=\"15%\">False<\/td>\n<td width=\"14%\">Yes<\/td>\n<\/tr>\n<tr>\n<td width=\"8%\"><strong>4<\/strong><\/td>\n<td width=\"18%\">Sunny<\/td>\n<td width=\"22%\">Cool<\/td>\n<td width=\"19%\">Normal<\/td>\n<td width=\"15%\">False<\/td>\n<td width=\"14%\">Yes<\/td>\n<\/tr>\n<tr>\n<td width=\"8%\"><strong>5<\/strong><\/td>\n<td width=\"18%\">Sunny<\/td>\n<td width=\"22%\">Cool<\/td>\n<td width=\"19%\">Normal<\/td>\n<td width=\"15%\">True<\/td>\n<td width=\"14%\">No<\/td>\n<\/tr>\n<tr>\n<td width=\"8%\"><strong>6<\/strong><\/td>\n<td width=\"18%\">Overcast<\/td>\n<td width=\"22%\">Cool<\/td>\n<td width=\"19%\">Normal<\/td>\n<td width=\"15%\">True<\/td>\n<td width=\"14%\">Yes<\/td>\n<\/tr>\n<tr>\n<td width=\"8%\"><strong>7<\/strong><\/td>\n<td width=\"18%\">Rainy<\/td>\n<td width=\"22%\">Mild<\/td>\n<td width=\"19%\">High<\/td>\n<td width=\"15%\">False<\/td>\n<td width=\"14%\">No<\/td>\n<\/tr>\n<tr>\n<td width=\"8%\"><strong>8<\/strong><\/td>\n<td width=\"18%\">Rainy<\/td>\n<td width=\"22%\">Cool<\/td>\n<td width=\"19%\">Normal<\/td>\n<td width=\"15%\">False<\/td>\n<td width=\"14%\">Yes<\/td>\n<\/tr>\n<tr>\n<td width=\"8%\"><strong>9<\/strong><\/td>\n<td width=\"18%\">Sunny<\/td>\n<td width=\"22%\">Mild<\/td>\n<td width=\"19%\">Normal<\/td>\n<td width=\"15%\">False<\/td>\n<td width=\"14%\">Yes<\/td>\n<\/tr>\n<tr>\n<td width=\"8%\"><strong>10<\/strong><\/td>\n<td width=\"18%\">Rainy<\/td>\n<td width=\"22%\">Mild<\/td>\n<td width=\"19%\">Normal<\/td>\n<td width=\"15%\">True<\/td>\n<td width=\"14%\">Yes<\/td>\n<\/tr>\n<tr>\n<td width=\"8%\"><strong>11<\/strong><\/td>\n<td width=\"18%\">Overcast<\/td>\n<td width=\"22%\">Mild<\/td>\n<td width=\"19%\">High<\/td>\n<td width=\"15%\">True<\/td>\n<td width=\"14%\">Yes<\/td>\n<\/tr>\n<tr>\n<td width=\"8%\"><strong>12<\/strong><\/td>\n<td width=\"18%\">Overcast<\/td>\n<td width=\"22%\">Hot<\/td>\n<td width=\"19%\">Normal<\/td>\n<td width=\"15%\">False<\/td>\n<td width=\"14%\">Yes<\/td>\n<\/tr>\n<tr>\n<td width=\"8%\"><strong>13<\/strong><\/td>\n<td width=\"18%\">Sunny<\/td>\n<td width=\"22%\">Mild<\/td>\n<td width=\"19%\">High<\/td>\n<td width=\"15%\">True<\/td>\n<td width=\"14%\">No<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Let\u2019s divide the set into two parts. One part is of features, which is feature matrix and one part is nothing but the target column which is also called response vector.<\/p>\n<p>In this example the features included in feature matrix are \u2018Outlook\u2019, \u2018Temperature\u2019, \u2018Humidity\u2019 and \u2018Windy\u2019. Response vector contains the value of\u00a0target variable which is to be predicted for each row of feature matrix. In this example the column named \u2018Cricket\u2019 is a response vector.<\/p>\n<p>The fundamental Na\u00efve Bayes assumes, each feature makes independent as well as equal contribution to the outcome.<\/p>\n<h3>This concept can be understood with relation to our data set as follows:<\/h3>\n<p>We assume that there is no any pair with dependent features. Example, the temperature categorized as \u2018Hot\u2019 has no dependency on humidity or the view being \u2018Rainy\u2019 has no effect on the winds. So, the features are expected to be\u00a0self-governing.<\/p>\n<p>And each feature is given the same weight. In this example, knowing only temperature and humidity we can\u2019t forecast the outcome precisely. None of the attributes is immaterial and assumed to be contributing\u00a0equally\u00a0to the outcome.<\/p>\n<p>There is needed to make some assumptions in case of continuous data, regarding the distribution of values of each feature. Based on the assumptions made regarding the distribution of P (xi\u00a0| y), Naive Bayes Classifiers differ from each other.<\/p>\n<h3>How Naive Bayes Algorithm Works?<\/h3>\n<p>Now, we discuss one of such classifiers here. In case of above example, let\u2019s indicate dependent vector by \u2018y\u2019 and the set of the features as X where it contains features as:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4835\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB7.png\" alt=\"naive bayes algorithm in python\" width=\"850\" height=\"505\" \/><\/p>\n<p>Now we can apply Bayes theorem as<\/p>\n<p>Suppose we consider a case.<\/p>\n<p>X= sunny, mild, Normal, False<\/p>\n<p>So now we have to predict Y<\/p>\n<p>In case of probability that cricket will be played<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4836\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB2.png\" alt=\"naive bayes algorithm\" width=\"850\" height=\"110\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB2.png 681w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB2-300x39.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>And in case of probability of not playing cricket we can write equation as:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4837\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB3.png\" alt=\"naive bayes classifier\" width=\"850\" height=\"99\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB3.png 653w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB3-300x35.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>After mathematical calculation (with reference of probability concept we can calculate probability of each feature with respect to dependent variable conditions (for y) \u2018Yes\u2019 and \u2018No\u2019.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4838\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB8.png\" alt=\"naive bayes algorithm tutorial\" width=\"850\" height=\"515\" \/><\/p>\n<p>So, finally for combination of:\u00a0 <strong>X= <\/strong><strong>sunny, mild, Normal, False<\/strong><\/p>\n<p>We will get the predicted value of Y As <strong>Y= Yes<\/strong><\/p>\n<p>In this example the data given was of discrete type. What if the data is having continuous nature? For that purpose, we have to apply Gaussian Naive Bayes. The different naive Bayes classifiers have different assumptions regarding the distribution of only by the assumptions they make regarding the distribution of P (xi | y).<\/p>\n<h3>Gaussian Naive Bayes Classifier<\/h3>\n<p>Continuous values related to each feature are assumed to be distributed according to a\u00a0Gaussian distribution in Gaussian Naive Bayes. A Gaussian distribution is known as Normal distribution. It gives a bell-shaped curve, after plotting, which is symmetric about the mean of the feature values. It can be shown as follows:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4839\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB4.png\" alt=\"Gaussian Naive Bayes classifier\" width=\"850\" height=\"741\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB4.png 451w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB4-300x261.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>The probability of the features is considered to be Gaussian. The corresponding conditional probability is given by:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4840\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB5.png\" alt=\"gaussian naive bayes\" width=\"850\" height=\"124\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB5.png 396w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB5-300x44.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>Now, we will try to implement Gaussian Naive Bayes classifier with scikit-learn.<\/p>\n<h3># Initializing and importing libraries. Loading file<\/h3>\n<p>Import pandas as pd<\/p>\n<p>Df= pd.read_csv<em>(\u201cYour file Path\u201d)<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4841\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB6.png\" alt=\"gaussian naive bayes Probability\" width=\"850\" height=\"194\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB6.png 709w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB6-300x69.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3># Allotting variables for the feature matrix as(X) and response vector as (y)<\/h3>\n<p>X = df.drop([\u2018Outcome\u2019],axis=\u2019columns\u2019)<\/p>\n<p>y = df[[\u2018Outcome\u2019]]<\/p>\n<h3># Now splitting X and y into training and testing sets<\/h3>\n<p>from sklearn.model_selection import train_test_split<\/p>\n<p>X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.25, random_state=0)<\/p>\n<h3># Importing Gaussian from sklearn.naive_bayes<\/h3>\n<p>from sklearn.naive_bayes import GaussianNB<\/p>\n<p>gnb = GaussianNB()<\/p>\n<p>gnb.fit(X_train, y_train)<\/p>\n<h3># Testing for test set.<\/h3>\n<p>y_pred = gnb.predict(X_test)<\/p>\n<h3># Getting accuracy of prediction<\/h3>\n<p>Acc_NB = metrics.accuracy_score(y_test, y_pred)<\/p>\n<p>from sklearn import metrics<\/p>\n<p>print (&#8220;Gaussian Naive Bayes model accuracy:&#8221;, Acc_NB*100)<\/p>\n<p>Gaussian Naive Bayes model accuracy: 79.16666666666666<\/p>\n<p>We hope you understand Naive Bayes Classifier in Machine Learning.Get success in your career as a Data Scientist by being a part of the <a href=\"https:\/\/prwatech.com\/\">Prwatech<\/a>, India&#8217;s leading <a href=\"https:\/\/prwatech.in\/data-science-certification-course-in-bangalore\/\">Data Science training institute in Bangalore<\/a>.<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/EGbyBqFlTcQ\" width=\"850\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Naive Bayes Classifier in Machine Learning Naive Bayes Classifier in Machine Learning, in this Tutorial one can learn naive bayes classifier tutorial. Are you the one who is looking for the best platform which provides information about know How Naive Bayes Algorithm Works,introduction to naive bayes algorithm, naive bayes classifier example? Or the one who [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32,1696],"tags":[1753,1755,458,1754],"class_list":["post-4834","post","type-post","status-publish","format-standard","hentry","category-machine-learning","category-machine-learning-modules","tag-a-gentle-introduction-to-naive-bayes-for-machine-learning","tag-machine-learning-naive-bayes-classifier-with-python-examples","tag-naive-bayes-classifier-in-machine-learning","tag-understanding-naive-bayes-classifiers-advantages-and-applications"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Naive Bayes Classification: A Beginner&#039;s Guide - Prwatech<\/title>\n<meta name=\"description\" content=\"Explore naive bayes classifier in machine learning.Learn introduction to naive bayes algorithm, its example, how naive bayes algorithm\" \/>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Naive Bayes Classification: A Beginner&#039;s Guide - Prwatech\" \/>\n<meta property=\"og:description\" content=\"Explore naive bayes classifier in machine learning.Learn introduction to naive bayes algorithm, its example, how naive bayes algorithm\" \/>\n<meta property=\"og:url\" content=\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/\" \/>\n<meta property=\"og:site_name\" content=\"Prwatech\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prwatech.in\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-15T12:20:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-15T11:49:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB7.png\" \/>\n<meta name=\"author\" content=\"Prwatech\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:site\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prwatech\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/\",\"url\":\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/\",\"name\":\"Naive Bayes Classification: A Beginner's Guide - Prwatech\",\"isPartOf\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB7.png\",\"datePublished\":\"2020-02-15T12:20:25+00:00\",\"dateModified\":\"2024-03-15T11:49:43+00:00\",\"author\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\"},\"description\":\"Explore naive bayes classifier in machine learning.Learn introduction to naive bayes algorithm, its example, how naive bayes algorithm\",\"breadcrumb\":{\"@id\":\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/#primaryimage\",\"url\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB7.png\",\"contentUrl\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB7.png\",\"width\":266,\"height\":158},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/prwatech.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Naive Bayes Classifier in Machine Learning\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/prwatech.in\/blog\/#website\",\"url\":\"https:\/\/prwatech.in\/blog\/\",\"name\":\"Prwatech\",\"description\":\"Share Ideas, Start Something Good.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/prwatech.in\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\",\"name\":\"Prwatech\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"caption\":\"Prwatech\"},\"url\":\"https:\/\/prwatech.in\/blog\/author\/prwatech123\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Naive Bayes Classification: A Beginner's Guide - Prwatech","description":"Explore naive bayes classifier in machine learning.Learn introduction to naive bayes algorithm, its example, how naive bayes algorithm","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"Naive Bayes Classification: A Beginner's Guide - Prwatech","og_description":"Explore naive bayes classifier in machine learning.Learn introduction to naive bayes algorithm, its example, how naive bayes algorithm","og_url":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/","og_site_name":"Prwatech","article_publisher":"https:\/\/www.facebook.com\/prwatech.in\/","article_published_time":"2020-02-15T12:20:25+00:00","article_modified_time":"2024-03-15T11:49:43+00:00","og_image":[{"url":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB7.png","type":"","width":"","height":""}],"author":"Prwatech","twitter_card":"summary_large_image","twitter_creator":"@Eduprwatech","twitter_site":"@Eduprwatech","twitter_misc":{"Written by":"Prwatech","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/","url":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/","name":"Naive Bayes Classification: A Beginner's Guide - Prwatech","isPartOf":{"@id":"https:\/\/prwatech.in\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/#primaryimage"},"image":{"@id":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/#primaryimage"},"thumbnailUrl":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB7.png","datePublished":"2020-02-15T12:20:25+00:00","dateModified":"2024-03-15T11:49:43+00:00","author":{"@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3"},"description":"Explore naive bayes classifier in machine learning.Learn introduction to naive bayes algorithm, its example, how naive bayes algorithm","breadcrumb":{"@id":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/#primaryimage","url":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB7.png","contentUrl":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2020\/02\/NB7.png","width":266,"height":158},{"@type":"BreadcrumbList","@id":"https:\/\/prwatech.in\/blog\/machine-learning\/machine-learning-modules\/naive-bayes-classifier-in-machine-learning\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/prwatech.in\/blog\/"},{"@type":"ListItem","position":2,"name":"Naive Bayes Classifier in Machine Learning"}]},{"@type":"WebSite","@id":"https:\/\/prwatech.in\/blog\/#website","url":"https:\/\/prwatech.in\/blog\/","name":"Prwatech","description":"Share Ideas, Start Something Good.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/prwatech.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3","name":"Prwatech","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","caption":"Prwatech"},"url":"https:\/\/prwatech.in\/blog\/author\/prwatech123\/"}]}},"_links":{"self":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/4834","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/comments?post=4834"}],"version-history":[{"count":9,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/4834\/revisions"}],"predecessor-version":[{"id":10916,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/4834\/revisions\/10916"}],"wp:attachment":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/media?parent=4834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/categories?post=4834"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/tags?post=4834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}