

{"id":3734,"date":"2017-08-17T10:34:27","date_gmt":"2017-08-17T10:34:27","guid":{"rendered":"http:\/\/data-flair.training\/blogs\/?p=3734"},"modified":"2021-08-25T17:27:05","modified_gmt":"2021-08-25T11:57:05","slug":"e1071-in-r","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/e1071-in-r\/","title":{"rendered":"e1071 Package &#8211; Perfect Guide on SVM Training &amp; Testing Models in R"},"content":{"rendered":"<p>We are going to discuss about the e1071 package in R. We will understand the SVM training and testing models in R and look at the main functions of e1071 package i.e. <em>svm(), predict(), plot(), tune()<\/em> to execute SVM in R.<\/p>\n<p>Let&#8217;s start the tutorial.<\/p>\n<h2>R &#8211; SVM Training and Testing Models<\/h2>\n<p>There are several packages to execute SVM in R. The first and most intuitive package is the e1071 package.<\/p>\n<p><strong>The e1071 Package:<\/strong><\/p>\n<p>This package was the first implementation of SVM in R.<\/p>\n<p>With the svm() function, we achieve a rigid interface in the libsvm by using visualization and parameter tuning methods.<\/p>\n<p>Refer some of the features of libsvm library given below:<\/p>\n<ul>\n<li>Offers quick and easy implementation of SVMs.<\/li>\n<li>Provides most common kernels, including<em> linear, polynomial, RBF, and sigmoid.<\/em><\/li>\n<li>Offers computation power for decision and probability values for predictions. Also provides weighing of classes in the classification mode and cross-validation.<\/li>\n<\/ul>\n<p>First, you need to set the path to include the directory where the e1071 package is. Then you have to install and include it.<\/p>\n<p>You can use &#8216;<em>?svm&#8217;<\/em> to see the help information of the interface.<\/p>\n<p>Install e1071 package and load it using the following commands:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">install.packages (\u2018e1071\u2019, dependencies = TRUE)\r\nlibrary(e1071)<\/pre>\n<p>The R implementation depends on the S3 class mechanism. It provides a training function with standard and formula interfaces, and a<em> predict() <\/em>method. Also provides a <em>plot()<\/em> method for <em>visualizing data, support vectors, and decision boundaries.<\/em> We can perform hyperparameter tuning by using the<em> tune()<\/em> framework. It performs a grid search over specified parameter ranges.<\/p>\n<p><em><strong>Learn to create S3 and S4 class in R from the\u00a0<\/strong><strong><a href=\"https:\/\/data-flair.training\/blogs\/object-oriented-programming-in-r\/\">tutorial\u00a0on\u00a0Object Oriented Programming in R<\/a><\/strong><\/em><\/p>\n<h3>Functions in e1071 Package<\/h3>\n<p>The main functions in the e1071 package are:<\/p>\n<ul>\n<li><strong>svm() &#8211;<\/strong>\u00a0Used to train SVM.<\/li>\n<li><strong>predict() &#8211;<\/strong>\u00a0Using this method, we obtain predictions from the model, as well as decision values from the binary classifiers.<\/li>\n<li><strong>plot() &#8211;<\/strong>\u00a0Visualizing data, support vectors and decision boundaries, if provided.<\/li>\n<li><strong>tune() &#8211;<\/strong>\u00a0Hyperparameter tuning uses <em>tune()<\/em> to perform a grid search over specified parameter ranges.<\/li>\n<\/ul>\n<h4>1. The svm() Function<\/h4>\n<p>The svm() function trains an SVM. It can perform general regression and classification, as well as density-estimation. It provides a formula interface.<\/p>\n<p>The below data describes some import parameters of the svm() function:<\/p>\n<p><strong>1.1 Data &#8211;<\/strong> Specifies an optional data frame that contains the variables present in a model. When you use this parameter, then you don&#8217;t need to use the x and y parameters. Take the variables by default from the environment through which \u2018svm\u2019 is called from.<\/p>\n<ul>\n<li><em>X &#8211;<\/em> A data matrix, a vector, or a sparse matrix (object of class matrix provided by the matrix package). It represents the instances of the dataset and their respective properties. In a data matrix, rows represent the instances whereas columns represent the properties.<\/li>\n<\/ul>\n<p><em><strong>Master the <a href=\"https:\/\/data-flair.training\/blogs\/r-linear-regression-tutorial\/\">Working of Multiple Linear Regression in R<\/a><\/strong><\/em><\/p>\n<p><strong>1.2 Type &#8211;<\/strong>\u00a0We can use SVM as a <em>classification machine, regression machine, or for novelty detection.<\/em> It is dependent on y, that is, whether it is a factor not, the type takes C-classification or eps-regression as its default setting. It may be overwritten by setting an explicit value. Valid options are:<\/p>\n<ul>\n<li>C-classification<\/li>\n<li>nu-classification<\/li>\n<li>one-classification (for novelty detection)<\/li>\n<li>eps-regression<\/li>\n<li>nu-regression<\/li>\n<li>degree<\/li>\n<\/ul>\n<p><strong>1.3 parameter \u2013<\/strong> It is required for the kernel of type polynomial (default: 3).<\/p>\n<ul>\n<li><em>gamma &#8211;<\/em>\u00a0All the kernels except the linear one require the gamma parameter.<\/li>\n<li><em>coef0 &#8211;<\/em>\u00a0Parameter needed for kernels of type polynomial and sigmoid (default: 0).<\/li>\n<li><em>cost &#8211;<\/em>\u00a0The cost of constraints violation (default: 1)&#8212;it is the \u2018C\u2019-constant of the regularization term in the Lagrange formulation.<\/li>\n<\/ul>\n<h4>2. The plot() Function<\/h4>\n<p>Use the<em> plot()<\/em> function to view the built model with a scatter plot of the input. It optionally draws a filled contour plot of the class regions. plot() function is used to <em>represent data, support vectors and models in a visual form.<\/em>\u00a0Let&#8217;s learn how to use this function:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">plot.svm(x, data, formula, fill = TRUE, grid = 50, slice = list(),symbolPalette = palette(), svSymbol = \"x\", dataSymbol = \"o\", ...)<\/pre>\n<p>Here,<\/p>\n<ul>\n<li><strong>x<\/strong> &#8211; An object of class svm.<\/li>\n<li><strong>Formula<\/strong> &#8211; Formula selecting the visualized two dimensions. Only needed, when we use more than two input variables.<\/li>\n<li><strong>Fill<\/strong> &#8211; Switch indicating whether a contour plot for the class regions should be added.<\/li>\n<li><strong>Grid<\/strong> &#8211; Granularity for the contour plot.<\/li>\n<li><strong>Slice<\/strong> &#8211; A list of named numeric values for the dimensions are held constant. If dimensions are not specified, we can fix it at 0.<\/li>\n<li><strong>Model<\/strong> &#8211; Represents an object of class svm data, resulting from the svm() function.<\/li>\n<li><strong>Data<\/strong> &#8211; Represents the data to visualize. It should use the same data used for building the model in the svm() function.<\/li>\n<li><strong>symbolPalette<\/strong> &#8211; Color palette used for the class the data points and support vectors belong to.<\/li>\n<li><strong>svSymbol<\/strong> &#8211; Symbol used for support vectors.<\/li>\n<li><strong>dataSymbol<\/strong> &#8211; Symbol used for data points (other than support vectors).<\/li>\n<\/ul>\n<p>SVM allows simple graphical visualization of classification models.<\/p>\n<h2>Creating SVM Model in R<\/h2>\n<p>In order to create our SVM model, we will use the e1071 library and the iris dataset in <a href=\"https:\/\/www.r-project.org\/\">R<\/a>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#Author DataFlair\r\nlibrary(\"e1071\")\r\ndata(\"iris\")\r\nhead(iris)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/library-e1071.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-63770\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/library-e1071.jpg\" alt=\"library e1071\" width=\"1299\" height=\"741\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/library-e1071.jpg 1299w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/library-e1071-150x86.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/library-e1071-300x171.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/library-e1071-768x438.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/library-e1071-1024x584.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/library-e1071-520x297.jpg 520w\" sizes=\"auto, (max-width: 1299px) 100vw, 1299px\" \/><\/a><\/p>\n<p>In the next step, we will partition our dataset into x and y variables. The x variables consist of all the independent variables such as <em>Sepal.length, Sepal.Width<\/em> etc. and y variable comprises of the Species, that is, <em>setosa, versicolor and virginica.<\/em><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">x &lt;- iris[,-5]\r\ny &lt;- iris[5]\r\nmodel_svm &lt;- svm(Species ~ ., data=iris)\r\nsummary(svm_model)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/x-y-iris-SVM-2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-63771\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/x-y-iris-SVM-2.jpg\" alt=\"x-y-iris-SVM 2\" width=\"1299\" height=\"741\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/x-y-iris-SVM-2.jpg 1299w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/x-y-iris-SVM-2-150x86.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/x-y-iris-SVM-2-300x171.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/x-y-iris-SVM-2-768x438.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/x-y-iris-SVM-2-1024x584.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/x-y-iris-SVM-2-520x297.jpg 520w\" sizes=\"auto, (max-width: 1299px) 100vw, 1299px\" \/><\/a><\/p>\n<p>In the final step, we will perform predictions based on our input variable x. Then, we will create a confusion matrix to evaluate the result of the SVM prediction and the class data.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">pred &lt;- predict(model_svm,x)\r\n\r\nconfusionMatrix(pred,y$Species)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/pre-predict-model_svm.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-63772\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/pre-predict-model_svm.jpg\" alt=\"pre predict model_svm\" width=\"1299\" height=\"741\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/pre-predict-model_svm.jpg 1299w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/pre-predict-model_svm-150x86.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/pre-predict-model_svm-300x171.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/pre-predict-model_svm-768x438.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/pre-predict-model_svm-1024x584.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/pre-predict-model_svm-520x297.jpg 520w\" sizes=\"auto, (max-width: 1299px) 100vw, 1299px\" \/><\/a><\/p>\n<h2>Summary<\/h2>\n<p>In this tutorial of e1071 packages in R, we discussed the training and testing models in R. We also saw the main functions of e1071 packages in R that are <em>SVM, Plot, Predict, Tune.<\/em><\/p>\n<p><em><strong>Up next in our R DataFlair Tutorial Series &#8211; <a href=\"https:\/\/data-flair.training\/blogs\/bayesian-network-in-r\/\">Bayesian Network in R<\/a><\/strong><\/em><\/p>\n<p>If you have any query or suggestion related to the tutorial, feel free to share with us. We will definitely solve them.<span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:1282,&quot;href&quot;:&quot;https:\\\/\\\/www.r-project.org&quot;,&quot;archived_href&quot;:&quot;&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[],&quot;broken&quot;:false,&quot;last_checked&quot;:null,&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are going to discuss about the e1071 package in R. We will understand the SVM training and testing models in R and look at the main functions of e1071 package i.e. svm(), predict(),&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":63781,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51],"tags":[20634,20632,20633,13984,14008],"class_list":["post-3734","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-r","tag-create-svm-model-in-r","tag-e1071-package","tag-e1071-package-functions","tag-support-vector-machine","tag-svm-training-and-testing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>e1071 Package - Perfect Guide on SVM Training &amp; Testing Models in R - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn about the e1071 package in R, usage of svm() and plot() function and steps to create SVM model in R programming with the help of syntax.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/e1071-in-r\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"e1071 Package - Perfect Guide on SVM Training &amp; Testing Models in R - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn about the e1071 package in R, usage of svm() and plot() function and steps to create SVM model in R programming with the help of syntax.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/e1071-in-r\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-08-17T10:34:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-25T11:57:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/e1071-Package-in-R-01-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"802\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"e1071 Package - Perfect Guide on SVM Training &amp; Testing Models in R - DataFlair","description":"Learn about the e1071 package in R, usage of svm() and plot() function and steps to create SVM model in R programming with the help of syntax.","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:\/\/data-flair.training\/blogs\/e1071-in-r\/","og_locale":"en_US","og_type":"article","og_title":"e1071 Package - Perfect Guide on SVM Training &amp; Testing Models in R - DataFlair","og_description":"Learn about the e1071 package in R, usage of svm() and plot() function and steps to create SVM model in R programming with the help of syntax.","og_url":"https:\/\/data-flair.training\/blogs\/e1071-in-r\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2017-08-17T10:34:27+00:00","article_modified_time":"2021-08-25T11:57:05+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/e1071-Package-in-R-01-1.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/e1071-in-r\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/e1071-in-r\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"e1071 Package &#8211; Perfect Guide on SVM Training &amp; Testing Models in R","datePublished":"2017-08-17T10:34:27+00:00","dateModified":"2021-08-25T11:57:05+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/e1071-in-r\/"},"wordCount":977,"commentCount":5,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/e1071-in-r\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/e1071-Package-in-R-01-1.jpg","keywords":["Create SVM Model in R","e1071 package","e1071 Package Functions","Support Vector Machine","SVM Training and testing"],"articleSection":["R Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/e1071-in-r\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/e1071-in-r\/","url":"https:\/\/data-flair.training\/blogs\/e1071-in-r\/","name":"e1071 Package - Perfect Guide on SVM Training &amp; Testing Models in R - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/e1071-in-r\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/e1071-in-r\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/e1071-Package-in-R-01-1.jpg","datePublished":"2017-08-17T10:34:27+00:00","dateModified":"2021-08-25T11:57:05+00:00","description":"Learn about the e1071 package in R, usage of svm() and plot() function and steps to create SVM model in R programming with the help of syntax.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/e1071-in-r\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/e1071-in-r\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/e1071-in-r\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/e1071-Package-in-R-01-1.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/08\/e1071-Package-in-R-01-1.jpg","width":802,"height":420,"caption":"e1071-Package-in-R"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/e1071-in-r\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"R Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/r\/"},{"@type":"ListItem","position":3,"name":"e1071 Package &#8211; Perfect Guide on SVM Training &amp; Testing Models in R"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam2\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/3734","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=3734"}],"version-history":[{"count":10,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/3734\/revisions"}],"predecessor-version":[{"id":63782,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/3734\/revisions\/63782"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/63781"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=3734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=3734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=3734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}