<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
      <title>Recent Content on Adventures in advanced analytics </title>
      <generator uri="https://hugo.spf13.com">Hugo</generator>
    <link>http://adventures.putler.org/index.xml/</link>
    <language>en-us</language>
    <author>Dan Putler</author>
    <copyright>This work is licensed under a Creative Commons Attribution 4.0 International License</copyright>
    <updated>Sun, 25 Jan 2015 15:05:21 PST</updated>
    
    <item>
      <title>Viva la Revolution Analytics</title>
      <link>http://adventures.putler.org/blog/2015/01/25/Viva-la-Revolution-Analytics/</link>
      <pubDate>Sun, 25 Jan 2015 15:05:21 PST</pubDate>
      <author>Dan Putler</author>
      <guid>http://adventures.putler.org/blog/2015/01/25/Viva-la-Revolution-Analytics/</guid>
      <description>

&lt;p&gt;Last Friday was a very busy day for several of us at Alteryx in the wake of the &lt;a href=&#34;http://blogs.microsoft.com/blog/2015/01/23/microsoft-acquire-revolution-analytics-help-customers-find-big-data-value-advanced-statistical-analysis/&#34;&gt;announcement&lt;/a&gt; that Microsoft and Revolution Analytics had agreed to have Microsoft acquire Revolution Analytics. In this post I won&amp;rsquo;t go into the Alteryx angle of this story, other than to say we think this is a net positive. Instead, I wanted to provide a few words of appreciation for what Revolution Analytics has done for both R based technology and for their non-technology contributions to the R community since its &lt;a href=&#34;http://en.wikipedia.org/wiki/Revolution_Analytic&#34;&gt;creation (as REvolution Computing) in 2007&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&#34;toc_0&#34;&gt;Contributions to R Based Technology&lt;/h2&gt;

&lt;p&gt;Revolution Analytics has long been at the forefront of efforts to scale R for applications involving large amounts of data. They have approached this problem using both coarse grained parallel and streaming computing approaches. As of now, considerably more effort is going into coarse grained parallel computing approaches (with Hadoop being the most well publicized of these efforts), but streaming computing approaches can be very effective in scaling predictive analytics with more limited hardware resources. The most impressive methods for doing this that I have seen are the streaming linear model and generalized linear model methods contained in Revolution Analytics (proprietary) Revo ScaleR package (which also makes use of Intel&amp;rsquo;s multi-threaded linear algebra libraries), that comes with their Revolution R Enterprise product. We have found that with moderate data volumes they are faster than the comparable open source R functions, and they can easily scale to millions of records on a common business laptop configuration (e.g., 8 GB of memory and a modern multicore CPU), while that same configuration is capable of estimating the same type of model with at most between 100,000 to 200,000 records with fewer than 10 predictors using open source R&amp;rsquo;s lm or glm functions. What Lee Edlefsen and the engineering team at Revolution Analytics has done in this area represents the state of the art (they clearly outshine comparable methods from SAS and IBM/SPSS), and will likely represent an important point of comparison for others developing streaming algorithms for a long time to come.&lt;/p&gt;

&lt;p&gt;While they have kept their streaming methods proprietary, they have given back to the R community much of the technology they have developed in the area of coarse grained parallel computing methods in R. Chief among these are the &lt;a href=&#34;http://cran.r-project.org/web/packages/foreach/index.html&#34;&gt;foreach&lt;/a&gt; and the &lt;a href=&#34;http://cran.r-project.org/web/packages/iterators/index.html&#34;&gt;iterators&lt;/a&gt; packages. In academia, one thing professors are judged on in tenure and promotion decisions is how many other published articles cite their articles (there are a number of different broad discipline oriented citation indexes, such as the &lt;a href=&#34;http://thomsonreuters.com/social-sciences-citation-index/&#34;&gt;Social Science Citation Index&lt;/a&gt;, that provide this information, and a lot of attention is now being paid to &lt;a href=&#34;http://scholar.google.com&#34;&gt;Google Scholar&lt;/a&gt; citations, which are often more interdisciplinary in nature). The &lt;a href=&#34;http://www.r-project.org&#34;&gt;R Project&lt;/a&gt; originated in academia, and still has a very academic feel to it. As a result, the package archive for the project (CRAN, or the Comprehensive R Archive Network) provides something very similar to a citation index. Specifically, for every CRAN package there is an indication of how other CRAN packages make use of it. There are three levels of this: a &amp;ldquo;reverse dependency&amp;rdquo; (the package is absolutely necessity to install another package); a &amp;ldquo;reverse imports&amp;rdquo; (the package is a critical component of another package, but the package can be installed without it); and a &amp;ldquo;reverse suggests&amp;rdquo; (a package provides additional, less central, functionality to another package). The Revolution Analytics foreach package has (as I write this) a reverse status on the part of 111 other R packages, while the iterators package has a reverse status on the part of 34 other CRAN packages. Only three of these represent &amp;ldquo;vanity reverses&amp;rdquo; (i.e., a package that makes use of a package written by the same author), and the vast majority are either of the more important &amp;ldquo;depends&amp;rdquo; or &amp;ldquo;imports&amp;rdquo; variety. In both cases, this represents an extraordinarily high number of reverse status packages (the reverse status for the foreach package is extremely high). Put another way, if there was a University of R, Revolution Analytics would have the rank of Full Professor.&lt;/p&gt;

&lt;p&gt;More recently, Revolution Analytics has made an effort to address issues that come up with R packages. The first of these efforts is incorporated in the &lt;a href=&#34;http://cran.r-project.org/web/packages/miniCRAN/index.html&#34;&gt;miniCRAN&lt;/a&gt; package that allows an organization with strict firewall rules to create an internal, selective archive of R packages that members of that organization can access. The second package that addresses issues surrounding R packages is the &lt;a href=&#34;http://cran.r-project.org/web/packages/checkpoint/index.html&#34;&gt;checkpoint&lt;/a&gt; package which is closely linked with Revolution Analytics &amp;ldquo;Managed R Archive Network&amp;rdquo;, or MRAN. The purpose of the combination of the checkpoint package and MRAN is to address a common problem in reproducing R based research results, addressing changes in contributed R packages. R consists of three components, a small set of &amp;ldquo;base&amp;rdquo; packages that provide basic functionality; a still very small, but somewhat larger, set of &amp;ldquo;recommended&amp;rdquo; packages that provide additional core R functionality, and then a huge set (nearly 5000 as of this writing) of contributed packages. R&amp;rsquo;s base and recommended packages are shipped with R&amp;rsquo;s installer package from CRAN, and are very stable. The same cannot be said of all of R&amp;rsquo;s contributed packages. We at Alteryx have never had issues migrating to the base or recommended packages of a new version of R, but we have experienced a few hiccups in migrating to some new versions of contributed packages that we use and bundle with our Predictive Plug-in (yes, regression testing is a useful thing). It turns out we are not alone, and in some cases (particularly in clinical trial settings for new drugs or medical devices) can make research results difficult to reproduce. The problems can be due to changes in the API of a package (that can cause R analysis scripts to break) or changes in the underlying methods used by a package (which can change the nature of the results in marginally significant cases). The goal of the checkpoint package / MRAN combination is to allow researchers to &amp;ldquo;freeze&amp;rdquo; on a particular vintage of R packages in order to make sure past research results can be replicated in a setting that takes changes in underlying R packages out of the picture. I view this as a very selfless move on Revolution Analytics part since it is a technology that is likely to be extremely useful to portions of the R community, takes real resources on the part of Revolution Analytics to implement, but is one that seems difficult for them to monetize.&lt;/p&gt;

&lt;h2 id=&#34;toc_1&#34;&gt;Non-Technology Contributions to the R Community&lt;/h2&gt;

&lt;p&gt;Revolution Analytics has consistently given back to the R Community on a non-technological basis in three ways. First, it has been a primary sponsor of the annual international R user group conference (UseR!) since 2008 (longer than any other software vendor, only the book publishers CRC Press and Springer having been sponsors of the conference more years than Revolution Analytics). Since Revolution Analytics was only founded in 2007, the length of time they have been a primary sponsor of UseR! is remarkable.&lt;/p&gt;

&lt;p&gt;The second way Revolution Analytics has given back to the R community in a non-technical way is in help sponsor local R user groups, through there &lt;a href=&#34;http://www.revolutionanalytics.com/news-events/revolution-analytics-launches-sponsorship-program-r-user-groups&#34;&gt;R User Group Sponsorship Program&lt;/a&gt;. I am a member of the Bay Area R Users Group which Revolution Analytics sponsors, and Joe Rickert of Revolution Analytics acts as the primary organizer. Revolution Analytics provided &lt;a href=&#34;http://blog.revolutionanalytics.com/2014/12/revolution-analytics-2015-r-user-group-support-program-is-underway.html&#34;&gt;financial support to 51 local R user groups in 2014&lt;/a&gt;, all local R user groups are eligible for sponsorship, but not all apply). In addition, it supports all 150 local R user groups via the &lt;a href=&#34;http://blog.revolutionanalytics.com/local-r-groups.html&#34;&gt;Local R User Group Directory&lt;/a&gt;, the &lt;a href=&#34;http://blog.revolutionanalytics.com/calendar.html&#34;&gt;R Community Calendar&lt;/a&gt;, and the @inside_r Twitter channel.&lt;/p&gt;

&lt;p&gt;The third way they contribute back to the community is the &lt;a href=&#34;http://blog.revolutionanalytics.com/&#34;&gt;Revolutions blog&lt;/a&gt; which is one of the longest on-going blogs that covers topics relevant to the R community. Most company blogs are done for specific, very narrow marketing or product education purposes. However, this is not the case with the Revolutions blog, which strives to cover all topics relevant to the R community, even new R based technologies that represent, at least to my mind, a potential competitive threat to them.&lt;/p&gt;

&lt;h2 id=&#34;toc_2&#34;&gt;Going Forward&lt;/h2&gt;

&lt;p&gt;What exactly the longer-term future holds for Revolution Analytics as they become part of the Microsoft family is unknown at this point. However, my belief is the assessment of &lt;a href=&#34;http://blog.revolutionanalytics.com/2015/01/revolution-acquired.html&#34;&gt;David Smith&lt;/a&gt; (Revolution Analytics Chief Community Officer) that&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For our users and customers, nothing much will change with the acquisition. We’ll continue to support and develop the Revolution R family of products — including non-Windows platforms like Mac and Linux. The free Revolution R Open project will continue to enhance open source R. We’ll continue to offer expert technical support for R with Revolution R Plus subscriptions from the same team of R experts. We’ll continue to advance the big data and enterprise integration capabilities of Revolution R Enterprise. And we’ll continue to offer expert technical training and consulting services.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;is correct. Moreover, the financial backing of Microsoft will likely provide a strong tail wind to help several of the initiatives that Revolution Analytics started move forward more rapidly.&lt;/p&gt;

&lt;p&gt;As part of Alteryx&amp;rsquo;s partnership with them, I&amp;rsquo;ve had the opportunity and pleasure to interact with many people at Revolution Analytics, and I wish them the best of luck in the next part of their journey.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Setting Up a Virtual Machine with SparkR</title>
      <link>http://adventures.putler.org/blog/2014/12/08/Setting-Up-a-Virtual-Machine-with-SparkR/</link>
      <pubDate>Mon, 08 Dec 2014 21:09:05 -0700</pubDate>
      <author>Dan Putler</author>
      <guid>http://adventures.putler.org/blog/2014/12/08/Setting-Up-a-Virtual-Machine-with-SparkR/</guid>
      <description>

&lt;p&gt;It is fairly safe to say that at this point that Spark is the heir apparent standard for advanced analytics applications on big data. As things stand, it is a relatively friendly environment for data scientists and analysts whose preferred languages are Scala, Python, or Java. In contrast, support for the R language, arguably the most commonly used open source language for advanced analytics, is in its comparative infancy in the Spark environment. However, active development, aimed at making the R language a &amp;ldquo;first class citizen&amp;rdquo; in Spark, is under way as part of the &lt;a href=&#34;http://amplab-extras.github.io/SparkR-pkg/&#34; title=&#34;SparkR Project page&#34;&gt;SparkR Project&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Setting up a system to do development as part of contributing to the SparkR project, or to easily experiment with SparkR, is a task that involves a bit of effort (there are fair number of prerequisites for building SparkR). Rather than creating a SparkR ready environment directly on your own computer, an easier approach is to start with a virtual machine that has many of the prerequisites already installed, and then customize it by installing the remaining software. In this post, I provide a recipe for doing so, using &lt;a href=&#34;http://www.cloudera.com/content/cloudera/en/downloads/quickstart_vms/cdh-5-2-x.html&#34; title=&#34;Cloudera&#39;s CDH 5.2 Quick Start VM page&#34;&gt;Cloudera&amp;rsquo;s CDH 5.2 Quick Start VM&lt;/a&gt; for Oracle&amp;rsquo;s &lt;a href=&#34;https://www.virtualbox.org/&#34; title=&#34;The VirtualBox home page&#34;&gt;VirtualBox&lt;/a&gt; virtualization software package. The Cloudera Quick Start VM comes with much of the needed software installed (Spark with SparkSQL, Hadoop, Maven, Git, and Java), it also comes with R, but not the most recent release R as of early December 2014 (the VM was released shortly before the release of R version 3.1.2, so it comes with R 3.1.1). I&amp;rsquo;ve written a &lt;a href=&#34;http://adventures.putler.org/SparkR_prep-0.1.sh&#34; title=&#34;Link to the installer script&#34;&gt;shell script&lt;/a&gt; to automate most of the task of installing the most recent version of R, which also installs R&amp;rsquo;s rJava package(currently needed for SparkR) and the rServe package (needed for Alteryx&amp;rsquo;s SparkR development team&amp;rsquo;s work). The script also installs Scala (version 2.10.4) for option value.&lt;/p&gt;

&lt;p&gt;In what follows, I first describe how to: get setup the VirtualBox Cloudera Quick Start VM, install and configuring the remaining need software, and configure Git and install SparkR. Hopefully this post will enable you to get up and running with SparkR quickly.&lt;/p&gt;

&lt;h2 id=&#34;toc_0&#34;&gt;Getting Started with the Cloudera Quick Start VM&lt;/h2&gt;

&lt;p&gt;The first thing that needs to be done is to prepare the VM. If you are familiar with working with VirtualBox VM&amp;rsquo;s, you can skip over much of this section. The following steps provide a recipe for getting the VM ready for the installation of additional needed software:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://www.cloudera.com/content/cloudera/en/downloads/quickstart_vms/cdh-5-2-x.html&#34; title=&#34;Cloudera&#39;s CDH 5.2.0 Quick Start download page&#34;&gt;Download the Quick Start VM from Cloudera&lt;/a&gt;. The VM uses Centos 6.2, and appears to have been created with VirtualBox 4.3.10, which is an older version of VirtualBox (this version was released back in March, while the current version of VirtualBox is 4.3.20), and this difference in versions has some implications for preparing the VM. The password for the VM is &amp;ldquo;&lt;em&gt;cloudera&lt;/em&gt;&amp;rdquo; and can be used for superuser authentication as well.&lt;/li&gt;
&lt;li&gt;The Quick Start VM comes as a 7-zip archive, and you will need to unzip the archive to proceed. To do this, you will need to have 7-zip available. 7-zip is open source, and versions can be &lt;a href=&#34;http://www.7-zip.org/download.html&#34; title=&#34;The 7-zip download page&#34;&gt;downloaded&lt;/a&gt; for all major operating systems. The archive consists of a folder (cloudera-quickstart-vm-5.2.0-0-virtualbox) that contains two files.&lt;/li&gt;
&lt;li&gt;If you do not already have VirtualBox, and your operating system is &lt;em&gt;not&lt;/em&gt; Windows 7 &lt;a href=&#34;https://www.virtualbox.org/wiki/Downloads&#34; title=&#34;The VirtualBox download page&#34;&gt;download&lt;/a&gt; and install it. There are binary installers/packages for Windows, OS X, Solaris, and all major Linux distributions available. If you are on Windows 7, the most recent version of VirtualBox may well work (the most recent version does on my Win 7 machine), but we (and many other VirtualBox users) have encountered Win 7 machines where recent versions of VirtualBox cannot load a VM. The VirtualBox site does maintain an &lt;a href=&#34;https://www.virtualbox.org/wiki/Download_Old_Builds_4_3&#34; title=&#34;Older Version 4.3 series builds of VirtualBox&#34;&gt;archive of older VirtualBox releases&lt;/a&gt;. Locally we have found that prior versions as recent as the 4.3.12 release do not exhibit the problem.&lt;/li&gt;
&lt;li&gt;Load the Cloudera VM into VirtualBox by using the VirtualBox pull-down menu option &lt;strong&gt;File &amp;gt; Import Appliance&amp;hellip;&lt;/strong&gt; and then navigate to the cloudera-quickstart-vm-5.2.0-0-virtualbox folder, where you will be able to select the file cloudera-quickstart-vm-5.2.0-0-virtualbox.ovf (the only visible file) and begin importing the VM.&lt;/li&gt;
&lt;li&gt;Once the VM has been imported, highlight the &amp;ldquo;cloudera-quickstart-vm-5.2.0-0-virtualbox VM and press the green start button to launch it. This initial launch of the VM is done just to make sure all is well with the initial setup. Assuming you are on Win 7, and installed VirtualBox 4.3.20, and see the error message in Figure 1, you will need to install an older version of VirtualBox.&lt;/li&gt;
&lt;/ul&gt;

&lt;figure &gt;
    
        &lt;img src=&#34;/img/shot_1_1.png&#34;  /&gt;
    
    
    &lt;figcaption&gt;
        &lt;h4&gt;Figure 1&lt;/h4&gt;
        
    &lt;/figcaption&gt;
    
&lt;/figure&gt;

&lt;ul&gt;
&lt;li&gt;When the VM has loaded you will want to sync the VM&amp;rsquo;s &amp;ldquo;Guest Additions&amp;rdquo; to the version of VirtualBox you are using. To do this, use VirtualBox&amp;rsquo;s pull-down menu option &lt;strong&gt;Devices &amp;gt; Insert Guest Additions CD image&amp;hellip;&lt;/strong&gt;, which is illustrated in Figure 2. What you are likely thinking at the moment is &amp;ldquo;I don&amp;rsquo;t have a Guest Additions CD!&amp;rdquo;, don&amp;rsquo;t worry, you have a virtual copy of it. When you select this option a dialog box will pop-up indicating &amp;ldquo;That you have just inserted a medium&amp;hellip;&amp;rdquo;, press the &lt;strong&gt;OK&lt;/strong&gt; button, without changing any of the options, which will result in another dialog box appearing. Press the &lt;strong&gt;OK&lt;/strong&gt; button in the second dialog box, which will bring up a third (and final) dialog box, into which you want to enter &amp;ldquo;cloudera&amp;rdquo; as the root password and press the &lt;strong&gt;Authenticate&lt;/strong&gt; button. A terminal window will appear to start the update process, when the process is complete, click on the terminal window to make it active and press the &lt;strong&gt;Enter&lt;/strong&gt; key on your keyboard to close the window.&lt;/li&gt;
&lt;/ul&gt;

&lt;figure &gt;
    
        &lt;img src=&#34;/img/shot_1_2.png&#34;  /&gt;
    
    
    &lt;figcaption&gt;
        &lt;h4&gt;Figure 2&lt;/h4&gt;
        
    &lt;/figcaption&gt;
    
&lt;/figure&gt;

&lt;ul&gt;
&lt;li&gt;One important benefit to sync the VM&amp;rsquo;s Guest Additions to the version of VirtualBox you are using is that you can take advantage of a shared, bidirectional clipboard that will enable you to copy and paste between your machine and the VM. One immediate benefit is you will be able to copy commands from these instructions and paste them into a terminal window on the VM. To enable the bidirectional clipboard, use VirtualBox&amp;rsquo;s pull-down menu option &lt;strong&gt;Devices &amp;gt; Shared Clipboard &amp;gt; Bidirectional&lt;/strong&gt;. You can also enable bidirectional drag and drop via the Drag&amp;rsquo;n&amp;rsquo;Drop options of the &lt;strong&gt;Devices&lt;/strong&gt; menu.&lt;/li&gt;
&lt;li&gt;At this point you will want to shutdown the VM using VirtualBox&amp;rsquo;s pull-down menu option &lt;strong&gt;Machine &amp;gt; ACPI Shutdown&lt;/strong&gt; (illustrated in Figure 3).&lt;/li&gt;
&lt;/ul&gt;

&lt;figure &gt;
    
        &lt;img src=&#34;/img/shot_1_3.png&#34;  /&gt;
    
    
    &lt;figcaption&gt;
        &lt;h4&gt;Figure 3&lt;/h4&gt;
        
    &lt;/figcaption&gt;
    
&lt;/figure&gt;

&lt;ul&gt;
&lt;li&gt;After the VM has shutdown, you need to alter the VM in VirtualBox, both to give it the resources that will likely be needed for SparkR development, and to enable the VM to directly connect to the Internet. One potential issue here is we are increasing the VM&amp;rsquo;s RAM from 4 GB to 6 GB. As a result, your computer should have at least 8 GB of memory, and preferably more, since VirtualBox will immediately grab 6 GB of memory from your computer when the VM is launched. The steps needed to prepare the VM are:

&lt;ul&gt;
&lt;li&gt;Click on the cloudera-quickstart-vm-5.2.0-0-virtualbox icon to highlight the VM.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;System &amp;gt; Motherboard&lt;/strong&gt; increase the base memory to 6144 MB.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;System &amp;gt; Processor&lt;/strong&gt; increase the processor(s) from 1 to 2 CPUs.&lt;/li&gt;
&lt;li&gt;If you will want to access this VM from other machines within you local area network, then under &lt;strong&gt;Network &amp;gt; Adapter 1&lt;/strong&gt; change the &amp;ldquo;Attached Adapter&amp;rdquo; to &amp;ldquo;Bridged Adapter&amp;rdquo;.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Start the VM again.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;toc_1&#34;&gt;Installing and Configuring the Additional Software&lt;/h2&gt;

&lt;p&gt;As indicated in the introduction, the installation of R and Scala is a fairly automated process done through a shell script. The script itself is fairly well commented, and you probably want to take a look at it prior to running it in order to get a sense of what it is doing. While running the script to install the software involves a single user command, configuring everything is a bit more involved, but fairly straight forward. Here are the steps:
- Open a terminal window (press the console icon on the upper task bar of the vm)
- We will use the wget utility to download the installation script via the terminal command line interface by entering the command&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;wget http://adventures.putler.org/SparkR_prep-0.1.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;Once the script has downloaded, issue the command below at the terminal prompt to start the installation process.&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code&gt;sudo sh SparkR_prep-0.1.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;You will be prompted once during the installation process to OK the installation of the dependencies required to build R from source. Figure 2 shows this prompt, at the prompt type the letter &amp;ldquo;y&amp;rdquo; followed by enter.&lt;/li&gt;
&lt;/ul&gt;

&lt;figure &gt;
    
        &lt;img src=&#34;/img/shot_1_4.png&#34;  /&gt;
    
    
    &lt;figcaption&gt;
        &lt;h4&gt;Figure 4&lt;/h4&gt;
        
    &lt;/figcaption&gt;
    
&lt;/figure&gt;

&lt;ul&gt;
&lt;li&gt;After the script is run, Scala needs to be permanently added to the user cloudera&amp;rsquo;s path. To do this, cloudera&amp;rsquo;s .bash_profile file. The instructions use gedit to do this, but all the common Unix/Linux text editors (VI, nano, EMACS) are installed on the VM. To start editing the file, use the following command&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code&gt;gedit .bash_profile
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;The lines that need to be added/altered are after the &amp;ldquo;User specific environment and startup programs&amp;rdquo; comment, and are given below. When you are done editing, the .bash_profile file should look like the one shown in Figure 3. Once it does, save the file and close gedit.&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code&gt;export SCALA_HOME=/usr/local/share/scala

PATH=$PATH:$HOME/bin:$SCALA_HOME/bin

export PATH
&lt;/code&gt;&lt;/pre&gt;

&lt;figure &gt;
    
        &lt;img src=&#34;/img/shot_1_5.png&#34;  /&gt;
    
    
    &lt;figcaption&gt;
        &lt;h4&gt;Figure 5&lt;/h4&gt;
        
    &lt;/figcaption&gt;
    
&lt;/figure&gt;

&lt;ul&gt;
&lt;li&gt;The last thing that needs to be done with respect to software installation and configuration is to have the environment variable changes recognized by the operating system. To do this, enter the command below at the terminal command line&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code&gt;source .bash_profile
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id=&#34;toc_2&#34;&gt;Configuring Git and Building SparkR&lt;/h2&gt;

&lt;p&gt;The &lt;a href=&#34;http://amplab-extras.github.io/SparkR-pkg/&#34; title=&#34;The SparkR Project page&#34;&gt;SparkR Project&lt;/a&gt; is hosted on &lt;a href=&#34;http://en.wikipedia.org/wiki/GitHub&#34; title=&#34;The GitHub Wikipedia page&#34;&gt;GitHub&lt;/a&gt;. If you want to contribute to SparkR, you will need a GitHub &lt;a href=&#34;http://www.github.com&#34; title=&#34;The main GitHub page&#34;&gt;account&lt;/a&gt;. In addition, the project has both a dedicated &lt;a href=&#34;https://sparkr.atlassian.net/browse/SPARKR&#34; title=&#34;The SparkR JIRA&#34;&gt;JIRA&lt;/a&gt; and a devloper&amp;rsquo;s mailing list on Google Groups. In this blog I only cover project infrastructure as it relates to GitHub. In what follows, it is assumed that you have a GitHub account.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We start by configuring Git on the Quick Start VM (the VM comes with the Git client pre-installed) by entering the commands below in a terminal window. You will want to replace &lt;code&gt;&amp;lt;handle or name&amp;gt;&lt;/code&gt; with your own handle (mine is dputler) or name, and &lt;code&gt;&amp;lt;email address&amp;gt;&lt;/code&gt; with your own email address. The handle/name and email address values need to be in quotes. The last two commands increase the amount of time you can interact with a GitHub repository before you need to re-authenticate.&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code&gt;git config --global user.name &amp;quot;&amp;lt;handle or name&amp;gt;&amp;quot;
git config --global user.email &amp;quot;&amp;lt;email address&amp;gt;&amp;quot;
git config --global credential.helper cache
git config --global credential.helper &#39;cache --timeout=3600&#39;
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;Instead of developing against the main repository, the SparkR project uses what is known as a &lt;a href=&#34;https://help.github.com/articles/using-pull-requests/&#34; title=&#34;Collaboration model article on GitHub help&#34;&gt;&amp;ldquo;fork &amp;amp; pull&amp;rdquo;&lt;/a&gt; collaboration model whereby a developer makes changes to a personal fork of the project, and then makes a pull request to have those changes integrated into the main repository. As a result, we are going to make a fork of the SparkR project. To do this, go to the SparkR GitHub repository at &lt;a href=&#34;https://github.com/amplab-extras/SparkR-pkg&#34;&gt;https://github.com/amplab-extras/SparkR-pkg&lt;/a&gt; and click on the &lt;strong&gt;Fork&lt;/strong&gt; button, which is shown (boxed in red) in Figure 4. Pressing this button will result in a fork of SparkR being linked to your GitHub account. The URL for you personal copy of SparkR should be &lt;code&gt;https://github.com/&amp;lt;your GitHub user ID&amp;gt;/SparkR-pkg&lt;/code&gt;, where &lt;code&gt;&amp;lt;your GitHub user ID&amp;gt;&lt;/code&gt; is your actual GitHub user ID.&lt;/li&gt;
&lt;/ul&gt;

&lt;figure &gt;
    
        &lt;img src=&#34;/img/shot_1_6.png&#34;  /&gt;
    
    
    &lt;figcaption&gt;
        &lt;h4&gt;Figure 6&lt;/h4&gt;
        
    &lt;/figcaption&gt;
    
&lt;/figure&gt;

&lt;ul&gt;
&lt;li&gt;The next step of the process is to &amp;ldquo;clone&amp;rdquo; (create a local copy on the VM) and build SparkR from your forked version of the repository. The terminal commands below will allow you to do this (you will need to replace &lt;code&gt;&amp;lt;your GitHub user ID&amp;gt;&lt;/code&gt; with your actual ID).&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code&gt;git clone https://github.com/&amp;lt;your GitHub user ID&amp;gt;/SparkR-pkg
cd SparkR-pkg
SPARK_HADOOP_VERSION=2.5.0-mr1-cdh5.2.0 ./install-dev.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;We need to properly connect Java and R together at this point, which is accomplished with the command&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code&gt;sudo -E R CMD javareconf
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;At this point you hopefully have a successful build of SparkR, which you can begin to explore by bringing up the SparkR console (shown in Figure 7) via the command:&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code&gt;./sparkR
&lt;/code&gt;&lt;/pre&gt;

&lt;figure &gt;
    
        &lt;img src=&#34;/img/shot_1_7.png&#34;  /&gt;
    
    
    &lt;figcaption&gt;
        &lt;h4&gt;Figure 7&lt;/h4&gt;
        
    &lt;/figcaption&gt;
    
&lt;/figure&gt;

&lt;ul&gt;
&lt;li&gt;Once you are done exploring SparkR, you can again use the VirtualBox pull-down menu option &lt;strong&gt;Machine &amp;gt; ACPI Shutdown&lt;/strong&gt; to shutdown your SparkR development VM.&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
    <item>
      <title>About</title>
      <link>http://adventures.putler.org/about/</link>
      <pubDate>Mon, 08 Dec 2014 02:29:12 -0700</pubDate>
      <author>Dan Putler</author>
      <guid>http://adventures.putler.org/about/</guid>
      <description>

&lt;h2 id=&#34;toc_0&#34;&gt;The Blog&lt;/h2&gt;

&lt;p&gt;The Adventures in Advanced Analytics blog is focused on topics in predictive and spatial analytics technologies that impact business organizations. A particular area of focus is on R, Spark, and emerging storage technologies such as Hadoop and Cassandra, and how they can be enhanced via the Alteryx platform.&lt;/p&gt;

&lt;p&gt;The blog is created using the &lt;a href=&#34;http://gohugo.io/&#34; title=&#34;The Hugo static site generator home page&#34;&gt;Hugo&lt;/a&gt; static site generator, and uses Andrei Mihu&amp;rsquo;s &lt;a href=&#34;https://github.com/zyro/hyde-x&#34; title=&#34;The Hyde-X GitHub page&#34;&gt;Hyde-X&lt;/a&gt; theme. The site logo was created by Tara McCoy Giovenco (many thanks Tara), who maintains the copyright, and is used with her permission.&lt;/p&gt;

&lt;p&gt;All opinions expressed in this blog are those of the author and do not necessarily reflect those of &lt;a href=&#34;http://www.alteryx.com/&#34; title=&#34;The Alteryx home page&#34;&gt;Alteryx, Inc.&lt;/a&gt;, its employees, or its partners.&lt;/p&gt;

&lt;h2 id=&#34;toc_1&#34;&gt;The Author&lt;/h2&gt;

&lt;p&gt;Dan Putler is Alteryx&amp;rsquo;s Chief Scientist, and leads product strategy and development for Alteryx&amp;rsquo;s R-based predictive analytics offering. He is also the co-author (with Robert Krider) of the book &lt;a href=&#34;http://customeranalyticsbook.com/&#34; title=&#34;The book web site&#34;&gt;Customer and Business Analytics: Applied Data Mining for Business Decision Making Using R&lt;/a&gt;, and has 30 years of experience with predictive analytics, conducting projects across a wide range of industry verticals. Prior to joining Alteryx, Dan spent 20 years as a professor of marketing and marketing research at both the Sauder School of Business at the University of British Columbia and the Krannert School of Management at Purdue University.&lt;/p&gt;

&lt;p&gt;&lt;center&gt;&lt;img src=&#34;/img/logo.png&#34; alt=&#34;Site logo&#34; /&gt;
&lt;/center&gt;&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>