{"id":17214,"date":"2015-02-12T12:51:25","date_gmt":"2015-02-12T07:21:25","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=17214"},"modified":"2015-02-12T12:51:25","modified_gmt":"2015-02-12T07:21:25","slug":"predictive-analysis-in-r-using-rattle","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/predictive-analysis-in-r-using-rattle\/","title":{"rendered":"Predictive Analysis in R using Rattle"},"content":{"rendered":"<p>R is the most common platform for predictive analysis. Rattle library is an extension of R which takes the predictive analysis to another level.<\/p>\n<p>This blog is focused towards \u00a0people who have some experience in R.<\/p>\n<p>Rattle is the library provided for R language that is used for data mining process, where you can apply different type of clustering, classification types algorithm. Here you can transform the data as per requirements, can evaluate the relation between the datasets like co-relation, distributions etc. It provides a very fine tuned user interface to perform a large amount of data mining operations.<\/p>\n<p><strong>Steps to install\/use the Rattle:<\/strong><\/p>\n<ul>\n<li>install.package(&#8220;rattle);<\/li>\n<li>rattle();<\/li>\n<\/ul>\n<p><strong>Use Case<\/strong>: We have datasets of sales which contains different types of field like price, qty, shipping cost, item name, discount and many more. We can apply different types of algorithms as per our target variable. Let&#8217;s got through Rattle UI to perform different type of operations<\/p>\n<ul>\n<li><strong>Datasets<\/strong>: We need to upload the datasets using Rattle. We can upload data in different format, partitioning the data like training, test data sets.<\/li>\n<\/ul>\n<p><a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/02\/datasets.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-17240\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/02\/datasets.png\" alt=\"datasets\" width=\"516\" height=\"335\" \/><\/a><br \/>\nInput type variables, target type and their data type are automatically detected by Rattle. You can adjust it as per your requirements.<\/p>\n<ul>\n<li><strong>Explore<\/strong> : You can explore the data like summarized datasets, check correlations, apply principle components etc. Here major one, to check the correlation of our datasets to remove the less importance variable from the input datasets.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/02\/Co-relation-graph.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignleft wp-image-17244\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/02\/Co-relation-graph.png\" alt=\"Co-relation-graph\" width=\"292\" height=\"255\" \/><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-17243\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/02\/co-relation.png\" alt=\"co-relation\" width=\"320\" height=\"279\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Here you can see the correlation between different types of variables, you can adjust your input variable as checking by correlations.<\/p>\n<ul>\n<li><strong>Transform<\/strong>: Sometimes we need to transform the data like remove the observations that having missing data, to clean up data, Re-scale the data using different types of filters, these all features are provided in Rattle UI under transform tab.<\/li>\n<\/ul>\n<p><a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/02\/Clean-up.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-17245\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/02\/Clean-up.png\" alt=\"Clean-up\" width=\"516\" height=\"290\" \/><\/a><\/p>\n<ul>\n<li><strong>Clustering<\/strong>: Apply different types of cluster like k-means, Bi Cluster, plot clusters, check the stats of the data using cluster algorithm.<br \/>\n<a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/02\/Cluster.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-17250\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/02\/Cluster.png\" alt=\"Cluster\" width=\"516\" height=\"271\" \/><\/a><\/li>\n<li><strong>Models<\/strong>: Use different types of model like tree, random forest, linear regression, neural networks. Choose the best one as per your use case. Our use case is to forecast the sales, so for this linear regression may provide the better results.<br \/>\n<a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/02\/Linear.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-17251 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/02\/Linear.png\" alt=\"Linear\" width=\"516\" height=\"376\" \/><\/a><\/li>\n<li><strong>Logs<\/strong>: Whatever actions you are performing in Rattle, It&#8217;ll automatically generate the source code of the action in log tab which you can use later once you have final your data, model and then use same code for the production purpose.<\/li>\n<\/ul>\n<p><a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/02\/Logs.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-17252\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/02\/Logs.png\" alt=\"Logs\" width=\"549\" height=\"347\" \/><\/a><\/p>\n<p>You can see how powerful Rattle is, You can perform various\u00a0type of data mining operation. You don&#8217;t\u00a0need\u00a0to worry about the coding part, major part is what is your use-case, what operation need to perform, which model is best suited for you.<\/p>\n<p>Hope this blog will help you to give a basic idea about the rattle.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>R is the most common platform for predictive analysis. Rattle library is an extension of R which takes the predictive analysis to another level. This blog is focused towards \u00a0people who have some experience in R. Rattle is the library provided for R language that is used for data mining process, where you can apply [&hellip;]<\/p>\n","protected":false},"author":47,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":108},"categories":[1395],"tags":[1632,1626,1620,1619,1565,1631,1621],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/17214"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/47"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=17214"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/17214\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=17214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=17214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=17214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}