You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by ss...@apache.org on 2014/05/19 06:39:35 UTC

svn commit: r1595740 - /mahout/site/mahout_cms/trunk/content/users/sparkbindings/play-with-shell.mdtext

Author: ssc
Date: Mon May 19 04:39:35 2014
New Revision: 1595740

URL: http://svn.apache.org/r1595740
Log:
fixed typos in shell tutorial

Modified:
    mahout/site/mahout_cms/trunk/content/users/sparkbindings/play-with-shell.mdtext

Modified: mahout/site/mahout_cms/trunk/content/users/sparkbindings/play-with-shell.mdtext
URL: http://svn.apache.org/viewvc/mahout/site/mahout_cms/trunk/content/users/sparkbindings/play-with-shell.mdtext?rev=1595740&r1=1595739&r2=1595740&view=diff
==============================================================================
--- mahout/site/mahout_cms/trunk/content/users/sparkbindings/play-with-shell.mdtext (original)
+++ mahout/site/mahout_cms/trunk/content/users/sparkbindings/play-with-shell.mdtext Mon May 19 04:39:35 2014
@@ -135,7 +135,7 @@ def goodnessOfFit(drmX: DrmLike[Int], be
 
 So far we have left out an important aspect of a standard linear regression model. Usually there is a constant bias term added to the model. Without that, our model always crosses through the origin and we only learn the right angle. An easy way to add such a bias term to our model is to add a column of ones to the feature matrix *X*. The corresponding weight in the parameter vector will then be the bias term.
 
-Mahout's DSL offers a ```mapBlock()``` method for custom modifications of a DRM. All the rows in a partition are merged to a block of the matrix which is given to custom code in a closure. For our example, we invoke ```mapBlock``` with ```ncol = drmX.ncol + 1``` to let the system know that change the number of columns of the matrix. The input to our closure is a ```block``` of the DRM and an array of ```keys``` for the rows contained in the block. In order to add a column, we first create a new block with an additional column, then copy the data from the current block into the new block and finally set the last column to ones and return the new block.
+Mahout's DSL offers a ```mapBlock()``` method for custom modifications of a DRM. All the rows in a partition are merged to a block of the matrix which is given to custom code in a closure. For our example, we invoke ```mapBlock``` with ```ncol = drmX.ncol + 1``` to let the system know that we change the number of columns of the matrix. The input to our closure is a ```block``` of the DRM and an array of ```keys``` for the rows contained in the block. In order to add a column, we first create a new block with an additional column, then copy the data from the current block into the new block and finally set the last column to ones and return the new block.
 
 <div class="codehilite"><pre>
 val drmXwithBiasColumn = drmX.mapBlock(ncol = drmX.ncol + 1) {
@@ -158,7 +158,7 @@ val betaWithBiasTerm = ols(drmXwithBiasC
 goodnessOfFit(drmXwithBiasColumn, betaWithBiasTerm, y)
 </pre></div>
 
-As a further optimization, we can make use of the DSL's caching functionality. We use ```drmXwithBiasColumn``` repeatedly  as input to a computation, so it might be beneficial to cache it in memory. This is achieved by calling ```checkpoint()```. In the end, we remove it from the cache with uncache:
+As a further optimization, we can make use of the DSL's caching functionality. We use ```drmXwithBiasColumn``` repeatedly  as input to a computation, so it might be beneficial to cache it in memory. This is achieved by calling ```checkpoint()```. In the end, we remove it from the cache with ```uncache```:
 
 <div class="codehilite"><pre>
 val cachedDrmX = drmXwithBiasColumn.checkpoint()