

{"id":5661,"date":"2018-01-17T08:56:55","date_gmt":"2018-01-17T08:56:55","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=5661"},"modified":"2018-09-17T18:02:30","modified_gmt":"2018-09-17T12:32:30","slug":"spark-machine-learning-with-r","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/spark-machine-learning-with-r\/","title":{"rendered":"Spark Machine Learning with R: An Introductory Guide"},"content":{"rendered":"<h2>\u00a01. Objective<\/h2>\n<p><span style=\"font-weight: 400\">Today, in this Spark tutorial, we will learn several <a href=\"https:\/\/data-flair.training\/blogs\/sparkr\/\"><strong>SparkR<\/strong><\/a> Machine Learning algorithms supported by <a href=\"https:\/\/data-flair.training\/blogs\/apache-spark-for-beginners\/\"><strong>Spark<\/strong><\/a>. Such as Classification, Regression, Tree, Clustering, Collaborative Filtering, Frequent Pattern Mining, Statistics, and Model persistence. we will learn all these in detail. Moreover, we will learn a\u00a0few examples to understand Spark Machine Learning with R in a better way.<\/span><\/p>\n<p>So, let&#8217;s start Spark machine Learning with R.<\/p>\n<div id=\"attachment_5662\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Machine-Learning-Algorithms-in-SparkR-01-1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5662\" class=\"wp-image-5662 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Machine-Learning-Algorithms-in-SparkR-01-1.jpg\" alt=\"Spark Machine Learning with R\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Machine-Learning-Algorithms-in-SparkR-01-1.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Machine-Learning-Algorithms-in-SparkR-01-1-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Machine-Learning-Algorithms-in-SparkR-01-1-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Machine-Learning-Algorithms-in-SparkR-01-1-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Machine-Learning-Algorithms-in-SparkR-01-1-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-5662\" class=\"wp-caption-text\">Spark Machine Learning with R: An Introductory Guide<\/p><\/div>\n<h2>2. Spark Machine Learning with R<\/h2>\n<p><span style=\"font-weight: 400\">The following Spark <a href=\"https:\/\/data-flair.training\/blogs\/machine-learning-tutorial\/\">machine learning<\/a> algorithms using R supports currently are,<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span>a. M<span style=\"font-weight: 400\">achine Learning\u00a0<\/span>Classification<br \/>\n<b>spark.logit: Logistic Regression<\/b><br \/>\n<b>spark.mlp: Multilayer Perceptron (MLP)<\/b><b><br \/>\n<\/b><b>spark.naiveBayes: Naive Bayes<\/b><b><br \/>\n<\/b><b>spark.svmLinear: Linear Support Vector Machine<\/b><\/p>\n<h3>b. M<span style=\"font-weight: 400\">achine Learning\u00a0<\/span>Regression<\/h3>\n<p><b>spark.survreg: Accelerated Failure Time (AFT) Survival Model<\/b><b><br \/>\n<\/b><b>spark.glm or glm: Generalized Linear Model (GLM)<\/b><b><br \/>\n<\/b><b>spark.isoreg: Isotonic Regression<\/b><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/apache-spark-machine-learning-algorithm\/\">Let&#8217;s\u00a0have a look at Apache Spark Machine Learning\u00a0Algorithm<\/a><\/strong><\/p>\n<h3>c.\u00a0M<span style=\"font-weight: 400\">achine Learning\u00a0<\/span>Tree<\/h3>\n<p><b>spark.gbt: Gradient Boosted Trees for Regression and Classification<\/b><b><br \/>\n<\/b><b>spark.randomForest: Random Forest for Regression and Classification<\/b><b><\/b><\/p>\n<h3>d. M<span style=\"font-weight: 400\">achine Learning\u00a0<\/span>Clustering<\/h3>\n<p><b>spark.bisectingKmeans: Bisecting k-means<\/b><b><br \/>\n<\/b><b>spark.gaussianMixture: Gaussian Mixture Model (GMM)<\/b><b><br \/>\n<\/b><b>spark.kmeans: K-Means<\/b><b><br \/>\n<\/b><b>spark.lda: Latent Dirichlet Allocation (LDA)<\/b><\/p>\n<h3>e. M<span style=\"font-weight: 400\">achine Learning\u00a0<\/span>Collaborative Filtering<\/h3>\n<p><b>spark.als: Alternating Least Squares (ALS)<\/b><b><br \/>\n<\/b><b>Frequent Pattern Mining<\/b><b><br \/>\n<\/b><b>spark.fpGrowth : FP-growth<\/b><\/p>\n<h3>f. Statistical\u00a0M<span style=\"font-weight: 400\">achine Learning<\/span><\/h3>\n<p><b>spark.kstest: Kolmogorov-Smirnov Test<\/b><br \/>\n<span style=\"font-weight: 400\">Basically, SparkR uses MLlib to train the model. Moreover, it supports a subset of the available <a href=\"https:\/\/data-flair.training\/blogs\/data-analytics-comprehensive-guide\/\">R<\/a> formula operators. For example, model fitting, including \u2018~\u2019, \u2018.\u2019, \u2018:\u2019, \u2018+\u2019, and \u2018-\u2018.<\/span><\/p>\n<h3>g. Model persistence in\u00a0M<span style=\"font-weight: 400\">achine Learning<\/span><\/h3>\n<p><span style=\"font-weight: 400\">Here, below example shows how to save\/load an MLlib model by SparkR.<\/span><br \/>\n<span style=\"font-weight: 400\">For example,<\/span><br \/>\n<b>training &lt;- read.df(&#8220;data\/mllib\/sample_multiclass_classification_data.txt&#8221;, source = &#8220;libsvm&#8221;)<\/b><b><br \/>\n<\/b><b># Fit a generalized linear model of family &#8220;gaussian&#8221; with spark.glm<\/b><b><br \/>\n<\/b><b>df_list &lt;- randomSplit(training, c(7,3), 2)<\/b><b><br \/>\n<\/b><b>gaussianDF &lt;- df_list[[1]]<\/b><b><br \/>\n<\/b><b>gaussianTestDF &lt;- df_list[[2]]<\/b><b><br \/>\n<\/b><b>gaussianGLM &lt;- spark.glm(gaussianDF, label ~ features, family = &#8220;gaussian&#8221;)<\/b><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/data-types\/\">Let&#8217;s discuss Data Types in Spark Machine Learning<br \/>\n<\/a><\/strong><b><\/b><br \/>\n<b># Save and then load a fitted MLlib model<\/b><b><br \/>\n<\/b><b>modelPath &lt;- tempfile(pattern = &#8220;ml&#8221;, fileext = &#8220;.tmp&#8221;)<\/b><b><br \/>\n<\/b><b>write.ml(gaussianGLM, modelPath)<\/b><b><br \/>\n<\/b><b>gaussianGLM2 &lt;- read.ml(modelPath)<\/b><b><br \/>\n<\/b><b><br \/>\n<\/b><b># Check model summary<\/b><b><br \/>\n<\/b><b>summary(gaussianGLM2)<\/b><b><br \/>\n<\/b><b><br \/>\n<\/b><b># Check model prediction<\/b><b><br \/>\n<\/b><b>gaussianPredictions &lt;- predict(gaussianGLM2, gaussianTestDF)<\/b><b><br \/>\n<\/b><b>head(gaussianPredictions)<\/b><b><br \/>\n<\/b><b><br \/>\n<\/b><b>unlink(modelPath)<\/b><\/p>\n<h2>3. Conclusion<\/h2>\n<p>As a result, we have seen all the\u00a0Spark machine learning with R. Also, we have seen various examples to learn machine learning algorithm using spark R well. However, if you feel for any query, feel free to ask in the comment section.<\/p>\n<p><strong>See also &#8211;\u00a0<\/strong><\/p>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/rdd-lineage\/\">RDD Lineage in Spark<\/a><\/strong><br \/>\n<strong><a href=\"https:\/\/spark.apache.org\/\">For Reference<\/a>.<\/strong><span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:2052,&quot;href&quot;:&quot;https:\\\/\\\/spark.apache.org&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251009215151\\\/https:\\\/\\\/spark.apache.org\\\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-11 00:11:34&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-14 03:24:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-17 05:06:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-20 07:19:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-23 14:10:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-26 19:03:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-30 13:05:23&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-02 13:25:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-05 14:08:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-09 10:16:58&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-12 11:04:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-15 17:09:49&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-18 18:39:09&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-21 19:15:09&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-26 04:14:49&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-29 05:32:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-01 07:55:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-04 10:44:57&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-07 12:28:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-11 00:52:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-14 12:51:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-17 14:17:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-20 17:49:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-24 04:42:19&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-27 06:25:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-02 08:44:49&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-05 10:27:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-08 11:13:11&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-11 12:04:06&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-14 12:32:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-18 01:16:16&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-21 21:29:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-25 06:37:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-28 07:59:07&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-31 10:36:07&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-04 11:16:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-07 18:11:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-11 05:09:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-14 06:26:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-18 15:58:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-22 11:10:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-27 06:59:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-30 12:38:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-03 15:24:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-06 17:05:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-10 12:07:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-14 23:33:58&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-19 11:27:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-23 02:59:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-29 05:05:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-01 06:55:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-04 20:59:59&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-08 05:37:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-11 15:39:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-14 16:52:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-18 01:16:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-22 04:29:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-25 16:10:03&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-25 16:10:03&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00a01. Objective Today, in this Spark tutorial, we will learn several SparkR Machine Learning algorithms supported by Spark. Such as Classification, Regression, Tree, Clustering, Collaborative Filtering, Frequent Pattern Mining, Statistics, and Model persistence. we&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":6295,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[8445,8461,8466,13083,13170],"class_list":["post-5661","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-spark","tag-machine-learning-classification","tag-machine-learning-regression","tag-machine-learning-tree","tag-spark-machine-learning-with-r","tag-sparkr-machine-learning"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spark Machine Learning with R: An Introductory Guide - DataFlair<\/title>\n<meta name=\"description\" content=\"SparkR Machine Learning algorithms-Spark Machine Learning with R examples,Machine Learning Classification,Machine Learning Regression,Machine Learning Tree\" \/>\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\/spark-machine-learning-with-r\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spark Machine Learning with R: An Introductory Guide - DataFlair\" \/>\n<meta property=\"og:description\" content=\"SparkR Machine Learning algorithms-Spark Machine Learning with R examples,Machine Learning Classification,Machine Learning Regression,Machine Learning Tree\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/spark-machine-learning-with-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=\"2018-01-17T08:56:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-09-17T12:32:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Machine-Learning-Algorithms-in-SparkR-01-1-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\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=\"2 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spark Machine Learning with R: An Introductory Guide - DataFlair","description":"SparkR Machine Learning algorithms-Spark Machine Learning with R examples,Machine Learning Classification,Machine Learning Regression,Machine Learning Tree","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\/spark-machine-learning-with-r\/","og_locale":"en_US","og_type":"article","og_title":"Spark Machine Learning with R: An Introductory Guide - DataFlair","og_description":"SparkR Machine Learning algorithms-Spark Machine Learning with R examples,Machine Learning Classification,Machine Learning Regression,Machine Learning Tree","og_url":"https:\/\/data-flair.training\/blogs\/spark-machine-learning-with-r\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-01-17T08:56:55+00:00","article_modified_time":"2018-09-17T12:32:30+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Machine-Learning-Algorithms-in-SparkR-01-1-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":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/spark-machine-learning-with-r\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/spark-machine-learning-with-r\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"Spark Machine Learning with R: An Introductory Guide","datePublished":"2018-01-17T08:56:55+00:00","dateModified":"2018-09-17T12:32:30+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/spark-machine-learning-with-r\/"},"wordCount":437,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/spark-machine-learning-with-r\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Machine-Learning-Algorithms-in-SparkR-01-1-1.jpg","keywords":["Machine Learning Classification","Machine Learning Regression","Machine Learning Tree","Spark Machine Learning with R","SparkR Machine Learning"],"articleSection":["Apache Spark Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/spark-machine-learning-with-r\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/spark-machine-learning-with-r\/","url":"https:\/\/data-flair.training\/blogs\/spark-machine-learning-with-r\/","name":"Spark Machine Learning with R: An Introductory Guide - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/spark-machine-learning-with-r\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/spark-machine-learning-with-r\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Machine-Learning-Algorithms-in-SparkR-01-1-1.jpg","datePublished":"2018-01-17T08:56:55+00:00","dateModified":"2018-09-17T12:32:30+00:00","description":"SparkR Machine Learning algorithms-Spark Machine Learning with R examples,Machine Learning Classification,Machine Learning Regression,Machine Learning Tree","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/spark-machine-learning-with-r\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/spark-machine-learning-with-r\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/spark-machine-learning-with-r\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Machine-Learning-Algorithms-in-SparkR-01-1-1.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Machine-Learning-Algorithms-in-SparkR-01-1-1.jpg","width":1200,"height":628,"caption":"Spark Machine Learning with R"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/spark-machine-learning-with-r\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Apache Spark Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/spark\/"},{"@type":"ListItem","position":3,"name":"Spark Machine Learning with R: An Introductory Guide"}]},{"@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\/5661","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=5661"}],"version-history":[{"count":4,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/5661\/revisions"}],"predecessor-version":[{"id":34464,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/5661\/revisions\/34464"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/6295"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=5661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=5661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=5661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}