http://git-wip-us.apache.org/repos/asf/incubator-hivemall-site/blob/d9012d92/userguide/binaryclass/news20_adagrad.html ---------------------------------------------------------------------- diff --git a/userguide/binaryclass/news20_adagrad.html b/userguide/binaryclass/news20_adagrad.html index f4d3f39..d2742b2 100644 --- a/userguide/binaryclass/news20_adagrad.html +++ b/userguide/binaryclass/news20_adagrad.html @@ -100,7 +100,7 @@ <link rel="next" href="news20_rf.html" /> - <link rel="prev" href="news20_scw.html" /> + <link rel="prev" href="news20_generic.html" /> </head> @@ -972,7 +972,7 @@ <b>6.2.1.</b> - Data preparation + Data Preparation </a> @@ -980,13 +980,28 @@ </li> - <li class="chapter " data-level="6.2.2" data-path="a9a_lr.html"> + <li class="chapter " data-level="6.2.2" data-path="a9a_generic.html"> - <a href="a9a_lr.html"> + <a href="a9a_generic.html"> <b>6.2.2.</b> + General Binary Classifier + + </a> + + + + </li> + + <li class="chapter " data-level="6.2.3" data-path="a9a_lr.html"> + + <a href="a9a_lr.html"> + + + <b>6.2.3.</b> + Logistic Regression </a> @@ -995,14 +1010,14 @@ </li> - <li class="chapter " data-level="6.2.3" data-path="a9a_minibatch.html"> + <li class="chapter " data-level="6.2.4" data-path="a9a_minibatch.html"> <a href="a9a_minibatch.html"> - <b>6.2.3.</b> + <b>6.2.4.</b> - Mini-batch gradient descent + Mini-batch Gradient Descent </a> @@ -1038,7 +1053,7 @@ <b>6.3.1.</b> - Data preparation + Data Preparation </a> @@ -1076,13 +1091,28 @@ </li> - <li class="chapter active" data-level="6.3.4" data-path="news20_adagrad.html"> + <li class="chapter " data-level="6.3.4" data-path="news20_generic.html"> - <a href="news20_adagrad.html"> + <a href="news20_generic.html"> <b>6.3.4.</b> + General Binary Classifier + + </a> + + + + </li> + + <li class="chapter active" data-level="6.3.5" data-path="news20_adagrad.html"> + + <a href="news20_adagrad.html"> + + + <b>6.3.5.</b> + AdaGradRDA, AdaGrad, AdaDelta </a> @@ -1091,12 +1121,12 @@ </li> - <li class="chapter " data-level="6.3.5" data-path="news20_rf.html"> + <li class="chapter " data-level="6.3.6" data-path="news20_rf.html"> <a href="news20_rf.html"> - <b>6.3.5.</b> + <b>6.3.6.</b> Random Forest @@ -1134,7 +1164,7 @@ <b>6.4.1.</b> - Data preparation + Data Preparation </a> @@ -1185,7 +1215,7 @@ <b>6.5.1.</b> - Data preparation + Data Preparation </a> @@ -1236,7 +1266,7 @@ <b>6.6.1.</b> - Data pareparation + Data Pareparation </a> @@ -1302,7 +1332,7 @@ <b>6.8.1.</b> - Data preparation + Data Preparation </a> @@ -1360,7 +1390,7 @@ <b>7.1.1.</b> - Data preparation + Data Preparation </a> @@ -1375,7 +1405,7 @@ <b>7.1.2.</b> - Data preparation for one-vs-the-rest classifiers + Data Preparation for one-vs-the-rest classifiers </a> @@ -1435,7 +1465,7 @@ <b>7.1.6.</b> - one-vs-the-rest classifier + one-vs-the-rest Classifier </a> @@ -1559,7 +1589,7 @@ <b>8.2.1.</b> - Data preparation + Data Preparation </a> @@ -1567,13 +1597,28 @@ </li> - <li class="chapter " data-level="8.2.2" data-path="../regression/e2006_arow.html"> + <li class="chapter " data-level="8.2.2" data-path="../regression/e2006_generic.html"> - <a href="../regression/e2006_arow.html"> + <a href="../regression/e2006_generic.html"> <b>8.2.2.</b> + General Regessor + + </a> + + + + </li> + + <li class="chapter " data-level="8.2.3" data-path="../regression/e2006_arow.html"> + + <a href="../regression/e2006_arow.html"> + + + <b>8.2.3.</b> + Passive Aggressive, AROW </a> @@ -1610,7 +1655,7 @@ <b>8.3.1.</b> - Data preparation + Data Preparation </a> @@ -1698,7 +1743,7 @@ <b>9.1.1.</b> - Item-based collaborative filtering + Item-based Collaborative Filtering </a> @@ -1734,7 +1779,7 @@ <b>9.2.1.</b> - Data preparation + Data Preparation </a> @@ -1749,7 +1794,7 @@ <b>9.2.2.</b> - LSH/MinHash and Jaccard similarity + LSH/MinHash and Jaccard Similarity </a> @@ -1764,7 +1809,7 @@ <b>9.2.3.</b> - LSH/MinHash and brute-force search + LSH/MinHash and Brute-force Search </a> @@ -1815,7 +1860,7 @@ <b>9.3.1.</b> - Data preparation + Data Preparation </a> @@ -1830,7 +1875,7 @@ <b>9.3.2.</b> - Item-based collaborative filtering + Item-based Collaborative Filtering </a> @@ -1875,7 +1920,7 @@ <b>9.3.5.</b> - SLIM for fast top-k recommendation + SLIM for fast top-k Recommendation </a> @@ -1890,7 +1935,7 @@ <b>9.3.6.</b> - 10-fold cross validation (Matrix Factorization) + 10-fold Cross Validation (Matrix Factorization) </a> @@ -2080,7 +2125,7 @@ <b>13.2.1.</b> - a9a tutorial for DataFrame + a9a Tutorial for DataFrame </a> @@ -2095,7 +2140,7 @@ <b>13.2.2.</b> - a9a tutorial for SQL + a9a Tutorial for SQL </a> @@ -2131,7 +2176,7 @@ <b>13.3.1.</b> - E2006-tfidf regression tutorial for DataFrame + E2006-tfidf Regression Tutorial for DataFrame </a> @@ -2146,7 +2191,7 @@ <b>13.3.2.</b> - E2006-tfidf regression tutorial for SQL + E2006-tfidf Regression Tutorial for SQL </a> @@ -2166,7 +2211,7 @@ <b>13.4.</b> - Generic features + Generic Features </a> @@ -2182,7 +2227,7 @@ <b>13.4.1.</b> - Top-k join processing + Top-k Join Processing </a> @@ -2197,7 +2242,7 @@ <b>13.4.2.</b> - Other utility functions + Other Utility Functions </a> @@ -2320,36 +2365,41 @@ <!-- toc --><div id="toc" class="toc"> <ul> -<li><a href="#udf-preparation">UDF preparation</a></li> +<li><a href="#adagradrda">AdaGradRDA</a><ul> <li><a href="#model-building">model building</a></li> <li><a href="#prediction">prediction</a></li> <li><a href="#evaluation">evaluation</a></li> +</ul> +</li> +<li><a href="#adagrad">AdaGrad</a><ul> <li><a href="#model-building-1">model building</a></li> <li><a href="#prediction-1">prediction</a></li> <li><a href="#evaluation-1">evaluation</a></li> +</ul> +</li> +<li><a href="#adadelta">AdaDelta</a><ul> <li><a href="#model-building-2">model building</a></li> <li><a href="#prediction-2">prediction</a></li> <li><a href="#evaluation-2">evaluation</a></li> </ul> +</li> +</ul> </div><!-- tocstop --> -<div class="panel panel-primary"><div class="panel-heading"><h3 class="panel-title" id="note"><i class="fa fa-edit"></i> Note</h3></div><div class="panel-body"><p>This feature is supported since Hivemall <code>v0.3-beta2</code> or later.</p></div></div> -<h2 id="udf-preparation">UDF preparation</h2> -<pre><code>add jar ./tmp/hivemall-with-dependencies.jar; -source ./tmp/define-all.hive; - -use news20; -</code></pre><h1 id="adagradrda">[AdaGradRDA]</h1> +<div class="panel panel-warning"><div class="panel-heading"><h3 class="panel-title" id="caution"><i class="fa fa-exclamation-triangle"></i> Caution</h3></div><div class="panel-body"><p><code>train_adagrad()</code> became deprecated since v0.5.0 release. Use smarter <a href="a9a_generic.html">general classifier</a> instead.</p></div></div> +<h1 id="adagradrda">AdaGradRDA</h1> <div class="panel panel-primary"><div class="panel-heading"><h3 class="panel-title" id="note"><i class="fa fa-edit"></i> Note</h3></div><div class="panel-body"><p>The current AdaGradRDA implmenetation can only be applied to classification, not to regression, because it uses hinge loss for the loss function.</p></div></div> <h2 id="model-building">model building</h2> -<pre><code class="lang-sql"><span class="hljs-keyword">drop</span> <span class="hljs-keyword">table</span> news20b_adagrad_rda_model1; +<pre><code class="lang-sql"><span class="hljs-keyword">use</span> news20; + +<span class="hljs-keyword">drop</span> <span class="hljs-keyword">table</span> news20b_adagrad_rda_model1; <span class="hljs-keyword">create</span> <span class="hljs-keyword">table</span> news20b_adagrad_rda_model1 <span class="hljs-keyword">as</span> <span class="hljs-keyword">select</span> feature, voted_avg(weight) <span class="hljs-keyword">as</span> weight <span class="hljs-keyword">from</span> (<span class="hljs-keyword">select</span> - train_adagrad_rda(addBias(features),label) <span class="hljs-keyword">as</span> (feature,weight) + train_adagrad_rda(add_bias(features),label) <span class="hljs-keyword">as</span> (feature,weight) <span class="hljs-keyword">from</span> news20b_train_x3 ) t @@ -2384,8 +2434,8 @@ use news20; <p>SCW1 0.9661729383506805 </p> <p>ADAGRAD+RDA 0.9677742193755005</p> </blockquote> -<h1 id="adagrad">[AdaGrad]</h1> -<p><em>Note that AdaGrad is better suited for a regression problem because the current implementation only support logistic loss.</em></p> +<h1 id="adagrad">AdaGrad</h1> +<div class="panel panel-primary"><div class="panel-heading"><h3 class="panel-title" id="note"><i class="fa fa-edit"></i> Note</h3></div><div class="panel-body"><p>AdaGrad is better suited for a binary classification problem because the current implementation only support logistic loss.</p></div></div> <h2 id="model-building">model building</h2> <pre><code class="lang-sql"><span class="hljs-keyword">drop</span> <span class="hljs-keyword">table</span> news20b_adagrad_model1; <span class="hljs-keyword">create</span> <span class="hljs-keyword">table</span> news20b_adagrad_model1 <span class="hljs-keyword">as</span> @@ -2394,7 +2444,7 @@ use news20; voted_avg(weight) <span class="hljs-keyword">as</span> weight <span class="hljs-keyword">from</span> (<span class="hljs-keyword">select</span> - adagrad(addBias(features),convert_label(label)) <span class="hljs-keyword">as</span> (feature,weight) + train_adagrad_regr(add_bias(features),convert_label(label)) <span class="hljs-keyword">as</span> (feature,weight) <span class="hljs-keyword">from</span> news20b_train_x3 ) t @@ -2428,7 +2478,7 @@ use news20; <blockquote> <p>0.9549639711769415 (adagrad)</p> </blockquote> -<h1 id="adadelta">[AdaDelta]</h1> +<h1 id="adadelta">AdaDelta</h1> <div class="panel panel-warning"><div class="panel-heading"><h3 class="panel-title" id="caution"><i class="fa fa-exclamation-triangle"></i> Caution</h3></div><div class="panel-body"><p>AdaDelta can only be applied for regression problem because the current implementation only support logistic loss.</p></div></div> <h2 id="model-building">model building</h2> <pre><code class="lang-sql"><span class="hljs-keyword">drop</span> <span class="hljs-keyword">table</span> news20b_adadelta_model1; @@ -2438,7 +2488,7 @@ use news20; voted_avg(weight) <span class="hljs-keyword">as</span> weight <span class="hljs-keyword">from</span> (<span class="hljs-keyword">select</span> - adadelta(addBias(features),convert_label(label)) <span class="hljs-keyword">as</span> (feature,weight) + adadelta(add_bias(features),convert_label(label)) <span class="hljs-keyword">as</span> (feature,weight) <span class="hljs-keyword">from</span> news20b_train_x3 ) t @@ -2528,7 +2578,7 @@ Apache Hivemall is an effort undergoing incubation at The Apache Software Founda <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"AdaGradRDA, AdaGrad, AdaDelta","level":"6.3.4","depth":2,"next":{"title":"Random Forest","level":"6.3.5","depth":2,"path":"binaryclass/news20_rf.md","ref":"binaryclass/news20_rf.md","articles":[]},"previous":{"title":"CW, AROW, SCW","level":"6.3.3","depth":2,"path":"binaryclass/news20_scw.md","ref":"binaryclass/news20_scw.md","articles":[]},"dir":"ltr"},"config":{"plugins":["theme-api","edit-link","github","splitter","sitemap","etoc","callouts","toggle-chapters","anchorjs","codeblock-filename","expandable-chapters","multipart","codeblock-filename","katex","emphasize","localized-footer"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"emphasize":{},"callouts":{},"etoc":{"h2lb":3,"header":1,"maxdepth":3,"mindepth":1,"notoc":true},"github":{"url":"https://github.com/apache/incubator-hivemall/"}," splitter":{},"search":{},"downloadpdf":{"base":"https://github.com/apache/incubator-hivemall/docs/gitbook","label":"PDF","multilingual":false},"multipart":{},"localized-footer":{"filename":"FOOTER.md","hline":"true"},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"katex":{},"fontsettings":{"theme":"white","family":"sans","size":2,"font":"sans"},"highlight":{},"codeblock-filename":{},"sitemap":{"hostname":"https://hivemall.incubator.apache.org/"},"theme-api":{"languages":[],"split":false,"theme":"dark"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit","base":"https://github.com/apache/incubator-hivemall/tree/master/docs/gitbook"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":true} ,"anchorjs":{"selector":"h1,h2,h3,*:not(.callout) > h4,h5"},"toggle-chapters":{},"expandable-chapters":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Hivemall User Manual","links":{"sidebar":{"<i class=\"fa fa-home\"></i> Home":"https://hivemall.incubator.apache.org/"}},"gitbook":"3.x.x","description":"User Manual for Apache Hivemall"},"file":{"path":"binaryclass/news20_adagrad.md","mtime":"2018-10-18T10:26:56.676Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-13T09:32:29.643Z"},"basePath":"..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"AdaGradRDA, AdaGrad, AdaDelta","level":"6.3.5","depth":2,"next":{"title":"Random Forest","level":"6.3.6","depth":2,"path":"binaryclass/news20_rf.md","ref":"binaryclass/news20_rf.md","articles":[]},"previous":{"title":"General Binary Classifier","level":"6.3.4","depth":2,"path":"binaryclass/news20_generic.md","ref":"binaryclass/news20_generic.md","articles":[]},"dir":"ltr"},"config":{"plugins":["theme-api","edit-link","github","splitter","sitemap","etoc","callouts","toggle-chapters","anchorjs","codeblock-filename","expandable-chapters","multipart","codeblock-filename","katex","emphasize","localized-footer"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"emphasize":{},"callouts":{},"etoc":{"h2lb":3,"header":1,"maxdepth":3,"mindepth":1,"notoc":true},"github":{"url":"https://github.com/apache/inc ubator-hivemall/"},"splitter":{},"search":{},"downloadpdf":{"base":"https://github.com/apache/incubator-hivemall/docs/gitbook","label":"PDF","multilingual":false},"multipart":{},"localized-footer":{"filename":"FOOTER.md","hline":"true"},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"katex":{},"fontsettings":{"theme":"white","family":"sans","size":2,"font":"sans"},"highlight":{},"codeblock-filename":{},"sitemap":{"hostname":"https://hivemall.incubator.apache.org/"},"theme-api":{"languages":[],"split":false,"theme":"dark"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit","base":"https://github.com/apache/incubator-hivemall/tree/master/docs/gitbook"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css "},"showLevel":true},"anchorjs":{"selector":"h1,h2,h3,*:not(.callout) > h4,h5"},"toggle-chapters":{},"expandable-chapters":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Hivemall User Manual","links":{"sidebar":{"<i class=\"fa fa-home\"></i> Home":"https://hivemall.incubator.apache.org/"}},"gitbook":"3.x.x","description":"User Manual for Apache Hivemall"},"file":{"path":"binaryclass/news20_adagrad.md","mtime":"2018-12-26T10:16:03.079Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-12-26T10:20:07.153Z"},"basePath":"..","book":{"language":""}}); }); </script> </div> @@ -2558,7 +2608,7 @@ Apache Hivemall is an effort undergoing incubation at The Apache Software Founda - <script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.1/anchor.min.js"></script> + <script src="../gitbook/gitbook-plugin-anchorjs/anchor.min.js"></script>
http://git-wip-us.apache.org/repos/asf/incubator-hivemall-site/blob/d9012d92/userguide/binaryclass/news20_dataset.html ---------------------------------------------------------------------- diff --git a/userguide/binaryclass/news20_dataset.html b/userguide/binaryclass/news20_dataset.html index 6b26de4..26537ad 100644 --- a/userguide/binaryclass/news20_dataset.html +++ b/userguide/binaryclass/news20_dataset.html @@ -4,7 +4,7 @@ <head> <meta charset="UTF-8"> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> - <title>Data preparation · Hivemall User Manual</title> + <title>Data Preparation · Hivemall User Manual</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="description" content=""> <meta name="generator" content="GitBook 3.2.3"> @@ -972,7 +972,7 @@ <b>6.2.1.</b> - Data preparation + Data Preparation </a> @@ -980,13 +980,28 @@ </li> - <li class="chapter " data-level="6.2.2" data-path="a9a_lr.html"> + <li class="chapter " data-level="6.2.2" data-path="a9a_generic.html"> - <a href="a9a_lr.html"> + <a href="a9a_generic.html"> <b>6.2.2.</b> + General Binary Classifier + + </a> + + + + </li> + + <li class="chapter " data-level="6.2.3" data-path="a9a_lr.html"> + + <a href="a9a_lr.html"> + + + <b>6.2.3.</b> + Logistic Regression </a> @@ -995,14 +1010,14 @@ </li> - <li class="chapter " data-level="6.2.3" data-path="a9a_minibatch.html"> + <li class="chapter " data-level="6.2.4" data-path="a9a_minibatch.html"> <a href="a9a_minibatch.html"> - <b>6.2.3.</b> + <b>6.2.4.</b> - Mini-batch gradient descent + Mini-batch Gradient Descent </a> @@ -1038,7 +1053,7 @@ <b>6.3.1.</b> - Data preparation + Data Preparation </a> @@ -1076,13 +1091,28 @@ </li> - <li class="chapter " data-level="6.3.4" data-path="news20_adagrad.html"> + <li class="chapter " data-level="6.3.4" data-path="news20_generic.html"> - <a href="news20_adagrad.html"> + <a href="news20_generic.html"> <b>6.3.4.</b> + General Binary Classifier + + </a> + + + + </li> + + <li class="chapter " data-level="6.3.5" data-path="news20_adagrad.html"> + + <a href="news20_adagrad.html"> + + + <b>6.3.5.</b> + AdaGradRDA, AdaGrad, AdaDelta </a> @@ -1091,12 +1121,12 @@ </li> - <li class="chapter " data-level="6.3.5" data-path="news20_rf.html"> + <li class="chapter " data-level="6.3.6" data-path="news20_rf.html"> <a href="news20_rf.html"> - <b>6.3.5.</b> + <b>6.3.6.</b> Random Forest @@ -1134,7 +1164,7 @@ <b>6.4.1.</b> - Data preparation + Data Preparation </a> @@ -1185,7 +1215,7 @@ <b>6.5.1.</b> - Data preparation + Data Preparation </a> @@ -1236,7 +1266,7 @@ <b>6.6.1.</b> - Data pareparation + Data Pareparation </a> @@ -1302,7 +1332,7 @@ <b>6.8.1.</b> - Data preparation + Data Preparation </a> @@ -1360,7 +1390,7 @@ <b>7.1.1.</b> - Data preparation + Data Preparation </a> @@ -1375,7 +1405,7 @@ <b>7.1.2.</b> - Data preparation for one-vs-the-rest classifiers + Data Preparation for one-vs-the-rest classifiers </a> @@ -1435,7 +1465,7 @@ <b>7.1.6.</b> - one-vs-the-rest classifier + one-vs-the-rest Classifier </a> @@ -1559,7 +1589,7 @@ <b>8.2.1.</b> - Data preparation + Data Preparation </a> @@ -1567,13 +1597,28 @@ </li> - <li class="chapter " data-level="8.2.2" data-path="../regression/e2006_arow.html"> + <li class="chapter " data-level="8.2.2" data-path="../regression/e2006_generic.html"> - <a href="../regression/e2006_arow.html"> + <a href="../regression/e2006_generic.html"> <b>8.2.2.</b> + General Regessor + + </a> + + + + </li> + + <li class="chapter " data-level="8.2.3" data-path="../regression/e2006_arow.html"> + + <a href="../regression/e2006_arow.html"> + + + <b>8.2.3.</b> + Passive Aggressive, AROW </a> @@ -1610,7 +1655,7 @@ <b>8.3.1.</b> - Data preparation + Data Preparation </a> @@ -1698,7 +1743,7 @@ <b>9.1.1.</b> - Item-based collaborative filtering + Item-based Collaborative Filtering </a> @@ -1734,7 +1779,7 @@ <b>9.2.1.</b> - Data preparation + Data Preparation </a> @@ -1749,7 +1794,7 @@ <b>9.2.2.</b> - LSH/MinHash and Jaccard similarity + LSH/MinHash and Jaccard Similarity </a> @@ -1764,7 +1809,7 @@ <b>9.2.3.</b> - LSH/MinHash and brute-force search + LSH/MinHash and Brute-force Search </a> @@ -1815,7 +1860,7 @@ <b>9.3.1.</b> - Data preparation + Data Preparation </a> @@ -1830,7 +1875,7 @@ <b>9.3.2.</b> - Item-based collaborative filtering + Item-based Collaborative Filtering </a> @@ -1875,7 +1920,7 @@ <b>9.3.5.</b> - SLIM for fast top-k recommendation + SLIM for fast top-k Recommendation </a> @@ -1890,7 +1935,7 @@ <b>9.3.6.</b> - 10-fold cross validation (Matrix Factorization) + 10-fold Cross Validation (Matrix Factorization) </a> @@ -2080,7 +2125,7 @@ <b>13.2.1.</b> - a9a tutorial for DataFrame + a9a Tutorial for DataFrame </a> @@ -2095,7 +2140,7 @@ <b>13.2.2.</b> - a9a tutorial for SQL + a9a Tutorial for SQL </a> @@ -2131,7 +2176,7 @@ <b>13.3.1.</b> - E2006-tfidf regression tutorial for DataFrame + E2006-tfidf Regression Tutorial for DataFrame </a> @@ -2146,7 +2191,7 @@ <b>13.3.2.</b> - E2006-tfidf regression tutorial for SQL + E2006-tfidf Regression Tutorial for SQL </a> @@ -2166,7 +2211,7 @@ <b>13.4.</b> - Generic features + Generic Features </a> @@ -2182,7 +2227,7 @@ <b>13.4.1.</b> - Top-k join processing + Top-k Join Processing </a> @@ -2197,7 +2242,7 @@ <b>13.4.2.</b> - Other utility functions + Other Utility Functions </a> @@ -2284,7 +2329,7 @@ <!-- Title --> <h1> <i class="fa fa-circle-o-notch fa-spin"></i> - <a href=".." >Data preparation</a> + <a href=".." >Data Preparation</a> </h1> </div> @@ -2352,11 +2397,6 @@ hadoop fs -copyFromLocal news20.test.t /dataset/news20-binary/test <pre><code class="lang-sql"><span class="hljs-keyword">create</span> <span class="hljs-keyword">database</span> news20; <span class="hljs-keyword">use</span> news20; -<span class="hljs-keyword">delete</span> jar /home/myui/tmp/hivemall.jar; -add jar /home/myui/tmp/hivemall.jar; - -source /home/myui/tmp/define-all.hive; - <span class="hljs-keyword">Create</span> <span class="hljs-keyword">external</span> <span class="hljs-keyword">table</span> news20b_train ( <span class="hljs-keyword">rowid</span> <span class="hljs-built_in">int</span>, label <span class="hljs-built_in">int</span>, @@ -2375,10 +2415,10 @@ source /home/myui/tmp/define-all.hive; <span class="hljs-keyword">select</span> * <span class="hljs-keyword">from</span> ( -<span class="hljs-keyword">select</span> - amplify(<span class="hljs-number">3</span>, *) <span class="hljs-keyword">as</span> (<span class="hljs-keyword">rowid</span>, label, features) -<span class="hljs-keyword">from</span> - news20b_train + <span class="hljs-keyword">select</span> + amplify(<span class="hljs-number">3</span>, *) <span class="hljs-keyword">as</span> (<span class="hljs-keyword">rowid</span>, label, features) + <span class="hljs-keyword">from</span> + news20b_train ) t CLUSTER <span class="hljs-keyword">BY</span> <span class="hljs-keyword">rand</span>(${<span class="hljs-keyword">seed</span>}); @@ -2386,11 +2426,8 @@ CLUSTER <span class="hljs-keyword">BY</span> <span class="hljs-keyword">rand</sp <span class="hljs-keyword">select</span> <span class="hljs-keyword">rowid</span>, label, - <span class="hljs-keyword">cast</span>(<span class="hljs-keyword">split</span>(feature,<span class="hljs-string">":"</span>)[<span class="hljs-number">0</span>] <span class="hljs-keyword">as</span> <span class="hljs-built_in">int</span>) <span class="hljs-keyword">as</span> feature, - <span class="hljs-keyword">cast</span>(<span class="hljs-keyword">split</span>(feature,<span class="hljs-string">":"</span>)[<span class="hljs-number">1</span>] <span class="hljs-keyword">as</span> <span class="hljs-built_in">float</span>) <span class="hljs-keyword">as</span> <span class="hljs-keyword">value</span> - <span class="hljs-comment">-- hivemall v0.3.1 or later</span> - <span class="hljs-comment">-- extract_feature(feature) as feature,</span> - <span class="hljs-comment">-- extract_weight(feature) as value</span> + extract_feature(feature) <span class="hljs-keyword">as</span> feature, + extract_weight(feature) <span class="hljs-keyword">as</span> <span class="hljs-keyword">value</span> <span class="hljs-keyword">from</span> news20b_test LATERAL <span class="hljs-keyword">VIEW</span> explode(add_bias(features)) t <span class="hljs-keyword">AS</span> feature; </code></pre> @@ -2449,7 +2486,7 @@ Apache Hivemall is an effort undergoing incubation at The Apache Software Founda <script> var gitbook = gitbook || []; gitbook.push(function() { - gitbook.page.hasChanged({"page":{"title":"Data preparation","level":"6.3.1","depth":2,"next":{"title":"Perceptron, Passive Aggressive","level":"6.3.2","depth":2,"path":"binaryclass/news20_pa.md","ref":"binaryclass/news20_pa.md","articles":[]},"previous":{"title":"News20 Tutorial","level":"6.3","depth":1,"path":"binaryclass/news20.md","ref":"binaryclass/news20.md","articles":[{"title":"Data preparation","level":"6.3.1","depth":2,"path":"binaryclass/news20_dataset.md","ref":"binaryclass/news20_dataset.md","articles":[]},{"title":"Perceptron, Passive Aggressive","level":"6.3.2","depth":2,"path":"binaryclass/news20_pa.md","ref":"binaryclass/news20_pa.md","articles":[]},{"title":"CW, AROW, SCW","level":"6.3.3","depth":2,"path":"binaryclass/news20_scw.md","ref":"binaryclass/news20_scw.md","articles":[]},{"title":"AdaGradRDA, AdaGrad, AdaDelta","level":"6.3.4","depth":2,"path":"binaryclass/news20_adagrad.md","ref":"binaryclass/news20_adagrad.md","articles":[]},{"title":"Random Forest","level":"6.3.5","depth":2,"path":"binaryclass/news20_rf.md","ref":"binaryclass/news20_rf.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["theme-api","edit-link","github","splitter","sitemap","etoc","callouts","toggle-chapters","anchorjs","codeblock-filename","expandable-chapters","multipart","codeblock-filename","katex","emphasize","localized-footer"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"emphasize":{},"callouts":{},"etoc":{"h2lb":3,"header":1,"maxdepth":3,"mindepth":1,"notoc":true},"github":{"url":"https://github.com/apache/incubator-hivemall/"},"splitter":{},"search":{},"downloadpdf":{"base":"https://github.com/apache/incubator-hivemall/docs/gitbook","label":"PDF","multilingual":false},"multipart":{},"localized-footer":{"filename":"FOOTER.md","hline":"true"},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false },"katex":{},"fontsettings":{"theme":"white","family":"sans","size":2,"font":"sans"},"highlight":{},"codeblock-filename":{},"sitemap":{"hostname":"https://hivemall.incubator.apache.org/"},"theme-api":{"languages":[],"split":false,"theme":"dark"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit","base":"https://github.com/apache/incubator-hivemall/tree/master/docs/gitbook"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":true},"anchorjs":{"selector":"h1,h2,h3,*:not(.callout) > h4,h5"},"toggle-chapters":{},"expandable-chapters":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left" :62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Hivemall User Manual","links":{"sidebar":{"<i class=\"fa fa-home\"></i> Home":"https://hivemall.incubator.apache.org/"}},"gitbook":"3.x.x","description":"User Manual for Apache Hivemall"},"file":{"path":"binaryclass/news20_dataset.md","mtime":"2018-11-02T10:33:52.941Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-13T09:32:29.643Z"},"basePath":"..","book":{"language":""}}); + gitbook.page.hasChanged({"page":{"title":"Data Preparation","level":"6.3.1","depth":2,"next":{"title":"Perceptron, Passive Aggressive","level":"6.3.2","depth":2,"path":"binaryclass/news20_pa.md","ref":"binaryclass/news20_pa.md","articles":[]},"previous":{"title":"News20 Tutorial","level":"6.3","depth":1,"path":"binaryclass/news20.md","ref":"binaryclass/news20.md","articles":[{"title":"Data Preparation","level":"6.3.1","depth":2,"path":"binaryclass/news20_dataset.md","ref":"binaryclass/news20_dataset.md","articles":[]},{"title":"Perceptron, Passive Aggressive","level":"6.3.2","depth":2,"path":"binaryclass/news20_pa.md","ref":"binaryclass/news20_pa.md","articles":[]},{"title":"CW, AROW, SCW","level":"6.3.3","depth":2,"path":"binaryclass/news20_scw.md","ref":"binaryclass/news20_scw.md","articles":[]},{"title":"General Binary Classifier","level":"6.3.4","depth":2,"path":"binaryclass/news20_generic.md","ref":"binaryclass/news20_generic.md","articles":[]},{"title":"AdaGradRDA, AdaGrad, AdaDelta","level":"6.3.5","depth":2,"path":"binaryclass/news20_adagrad.md","ref":"binaryclass/news20_adagrad.md","articles":[]},{"title":"Random Forest","level":"6.3.6","depth":2,"path":"binaryclass/news20_rf.md","ref":"binaryclass/news20_rf.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["theme-api","edit-link","github","splitter","sitemap","etoc","callouts","toggle-chapters","anchorjs","codeblock-filename","expandable-chapters","multipart","codeblock-filename","katex","emphasize","localized-footer"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"emphasize":{},"callouts":{},"etoc":{"h2lb":3,"header":1,"maxdepth":3,"mindepth":1,"notoc":true},"github":{"url":"https://github.com/apache/incubator-hivemall/"},"splitter":{},"search":{},"downloadpdf":{"base":"https://github.com/apache/incubator-hivemall/docs/gitbook","label":"PDF","mu ltilingual":false},"multipart":{},"localized-footer":{"filename":"FOOTER.md","hline":"true"},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"katex":{},"fontsettings":{"theme":"white","family":"sans","size":2,"font":"sans"},"highlight":{},"codeblock-filename":{},"sitemap":{"hostname":"https://hivemall.incubator.apache.org/"},"theme-api":{"languages":[],"split":false,"theme":"dark"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit","base":"https://github.com/apache/incubator-hivemall/tree/master/docs/gitbook"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":true},"anchorjs":{"selector":"h1,h2,h3,*:not(.callout) > h4,h5"},"toggle-chapters":{},"expandable-chapters":{}},"theme":"default" ,"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Hivemall User Manual","links":{"sidebar":{"<i class=\"fa fa-home\"></i> Home":"https://hivemall.incubator.apache.org/"}},"gitbook":"3.x.x","description":"User Manual for Apache Hivemall"},"file":{"path":"binaryclass/news20_dataset.md","mtime":"2018-12-26T10:16:03.079Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-12-26T10:20:07.153Z"},"basePath":"..","book":{"language":""}}); }); </script> </div> @@ -2479,7 +2516,7 @@ Apache Hivemall is an effort undergoing incubation at The Apache Software Founda - <script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.1/anchor.min.js"></script> + <script src="../gitbook/gitbook-plugin-anchorjs/anchor.min.js"></script>
