Modified:
websites/staging/mahout/trunk/content/users/clustering/expectation-maximization.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/clustering/expectation-maximization.html
(original)
+++
websites/staging/mahout/trunk/content/users/clustering/expectation-maximization.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/clustering/fuzzy-k-means-commandline.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/clustering/fuzzy-k-means-commandline.html
(original)
+++
websites/staging/mahout/trunk/content/users/clustering/fuzzy-k-means-commandline.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/clustering/fuzzy-k-means.html
==============================================================================
--- websites/staging/mahout/trunk/content/users/clustering/fuzzy-k-means.html
(original)
+++ websites/staging/mahout/trunk/content/users/clustering/fuzzy-k-means.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/clustering/hierarchical-clustering.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/clustering/hierarchical-clustering.html
(original)
+++
websites/staging/mahout/trunk/content/users/clustering/hierarchical-clustering.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/clustering/k-means-clustering.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/clustering/k-means-clustering.html
(original)
+++
websites/staging/mahout/trunk/content/users/clustering/k-means-clustering.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/clustering/k-means-commandline.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/clustering/k-means-commandline.html
(original)
+++
websites/staging/mahout/trunk/content/users/clustering/k-means-commandline.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/clustering/latent-dirichlet-allocation.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/clustering/latent-dirichlet-allocation.html
(original)
+++
websites/staging/mahout/trunk/content/users/clustering/latent-dirichlet-allocation.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/clustering/lda-commandline.html
==============================================================================
--- websites/staging/mahout/trunk/content/users/clustering/lda-commandline.html
(original)
+++ websites/staging/mahout/trunk/content/users/clustering/lda-commandline.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/clustering/llr---log-likelihood-ratio.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/clustering/llr---log-likelihood-ratio.html
(original)
+++
websites/staging/mahout/trunk/content/users/clustering/llr---log-likelihood-ratio.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/clustering/spectral-clustering.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/clustering/spectral-clustering.html
(original)
+++
websites/staging/mahout/trunk/content/users/clustering/spectral-clustering.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/clustering/streaming-k-means.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/clustering/streaming-k-means.html
(original)
+++
websites/staging/mahout/trunk/content/users/clustering/streaming-k-means.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/clustering/viewing-result.html
==============================================================================
--- websites/staging/mahout/trunk/content/users/clustering/viewing-result.html
(original)
+++ websites/staging/mahout/trunk/content/users/clustering/viewing-result.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/clustering/viewing-results.html
==============================================================================
--- websites/staging/mahout/trunk/content/users/clustering/viewing-results.html
(original)
+++ websites/staging/mahout/trunk/content/users/clustering/viewing-results.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/clustering/visualizing-sample-clusters.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/clustering/visualizing-sample-clusters.html
(original)
+++
websites/staging/mahout/trunk/content/users/clustering/visualizing-sample-clusters.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/dim-reduction/dimensional-reduction.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/dim-reduction/dimensional-reduction.html
(original)
+++
websites/staging/mahout/trunk/content/users/dim-reduction/dimensional-reduction.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified: websites/staging/mahout/trunk/content/users/dim-reduction/ssvd.html
==============================================================================
--- websites/staging/mahout/trunk/content/users/dim-reduction/ssvd.html
(original)
+++ websites/staging/mahout/trunk/content/users/dim-reduction/ssvd.html Thu Apr
23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/environment/classify-a-doc-from-the-shell.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/environment/classify-a-doc-from-the-shell.html
(original)
+++
websites/staging/mahout/trunk/content/users/environment/classify-a-doc-from-the-shell.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
@@ -262,8 +262,8 @@
<div id="content-wrap" class="clearfix">
<div id="main">
- <h1 id="classifying-a-document-with-the-mahout-shell">Classifying a
Document with the Mahout Shell</h1>
-<p>This tutorial will take you through the steps used to train and create a
Multinomial Naive Bayes text classifier using the <code>mahout
spark-shell</code>. </p>
+ <h1 id="building-a-text-classifier-in-mahouts-spark-shell">Building a text
classifier in Mahout's Spark Shell</h1>
+<p>This tutorial will take you through the steps used to train a Multinomial
Naive Bayes model and create a text classifier based on that model using the
<code>mahout spark-shell</code>. </p>
<h2 id="prerequisites">Prerequisites</h2>
<p>This tutorial assumes that you have your Spark environment variables set
for the <code>mahout spark-shell</code> see: <a
href="http://mahout.apache.org/users/sparkbindings/play-with-shell.html">Playing
with Mahout's Shell</a>. As well we assume that Mahout is running in cluster
mode (i.e. with the <code>MAHOUT_LOCAL</code> environment variable
<strong>unset</strong>) as we'll be reading and writing to HDFS.</p>
<h2 id="downloading-and-vectorizing-the-wikipedia-dataset">Downloading and
Vectorizing the Wikipedia dataset</h2>
@@ -305,7 +305,7 @@
</pre></div>
-<h2
id="extract-the-category-of-each-observation-and-aggregate-those-observation-by-category">Extract
the category of each observation and aggregate those observation by
category</h2>
+<h2
id="extract-the-category-of-each-observation-and-aggregate-those-observations-by-category">Extract
the category of each observation and aggregate those observations by
category</h2>
<div class="codehilite"><pre><span class="n">val</span> <span
class="p">(</span><span class="n">labelIndex</span><span class="p">,</span>
<span class="n">aggregatedObservations</span><span class="p">)</span> <span
class="p">=</span> <span class="n">SparkNaiveBayes</span><span
class="p">.</span><span
class="n">extractLabelsAndAggregateObservations</span><span class="p">(</span>
<span
class="n">fullData</span><span class="p">)</span>
</pre></div>
@@ -344,7 +344,7 @@
<h2
id="define-a-function-to-tokenize-and-vectorize-new-text-using-our-current-dictionary">Define
a function to tokenize and vectorize new text using our current dictionary</h2>
-<p>For this simple example, our function ```vectorizeDocument(...) will
tokenize a new document into unigrams using native Java String methods and
vectorize using our dictionary and document frequencies. You could also use a
<a href="https://lucene.apache.org/core/">Lucene</a> analyzer for bigrams,
trigrams, etc., and integrate Apache <a
href="https://tika.apache.org/">Tika</a> to extract text from different
document types (PDF, PPT, XLS, etc.). Here, however we will keep it simple and
split our text using regexs and native String methods.</p>
+<p>For this simple example, our function <code>vectorizeDocument(...)</code>
will tokenize a new document into unigrams using native Java String methods and
vectorize using our dictionary and document frequencies. You could also use a
<a href="https://lucene.apache.org/core/">Lucene</a> analyzer for bigrams,
trigrams, etc., and integrate Apache <a
href="https://tika.apache.org/">Tika</a> to extract text from different
document types (PDF, PPT, XLS, etc.). Here, however we will keep it simple,
stripping and tokenizing our text using regexs and native String methods.</p>
<div class="codehilite"><pre>def vectorizeDocument<span
class="p">(</span>document: String<span class="p">,</span>
dictionaryMap: Map<span class="p">[</span>String<span
class="p">,</span>Int<span class="p">],</span>
dfMap: Map<span class="p">[</span>Int<span
class="p">,</span>Long<span class="p">])</span>: Vector <span
class="o">=</span> <span class="p">{</span>
@@ -404,7 +404,7 @@
</pre></div>
-<h2 id="define-our-final-tf-idf-vector-classifier">Define our final TF(-IDF)
vector classifier</h2>
+<h2 id="define-our-tf-idf-vector-classifier">Define our TF(-IDF) vector
classifier</h2>
<div class="codehilite"><pre><span class="n">def</span> <span
class="n">classifyDocument</span><span class="p">(</span><span
class="n">clvec</span><span class="p">:</span> <span
class="n">Vector</span><span class="p">)</span> <span class="p">:</span> <span
class="n">String</span> <span class="p">=</span> <span class="p">{</span>
<span class="n">val</span> <span class="n">cvec</span> <span
class="p">=</span> <span class="n">classifier</span><span
class="p">.</span><span class="n">classifyFull</span><span
class="p">(</span><span class="n">clvec</span><span class="p">)</span>
<span class="n">val</span> <span class="p">(</span><span
class="n">bestIdx</span><span class="p">,</span> <span
class="n">bestScore</span><span class="p">)</span> <span class="p">=</span>
<span class="n">argmax</span><span class="p">(</span><span
class="n">cvec</span><span class="p">)</span>
@@ -494,7 +494,7 @@
</pre></div>
-<h2 id="tie-everything-together-in-a-new-method-to-classify-new-text">Tie
everything together in a new method to classify new text</h2>
+<h2 id="tie-everything-together-in-a-new-method-to-classify-text">Tie
everything together in a new method to classify text</h2>
<div class="codehilite"><pre><span class="n">def</span> <span
class="n">classifyText</span><span class="p">(</span><span
class="n">txt</span><span class="p">:</span> <span class="n">String</span><span
class="p">):</span> <span class="n">String</span> <span class="p">=</span>
<span class="p">{</span>
<span class="n">val</span> <span class="n">v</span> <span
class="p">=</span> <span class="n">vectorizeDocument</span><span
class="p">(</span><span class="n">txt</span><span class="p">,</span> <span
class="n">dictionaryMap</span><span class="p">,</span> <span
class="n">dfCountMap</span><span class="p">)</span>
<span class="n">classifyDocument</span><span class="p">(</span><span
class="n">v</span><span class="p">)</span>
@@ -507,6 +507,20 @@
<div class="codehilite"><pre><span class="n">classifyText</span><span
class="p">(</span>"<span class="n">Hello</span> <span
class="n">world</span> <span class="n">from</span> <span
class="n">Queens</span>"<span class="p">)</span>
<span class="n">classifyText</span><span class="p">(</span>"<span
class="n">Hello</span> <span class="n">world</span> <span class="n">from</span>
<span class="n">London</span>"<span class="p">)</span>
</pre></div>
+
+
+<h2 id="model-persistance">Model persistance</h2>
+<p>You can save the model to HDFS:</p>
+<div class="codehilite"><pre><span class="n">model</span><span
class="p">.</span><span class="n">dfsWrite</span><span
class="p">(</span>"<span class="o">/</span><span
class="n">path</span><span class="o">/</span><span class="n">to</span><span
class="o">/</span><span class="n">model</span>"<span class="p">)</span>
+</pre></div>
+
+
+<p>And retrieve it with:</p>
+<div class="codehilite"><pre><span class="n">val</span> <span
class="n">model</span> <span class="p">=</span> <span
class="n">NBModel</span><span class="p">.</span><span
class="n">dfsRead</span><span class="p">(</span>"<span
class="o">/</span><span class="n">path</span><span class="o">/</span><span
class="n">to</span><span class="o">/</span><span
class="n">model</span>"<span class="p">)</span>
+</pre></div>
+
+
+<p>The trained model can now be embedded in an external application.</p>
</div>
</div>
</div>
Modified:
websites/staging/mahout/trunk/content/users/environment/h2o-internals.html
==============================================================================
--- websites/staging/mahout/trunk/content/users/environment/h2o-internals.html
(original)
+++ websites/staging/mahout/trunk/content/users/environment/h2o-internals.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/environment/how-to-build-an-app.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/environment/how-to-build-an-app.html
(original)
+++
websites/staging/mahout/trunk/content/users/environment/how-to-build-an-app.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/environment/in-core-reference.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/environment/in-core-reference.html
(original)
+++
websites/staging/mahout/trunk/content/users/environment/in-core-reference.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/environment/out-of-core-reference.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/environment/out-of-core-reference.html
(original)
+++
websites/staging/mahout/trunk/content/users/environment/out-of-core-reference.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/environment/spark-internals.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/environment/spark-internals.html
(original)
+++
websites/staging/mahout/trunk/content/users/environment/spark-internals.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified: websites/staging/mahout/trunk/content/users/misc/mr---map-reduce.html
==============================================================================
--- websites/staging/mahout/trunk/content/users/misc/mr---map-reduce.html
(original)
+++ websites/staging/mahout/trunk/content/users/misc/mr---map-reduce.html Thu
Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/misc/parallel-frequent-pattern-mining.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/misc/parallel-frequent-pattern-mining.html
(original)
+++
websites/staging/mahout/trunk/content/users/misc/parallel-frequent-pattern-mining.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/misc/perceptron-and-winnow.html
==============================================================================
--- websites/staging/mahout/trunk/content/users/misc/perceptron-and-winnow.html
(original)
+++ websites/staging/mahout/trunk/content/users/misc/perceptron-and-winnow.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified: websites/staging/mahout/trunk/content/users/misc/testing.html
==============================================================================
--- websites/staging/mahout/trunk/content/users/misc/testing.html (original)
+++ websites/staging/mahout/trunk/content/users/misc/testing.html Thu Apr 23
19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/misc/using-mahout-with-python-via-jpype.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/misc/using-mahout-with-python-via-jpype.html
(original)
+++
websites/staging/mahout/trunk/content/users/misc/using-mahout-with-python-via-jpype.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/recommender/intro-als-hadoop.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/recommender/intro-als-hadoop.html
(original)
+++
websites/staging/mahout/trunk/content/users/recommender/intro-als-hadoop.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/recommender/intro-cooccurrence-spark.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/recommender/intro-cooccurrence-spark.html
(original)
+++
websites/staging/mahout/trunk/content/users/recommender/intro-cooccurrence-spark.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/recommender/intro-itembased-hadoop.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/recommender/intro-itembased-hadoop.html
(original)
+++
websites/staging/mahout/trunk/content/users/recommender/intro-itembased-hadoop.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/recommender/matrix-factorization.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/recommender/matrix-factorization.html
(original)
+++
websites/staging/mahout/trunk/content/users/recommender/matrix-factorization.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/recommender/quickstart.html
==============================================================================
--- websites/staging/mahout/trunk/content/users/recommender/quickstart.html
(original)
+++ websites/staging/mahout/trunk/content/users/recommender/quickstart.html Thu
Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/recommender/recommender-documentation.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/recommender/recommender-documentation.html
(original)
+++
websites/staging/mahout/trunk/content/users/recommender/recommender-documentation.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/recommender/recommender-first-timer-faq.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/recommender/recommender-first-timer-faq.html
(original)
+++
websites/staging/mahout/trunk/content/users/recommender/recommender-first-timer-faq.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/recommender/userbased-5-minutes.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/recommender/userbased-5-minutes.html
(original)
+++
websites/staging/mahout/trunk/content/users/recommender/userbased-5-minutes.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified: websites/staging/mahout/trunk/content/users/sparkbindings/faq.html
==============================================================================
--- websites/staging/mahout/trunk/content/users/sparkbindings/faq.html
(original)
+++ websites/staging/mahout/trunk/content/users/sparkbindings/faq.html Thu Apr
23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified: websites/staging/mahout/trunk/content/users/sparkbindings/home.html
==============================================================================
--- websites/staging/mahout/trunk/content/users/sparkbindings/home.html
(original)
+++ websites/staging/mahout/trunk/content/users/sparkbindings/home.html Thu Apr
23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>
Modified:
websites/staging/mahout/trunk/content/users/sparkbindings/play-with-shell.html
==============================================================================
---
websites/staging/mahout/trunk/content/users/sparkbindings/play-with-shell.html
(original)
+++
websites/staging/mahout/trunk/content/users/sparkbindings/play-with-shell.html
Thu Apr 23 19:53:09 2015
@@ -151,7 +151,7 @@
<li class="nav-header">Tutorials</li>
<li><a
href="/users/sparkbindings/play-with-shell.html">Playing with Mahout's Spark
Shell</a></li>
<li><a
href="/users/environment/how-to-build-an-app.html">How to build an app</a></li>
- <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Classify a
document from the Shell</a></li>
+ <li><a
href="/users/environment/classify-a-doc-from-the-shell.html">Building a text
classifier in Mahout's Spark Shell</a></li>
</ul>
</li>
<li class="dropdown"> <a href="#" class="dropdown-toggle"
data-toggle="dropdown">Algorithms<b class="caret"></b></a>