http://git-wip-us.apache.org/repos/asf/madlib-site/blob/af0e5f14/docs/v1.15.1/graph_legend.html
----------------------------------------------------------------------
diff --git a/docs/v1.15.1/graph_legend.html b/docs/v1.15.1/graph_legend.html
new file mode 100644
index 0000000..1c4a320
--- /dev/null
+++ b/docs/v1.15.1/graph_legend.html
@@ -0,0 +1,161 @@
+<!-- HTML header for doxygen 1.8.4-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";>
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.14"/>
+<meta name="keywords" content="madlib,postgres,greenplum,machine learning,data 
mining,deep learning,ensemble methods,data science,market basket 
analysis,affinity analysis,pca,lda,regression,elastic net,huber 
white,proportional hazards,k-means,latent dirichlet allocation,bayes,support 
vector machines,svm"/>
+<title>MADlib: Graph Legend</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<script type="text/javascript">
+/* @license 
magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt 
GPL-v2 */
+  $(document).ready(initResizable);
+/* @license-end */</script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+/* @license 
magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt 
GPL-v2 */
+  $(document).ready(function() { init_search(); });
+/* @license-end */
+</script>
+<script type="text/x-mathjax-config">
+  MathJax.Hub.Config({
+    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
+    jax: ["input/TeX","output/HTML-CSS"],
+});
+</script><script type="text/javascript" async 
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js";></script>
+<!-- hack in the navigation tree -->
+<script type="text/javascript" src="eigen_navtree_hacks.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="madlib_extra.css" rel="stylesheet" type="text/css"/>
+<!-- google analytics -->
+<script>
+  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+  
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+  ga('create', 'UA-45382226-1', 'madlib.apache.org');
+  ga('send', 'pageview');
+</script>
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectlogo"><a href="http://madlib.apache.org";><img alt="Logo" 
src="madlib.png" height="50" style="padding-left:0.5em;" border="0"/ ></a></td>
+  <td style="padding-left: 0.5em;">
+   <div id="projectname">
+   <span id="projectnumber">1.15.1</span>
+   </div>
+   <div id="projectbrief">User Documentation for Apache MADlib</div>
+  </td>
+   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" 
href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" 
border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.14 -->
+<script type="text/javascript">
+/* @license 
magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt 
GPL-v2 */
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+/* @license-end */
+</script>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license 
magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt 
GPL-v2 */
+$(document).ready(function(){initNavTree('graph_legend.html','');});
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+  <div class="headertitle">
+<div class="title">Graph Legend</div>  </div>
+</div><!--header-->
+<div class="contents">
+<p>This page explains how to interpret the graphs that are generated by 
doxygen.</p>
+<p>Consider the following example: </p><div class="fragment"><div 
class="line">/*! Invisible class because of truncation */</div><div 
class="line">class Invisible { };</div><div class="line"></div><div 
class="line">/*! Truncated class, inheritance relation is hidden */</div><div 
class="line">class Truncated : public Invisible { };</div><div 
class="line"></div><div class="line">/* Class not documented with doxygen 
comments */</div><div class="line">class Undocumented { };</div><div 
class="line"></div><div class="line">/*! Class that is inherited using public 
inheritance */</div><div class="line">class PublicBase : public Truncated { 
};</div><div class="line"></div><div class="line">/*! A template class 
*/</div><div class="line">template&lt;class T&gt; class Templ { };</div><div 
class="line"></div><div class="line">/*! Class that is inherited using 
protected inheritance */</div><div class="line">class ProtectedBase { 
};</div><div class="line"></div><div class="line">/*! Class that is 
 inherited using private inheritance */</div><div class="line">class 
PrivateBase { };</div><div class="line"></div><div class="line">/*! Class that 
is used by the Inherited class */</div><div class="line">class Used { 
};</div><div class="line"></div><div class="line">/*! Super class that inherits 
a number of other classes */</div><div class="line">class Inherited : public 
PublicBase,</div><div class="line">                  protected 
ProtectedBase,</div><div class="line">                  private 
PrivateBase,</div><div class="line">                  public 
Undocumented,</div><div class="line">                  public 
Templ&lt;int&gt;</div><div class="line">{</div><div class="line">  
private:</div><div class="line">    Used *m_usedClass;</div><div 
class="line">};</div></div><!-- fragment --><p> This will result in the 
following graph:</p>
+<center><iframe scrolling="no" frameborder="0" src="graph_legend.svg" 
width="680" height="206"><p><b>This browser is not able to show SVG: try 
Firefox, Chrome, Safari, or Opera instead.</b></p></iframe> </center><p>The 
boxes in the above graph have the following meaning: </p>
+<ul>
+<li>
+A filled gray box represents the struct or class for which the graph is 
generated. </li>
+<li>
+A box with a black border denotes a documented struct or class. </li>
+<li>
+A box with a gray border denotes an undocumented struct or class. </li>
+<li>
+A box with a red border denotes a documented struct or class forwhich not all 
inheritance/containment relations are shown. A graph is truncated if it does 
not fit within the specified boundaries. </li>
+</ul>
+<p>The arrows have the following meaning: </p>
+<ul>
+<li>
+A dark blue arrow is used to visualize a public inheritance relation between 
two classes. </li>
+<li>
+A dark green arrow is used for protected inheritance. </li>
+<li>
+A dark red arrow is used for private inheritance. </li>
+<li>
+A purple dashed arrow is used if a class is contained or used by another 
class. The arrow is labelled with the variable(s) through which the pointed 
class or struct is accessible. </li>
+<li>
+A yellow dashed arrow denotes a relation between a template instance and the 
template class it was instantiated from. The arrow is labelled with the 
template parameters of the instance. </li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">Generated on Mon Oct 15 2018 11:24:30 for MADlib by
+    <a href="http://www.doxygen.org/index.html";>
+    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
+  </ul>
+</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/madlib-site/blob/af0e5f14/docs/v1.15.1/graph_legend.md5
----------------------------------------------------------------------
diff --git a/docs/v1.15.1/graph_legend.md5 b/docs/v1.15.1/graph_legend.md5
new file mode 100644
index 0000000..a06ed05
--- /dev/null
+++ b/docs/v1.15.1/graph_legend.md5
@@ -0,0 +1 @@
+387ff8eb65306fa251338d3c9bd7bfff
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/madlib-site/blob/af0e5f14/docs/v1.15.1/graph_legend.svg
----------------------------------------------------------------------
diff --git a/docs/v1.15.1/graph_legend.svg b/docs/v1.15.1/graph_legend.svg
new file mode 100644
index 0000000..273f5fd
--- /dev/null
+++ b/docs/v1.15.1/graph_legend.svg
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
+<!-- Generated by graphviz version 2.40.1 (20161225.0304)
+ -->
+<!-- Title: Graph Legend Pages: 1 -->
+<svg width="510pt" height="154pt"
+ viewBox="0.00 0.00 509.69 154.00" xmlns="http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
+<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 150)">
+<title>Graph Legend</title>
+<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-150 505.687,-150 
505.687,4 -4,4"/>
+<!-- Node9 -->
+<g id="node1" class="node">
+<title>Node9</title>
+<polygon fill="#bfbfbf" stroke="#000000" points="293.4307,-18 238.5986,-18 
238.5986,0 293.4307,0 293.4307,-18"/>
+<text text-anchor="middle" x="266.0146" y="-6" 
font-family="Helvetica,sans-Serif" font-size="10.00" 
fill="#000000">Inherited</text>
+</g>
+<!-- Node10 -->
+<g id="node2" class="node">
+<title>Node10</title>
+<g id="a_node2"><a xlink:href="$classPublicBase.html" xlink:title="PublicBase">
+<polygon fill="none" stroke="#000000" points="66.044,-82 -.0147,-82 -.0147,-64 
66.044,-64 66.044,-82"/>
+<text text-anchor="middle" x="33.0146" y="-70" 
font-family="Helvetica,sans-Serif" font-size="10.00" 
fill="#000000">PublicBase</text>
+</a>
+</g>
+</g>
+<!-- Node10&#45;&gt;Node9 -->
+<g id="edge1" class="edge">
+<title>Node10&#45;&gt;Node9</title>
+<path fill="none" stroke="#191970" d="M75.5674,-61.3117C122.9375,-48.3002 
198.1126,-27.6512 238.3859,-16.589"/>
+<polygon fill="#191970" stroke="#191970" points="74.6195,-57.9424 
65.9037,-63.9661 76.4736,-64.6923 74.6195,-57.9424"/>
+</g>
+<!-- Node11 -->
+<g id="node3" class="node">
+<title>Node11</title>
+<g id="a_node3"><a xlink:href="$classTruncated.html" xlink:title="Truncated">
+<polygon fill="none" stroke="#ff0000" points="63.1738,-146 2.8555,-146 
2.8555,-128 63.1738,-128 63.1738,-146"/>
+<text text-anchor="middle" x="33.0146" y="-134" 
font-family="Helvetica,sans-Serif" font-size="10.00" 
fill="#000000">Truncated</text>
+</a>
+</g>
+</g>
+<!-- Node11&#45;&gt;Node10 -->
+<g id="edge2" class="edge">
+<title>Node11&#45;&gt;Node10</title>
+<path fill="none" stroke="#191970" d="M33.0146,-117.6352C33.0146,-105.8602 
33.0146,-91.366 33.0146,-82.1526"/>
+<polygon fill="#191970" stroke="#191970" points="29.5147,-117.8303 
33.0146,-127.8304 36.5147,-117.8304 29.5147,-117.8303"/>
+</g>
+<!-- Node13 -->
+<g id="node4" class="node">
+<title>Node13</title>
+<g id="a_node4"><a xlink:href="$classProtectedBase.html" 
xlink:title="ProtectedBase">
+<polygon fill="none" stroke="#000000" points="165.6113,-82 84.4179,-82 
84.4179,-64 165.6113,-64 165.6113,-82"/>
+<text text-anchor="middle" x="125.0146" y="-70" 
font-family="Helvetica,sans-Serif" font-size="10.00" 
fill="#000000">ProtectedBase</text>
+</a>
+</g>
+</g>
+<!-- Node13&#45;&gt;Node9 -->
+<g id="edge3" class="edge">
+<title>Node13&#45;&gt;Node9</title>
+<path fill="none" stroke="#006400" d="M154.3674,-59.6768C181.724,-47.2596 
221.7977,-29.0701 245.7565,-18.1952"/>
+<polygon fill="#006400" stroke="#006400" points="152.5767,-56.6458 
144.9175,-63.9661 155.47,-63.0199 152.5767,-56.6458"/>
+</g>
+<!-- Node14 -->
+<g id="node5" class="node">
+<title>Node14</title>
+<g id="a_node5"><a xlink:href="$classPrivateBase.html" 
xlink:title="PrivateBase">
+<polygon fill="none" stroke="#000000" points="253.9307,-82 184.0986,-82 
184.0986,-64 253.9307,-64 253.9307,-82"/>
+<text text-anchor="middle" x="219.0146" y="-70" 
font-family="Helvetica,sans-Serif" font-size="10.00" 
fill="#000000">PrivateBase</text>
+</a>
+</g>
+</g>
+<!-- Node14&#45;&gt;Node9 -->
+<g id="edge4" class="edge">
+<title>Node14&#45;&gt;Node9</title>
+<path fill="none" stroke="#8b1a1a" d="M231.9152,-55.4334C240.7753,-43.3685 
252.1784,-27.8409 259.2932,-18.1526"/>
+<polygon fill="#8b1a1a" stroke="#8b1a1a" points="228.8467,-53.6986 
225.7486,-63.8304 234.4888,-57.842 228.8467,-53.6986"/>
+</g>
+<!-- Node15 -->
+<g id="node6" class="node">
+<title>Node15</title>
+<polygon fill="none" stroke="#bfbfbf" points="355.8371,-82 272.1922,-82 
272.1922,-64 355.8371,-64 355.8371,-82"/>
+<text text-anchor="middle" x="314.0146" y="-70" 
font-family="Helvetica,sans-Serif" font-size="10.00" 
fill="#000000">Undocumented</text>
+</g>
+<!-- Node15&#45;&gt;Node9 -->
+<g id="edge5" class="edge">
+<title>Node15&#45;&gt;Node9</title>
+<path fill="none" stroke="#191970" d="M301.105,-55.7872C292.0198,-43.6735 
280.2166,-27.9359 272.8791,-18.1526"/>
+<polygon fill="#191970" stroke="#191970" points="298.3374,-57.9304 
307.1374,-63.8304 303.9374,-53.7303 298.3374,-57.9304"/>
+</g>
+<!-- Node16 -->
+<g id="node7" class="node">
+<title>Node16</title>
+<g id="a_node7"><a xlink:href="$classTempl.html" xlink:title="Templ&lt; int 
&gt;">
+<polygon fill="none" stroke="#000000" points="444.4889,-82 373.5404,-82 
373.5404,-64 444.4889,-64 444.4889,-82"/>
+<text text-anchor="middle" x="409.0146" y="-70" 
font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">Templ&lt; 
int &gt;</text>
+</a>
+</g>
+</g>
+<!-- Node16&#45;&gt;Node9 -->
+<g id="edge6" class="edge">
+<title>Node16&#45;&gt;Node9</title>
+<path fill="none" stroke="#191970" d="M379.6098,-59.8398C351.8577,-47.4193 
310.9654,-29.1178 286.5601,-18.1952"/>
+<polygon fill="#191970" stroke="#191970" points="378.2722,-63.0756 
388.8295,-63.9661 381.1318,-56.6863 378.2722,-63.0756"/>
+</g>
+<!-- Node17 -->
+<g id="node8" class="node">
+<title>Node17</title>
+<g id="a_node8"><a xlink:href="$classTempl.html" xlink:title="Templ&lt; T 
&gt;">
+<polygon fill="none" stroke="#000000" points="441.6835,-146 376.3458,-146 
376.3458,-128 441.6835,-128 441.6835,-146"/>
+<text text-anchor="middle" x="409.0146" y="-134" 
font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">Templ&lt; T 
&gt;</text>
+</a>
+</g>
+</g>
+<!-- Node17&#45;&gt;Node16 -->
+<g id="edge7" class="edge">
+<title>Node17&#45;&gt;Node16</title>
+<path fill="none" stroke="#ffa500" stroke-dasharray="5,2" 
d="M409.0146,-117.6352C409.0146,-105.8602 409.0146,-91.366 409.0146,-82.1526"/>
+<polygon fill="#ffa500" stroke="#ffa500" points="405.5147,-117.8303 
409.0146,-127.8304 412.5147,-117.8304 405.5147,-117.8303"/>
+<text text-anchor="middle" x="422.9136" y="-102" 
font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">&lt; int 
&gt;</text>
+</g>
+<!-- Node18 -->
+<g id="node9" class="node">
+<title>Node18</title>
+<g id="a_node9"><a xlink:href="$classUsed.html" xlink:title="Used">
+<polygon fill="none" stroke="#000000" points="501.8609,-82 462.1684,-82 
462.1684,-64 501.8609,-64 501.8609,-82"/>
+<text text-anchor="middle" x="482.0146" y="-70" 
font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">Used</text>
+</a>
+</g>
+</g>
+<!-- Node18&#45;&gt;Node9 -->
+<g id="edge8" class="edge">
+<title>Node18&#45;&gt;Node9</title>
+<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" 
d="M452.4513,-63.8612C390.0797,-45.0483 328.3535,-27.051 293.6185,-16.9796"/>
+<polygon fill="#9a32cd" stroke="#9a32cd" points="451.4734,-67.222 
462.0584,-66.764 453.4981,-60.5211 451.4734,-67.222"/>
+<text text-anchor="middle" x="421.3052" y="-38" 
font-family="Helvetica,sans-Serif" font-size="10.00" 
fill="#000000">m_usedClass</text>
+</g>
+</g>
+</svg>

http://git-wip-us.apache.org/repos/asf/madlib-site/blob/af0e5f14/docs/v1.15.1/group__grp__apsp.html
----------------------------------------------------------------------
diff --git a/docs/v1.15.1/group__grp__apsp.html 
b/docs/v1.15.1/group__grp__apsp.html
new file mode 100644
index 0000000..0a95034
--- /dev/null
+++ b/docs/v1.15.1/group__grp__apsp.html
@@ -0,0 +1,402 @@
+<!-- HTML header for doxygen 1.8.4-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";>
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.14"/>
+<meta name="keywords" content="madlib,postgres,greenplum,machine learning,data 
mining,deep learning,ensemble methods,data science,market basket 
analysis,affinity analysis,pca,lda,regression,elastic net,huber 
white,proportional hazards,k-means,latent dirichlet allocation,bayes,support 
vector machines,svm"/>
+<title>MADlib: All Pairs Shortest Path</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<script type="text/javascript">
+/* @license 
magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt 
GPL-v2 */
+  $(document).ready(initResizable);
+/* @license-end */</script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+/* @license 
magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt 
GPL-v2 */
+  $(document).ready(function() { init_search(); });
+/* @license-end */
+</script>
+<script type="text/x-mathjax-config">
+  MathJax.Hub.Config({
+    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
+    jax: ["input/TeX","output/HTML-CSS"],
+});
+</script><script type="text/javascript" async 
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js";></script>
+<!-- hack in the navigation tree -->
+<script type="text/javascript" src="eigen_navtree_hacks.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="madlib_extra.css" rel="stylesheet" type="text/css"/>
+<!-- google analytics -->
+<script>
+  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+  
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+  ga('create', 'UA-45382226-1', 'madlib.apache.org');
+  ga('send', 'pageview');
+</script>
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectlogo"><a href="http://madlib.apache.org";><img alt="Logo" 
src="madlib.png" height="50" style="padding-left:0.5em;" border="0"/ ></a></td>
+  <td style="padding-left: 0.5em;">
+   <div id="projectname">
+   <span id="projectnumber">1.15.1</span>
+   </div>
+   <div id="projectbrief">User Documentation for Apache MADlib</div>
+  </td>
+   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" 
href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" 
border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.14 -->
+<script type="text/javascript">
+/* @license 
magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt 
GPL-v2 */
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+/* @license-end */
+</script>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license 
magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt 
GPL-v2 */
+$(document).ready(function(){initNavTree('group__grp__apsp.html','');});
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+  <div class="headertitle">
+<div class="title">All Pairs Shortest Path<div class="ingroups"><a class="el" 
href="group__grp__graph.html">Graph</a></div></div>  </div>
+</div><!--header-->
+<div class="contents">
+<div class="toc"><b>Contents</b> <ul>
+<li>
+<a href="#apsp">APSP</a> </li>
+<li>
+<a href="#notes">Notes</a> </li>
+<li>
+<a href="#examples">Examples</a> </li>
+<li>
+<a href="#literature">Literature</a> </li>
+</ul>
+</div><p>The all pairs shortest paths (APSP) algorithm finds the length 
(summed weights) of the shortest paths between all pairs of vertices, such that 
the sum of the weights of the path edges is minimized.</p>
+<dl class="section warning"><dt>Warning</dt><dd>APSP is an expensive algorithm 
for run-time because it finds the shortest path between all nodes in the graph. 
It is recommended that you start with a small graph to get a sense of run-time 
for your use case, then increase size carefully from there. The worst case 
run-time for this implementation is O(V^2 * E) where V is the number of 
vertices and E is the number of edges. In practice, run-time will be generally 
be much less than this, but it depends on the graph.</dd></dl>
+<p><a class="anchor" id="apsp"></a></p><dl class="section 
user"><dt>APSP</dt><dd><pre class="syntax">
+graph_apsp( vertex_table,
+            vertex_id,
+            edge_table,
+            edge_args,
+            out_table,
+            grouping_cols
+          )
+</pre></dd></dl>
+<p><b>Arguments</b> </p><dl class="arglist">
+<dt>vertex_table </dt>
+<dd><p class="startdd">TEXT. Name of the table containing the vertex data for 
the graph. Must contain the column specified in the 'vertex_id' parameter 
below.</p>
+<p class="enddd"></p>
+</dd>
+<dt>vertex_id </dt>
+<dd><p class="startdd">TEXT, default = 'id'. Name of the column in 
'vertex_table' containing vertex ids. The vertex ids are of type INTEGER with 
no duplicates. They do not need to be contiguous.</p>
+<p class="enddd"></p>
+</dd>
+<dt>edge_table </dt>
+<dd><p class="startdd">TEXT. Name of the table containing the edge data. The 
edge table must contain columns for source vertex, destination vertex and edge 
weight. Column naming convention is described below in the 'edge_args' 
parameter.</p>
+<p class="enddd"></p>
+</dd>
+<dt>edge_args </dt>
+<dd><p class="startdd">TEXT. A comma-delimited string containing multiple 
named arguments of the form "name=value". The following parameters are 
supported for this string argument:</p><ul>
+<li>src (INTEGER): Name of the column containing the source vertex ids in the 
edge table. Default column name is 'src'.</li>
+<li>dest (INTEGER): Name of the column containing the destination vertex ids 
in the edge table. Default column name is 'dest'.</li>
+<li>weight (FLOAT8): Name of the column containing the edge weights in the 
edge table. Default column name is 'weight'.</li>
+</ul>
+<p class="enddd"></p>
+</dd>
+<dt>out_table </dt>
+<dd><p class="startdd">TEXT. Name of the table to store the result of APSP. It 
contains a row for every vertex of every group and have the following columns 
(in addition to the grouping columns):</p><ul>
+<li>source_vertex: The id for the source vertex. Will use the input edge 
column 'src' for column naming.</li>
+<li>dest_vertex: The id for the destination vertex. Will use the input edge 
column 'dest' for column naming.</li>
+<li>weight: The total weight of the shortest path from the source vertex to 
the destination vertex. Will use the input parameter 'weight' for column 
naming.</li>
+<li>parent: The parent of the destination vertex in the shortest path from 
source. Parent will equal dest_vertex if there are no intermediate vertices. 
Will use 'parent' for column naming.</li>
+</ul>
+<p>A summary table named &lt;out_table&gt;_summary is also created. This is an 
internal table that keeps a record of the input parameters and is used by the 
path retrieval function described below. </p>
+<p class="enddd"></p>
+</dd>
+<dt>grouping_cols (optional) </dt>
+<dd>TEXT, default = NULL. List of columns used to group the input into 
discrete subgraphs. These columns must exist in the edge table. When this value 
is null, no grouping is used and a single APSP result is generated.  </dd>
+</dl>
+<dl class="section user"><dt>Path Retrieval</dt><dd></dd></dl>
+<p>The path retrieval function returns the shortest path from the source 
vertex to a specified desination vertex.</p>
+<pre class="syntax">
+graph_apsp_get_path( apsp_table,
+                     source_vertex,
+                     dest_vertex,
+                     path_table
+                    )
+</pre><p><b>Arguments</b> </p><dl class="arglist">
+<dt>apsp_table </dt>
+<dd><p class="startdd">TEXT. Name of the table that contains the APSP 
output.</p>
+<p class="enddd"></p>
+</dd>
+<dt>source_vertex </dt>
+<dd><p class="startdd">INTEGER. The vertex that will be the source of the 
desired path.</p>
+<p class="enddd"></p>
+</dd>
+<dt>dest_vertex </dt>
+<dd><p class="startdd">INTEGER. The vertex that will be the destination of the 
desired path.</p>
+<p class="enddd"></p>
+</dd>
+<dt>path_table </dt>
+<dd><p class="startdd">TEXT. Name of the output table that contains the path. 
It contains a row for every group and has the following columns:</p><ul>
+<li>grouping_cols: The grouping columns given in the creation of the APSP 
table. If there are no grouping columns, these columns will not exist and the 
table will have a single row.</li>
+<li>path (ARRAY): The shortest path from the source vertex to the destination 
vertex. </li>
+</ul>
+<p class="enddd"></p>
+</dd>
+</dl>
+<p><a class="anchor" id="notes"></a></p><dl class="section 
user"><dt>Notes</dt><dd></dd></dl>
+<p>Graphs with negative edges are supported but graphs with negative cycles 
are not.</p>
+<p>The implementation is analogous to a matrix multiplication procedure. 
Please refer to the MADlib design document and references [1] and [2] for more 
details.</p>
+<p>Also see the Grail project [3] for more background on graph analytics 
processing in relational databases.</p>
+<p><a class="anchor" id="examples"></a></p><dl class="section 
user"><dt>Examples</dt><dd></dd></dl>
+<ol type="1">
+<li>Create vertex and edge tables to represent the graph: <pre class="syntax">
+DROP TABLE IF EXISTS vertex, edge;
+CREATE TABLE vertex(
+        id INTEGER
+        );
+CREATE TABLE edge(
+        src INTEGER,
+        dest INTEGER,
+        weight FLOAT8
+        );
+INSERT INTO vertex VALUES
+(0),
+(1),
+(2),
+(3),
+(4),
+(5),
+(6),
+(7);
+INSERT INTO edge VALUES
+(0, 1, 1.0),
+(0, 2, 1.0),
+(0, 4, 10.0),
+(1, 2, 2.0),
+(1, 3, 10.0),
+(2, 3, 1.0),
+(2, 5, 1.0),
+(2, 6, 3.0),
+(3, 0, 1.0),
+(4, 0, -2.0),
+(5, 6, 1.0),
+(6, 7, 1.0);
+</pre></li>
+<li>Calculate the shortest paths: <pre class="syntax">
+DROP TABLE IF EXISTS out, out_summary;
+SELECT madlib.graph_apsp(
+                         'vertex',      -- Vertex table
+                         NULL,          -- Vertix id column (NULL means use 
default naming)
+                         'edge',        -- Edge table
+                         NULL,          -- Edge arguments (NULL means use 
default naming)
+                         'out');        -- Output table of shortest paths
+SELECT * FROM out ORDER BY src,dest;
+</pre> <pre class="result">
+ src | dest |  weight  | parent
+-----+------+----------+--------
+   0 |    0 |        0 |      0
+   0 |    1 |        1 |      1
+   0 |    2 |        1 |      2
+   0 |    3 |        2 |      2
+   0 |    4 |       10 |      4
+   0 |    5 |        2 |      2
+   0 |    6 |        3 |      5
+   0 |    7 |        4 |      6
+   1 |    0 |        4 |      3
+   1 |    1 |        0 |      1
+   1 |    2 |        2 |      2
+   1 |    3 |        3 |      2
+   1 |    4 |       14 |      0
+   1 |    5 |        3 |      2
+   1 |    6 |        4 |      5
+   1 |    7 |        5 |      6
+(showing only 16 of 64 rows)
+</pre></li>
+<li>Get the shortest path from vertex 0 to vertex 5: <pre class="syntax">
+DROP TABLE IF EXISTS out_path;
+SELECT madlib.graph_apsp_get_path('out',0,5,'out_path');
+SELECT * FROM out_path;
+</pre> <pre class="result">
+  path
+---------
+ {0,2,5}
+</pre></li>
+<li>Now let's do a similar example except using different column names in the 
tables (i.e., not the defaults). Create the vertex and edge tables: <pre 
class="syntax">
+DROP TABLE IF EXISTS vertex_alt, edge_alt;
+CREATE TABLE vertex_alt AS SELECT id AS v_id FROM vertex;
+CREATE TABLE edge_alt AS SELECT src AS e_src, dest, weight AS e_weight FROM 
edge;
+</pre></li>
+<li>Calculate the shortest paths: <pre class="syntax">
+DROP TABLE IF EXISTS out_alt, out_alt_summary;
+SELECT madlib.graph_apsp(
+                         'vertex_alt',                  -- Vertex table
+                         'v_id',                        -- Vertex id column
+                         'edge_alt',                    -- Edge table
+                         'src=e_src, weight=e_weight',  -- Edge arguments
+                         'out_alt');                    -- Output table of 
shortest paths
+SELECT * FROM out_alt ORDER BY e_src, dest;
+</pre> <pre class="result">
+ e_src | dest | e_weight | parent
+-------+------+----------+--------
+     0 |    0 |        0 |      0
+     0 |    1 |        1 |      1
+     0 |    2 |        1 |      2
+     0 |    3 |        2 |      2
+     0 |    4 |       10 |      4
+     0 |    5 |        2 |      2
+     0 |    6 |        3 |      5
+     0 |    7 |        4 |      6
+     1 |    0 |        4 |      3
+     1 |    1 |        0 |      1
+     1 |    2 |        2 |      2
+     1 |    3 |        3 |      2
+     1 |    4 |       14 |      0
+     1 |    5 |        3 |      2
+     1 |    6 |        4 |      5
+     1 |    7 |        5 |      6
+(showing only 16 of 64 rows)
+</pre></li>
+<li>Create a graph with 2 groups and find APSP for each group: <pre 
class="syntax">
+DROP TABLE IF EXISTS edge_gr;
+CREATE TABLE edge_gr AS
+(
+  SELECT *, 0 AS grp FROM edge
+  UNION
+  SELECT *, 1 AS grp FROM edge WHERE src &lt; 6 AND dest &lt; 6
+);
+INSERT INTO edge_gr VALUES
+(4,5,-20,1);
+</pre></li>
+<li>Find APSP for all groups: <pre class="syntax">
+DROP TABLE IF EXISTS out_gr, out_gr_summary;
+SELECT madlib.graph_apsp(
+                         'vertex',      -- Vertex table
+                         NULL,          -- Vertex id column (NULL means use 
default naming)
+                         'edge_gr',     -- Edge table
+                         NULL,          -- Edge arguments (NULL means use 
default naming)
+                         'out_gr',      -- Output table of shortest paths
+                         'grp'          -- Grouping columns
+);
+SELECT * FROM out_gr WHERE src &lt; 2 ORDER BY grp,src,dest;
+</pre> <pre class="result">
+ grp | src | dest | weight | parent
+-----+-----+------+--------+--------
+   0 |   0 |    0 |      0 |      0
+   0 |   0 |    1 |      1 |      1
+   0 |   0 |    2 |      1 |      2
+   0 |   0 |    3 |      2 |      2
+   0 |   0 |    4 |     10 |      4
+   0 |   0 |    5 |      2 |      2
+   0 |   0 |    6 |      4 |      2
+   0 |   0 |    7 |      5 |      6
+   0 |   1 |    0 |      4 |      3
+   0 |   1 |    1 |      0 |      1
+   0 |   1 |    2 |      2 |      2
+   0 |   1 |    3 |      3 |      2
+   0 |   1 |    4 |     14 |      0
+   0 |   1 |    5 |      3 |      2
+   0 |   1 |    6 |      4 |      5
+   0 |   1 |    7 |      5 |      6
+   1 |   0 |    0 |      0 |      0
+   1 |   0 |    1 |      1 |      1
+   1 |   0 |    2 |      1 |      2
+   1 |   0 |    3 |      2 |      2
+   1 |   0 |    4 |     10 |      4
+   1 |   0 |    5 |    -10 |      4
+   1 |   1 |    0 |      4 |      3
+   1 |   1 |    1 |      0 |      1
+   1 |   1 |    2 |      2 |      2
+   1 |   1 |    3 |      3 |      2
+   1 |   1 |    4 |     14 |      0
+   1 |   1 |    5 |     -6 |      4
+(28 rows)
+</pre></li>
+<li>Find the path from vertex 0 to vertex 5 in every group <pre class="syntax">
+DROP TABLE IF EXISTS out_gr_path;
+SELECT madlib.graph_apsp_get_path('out_gr',0,5,'out_gr_path');
+SELECT * FROM out_gr_path ORDER BY grp;
+</pre> <pre class="result">
+ grp |  path
+-----+---------
+   0 | {0,2,5}
+   1 | {0,4,5}
+</pre></li>
+</ol>
+<p><a class="anchor" id="literature"></a></p><dl class="section 
user"><dt>Literature</dt><dd></dd></dl>
+<p>[1] <a 
href="http://www.columbia.edu/~cs2035/courses/ieor6614.S11/apsp.pdf";>http://www.columbia.edu/~cs2035/courses/ieor6614.S11/apsp.pdf</a></p>
+<p>[2] <a 
href="http://users.cecs.anu.edu.au/~Alistair.Rendell/Teaching/apac_comp3600/module4/all_pairs_shortest_paths.xhtml";>http://users.cecs.anu.edu.au/~Alistair.Rendell/Teaching/apac_comp3600/module4/all_pairs_shortest_paths.xhtml</a></p>
+<p>[3] The case against specialized graph analytics engines, J. Fan, G. Soosai 
Raj, and J. M. Patel. CIDR 2015. <a 
href="http://cidrdb.org/cidr2015/Papers/CIDR15_Paper20.pdf";>http://cidrdb.org/cidr2015/Papers/CIDR15_Paper20.pdf</a>
 </p>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">Generated on Mon Oct 15 2018 11:24:30 for MADlib by
+    <a href="http://www.doxygen.org/index.html";>
+    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
+  </ul>
+</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/madlib-site/blob/af0e5f14/docs/v1.15.1/group__grp__arima.html
----------------------------------------------------------------------
diff --git a/docs/v1.15.1/group__grp__arima.html 
b/docs/v1.15.1/group__grp__arima.html
new file mode 100644
index 0000000..8c2d2fb
--- /dev/null
+++ b/docs/v1.15.1/group__grp__arima.html
@@ -0,0 +1,427 @@
+<!-- HTML header for doxygen 1.8.4-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";>
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.14"/>
+<meta name="keywords" content="madlib,postgres,greenplum,machine learning,data 
mining,deep learning,ensemble methods,data science,market basket 
analysis,affinity analysis,pca,lda,regression,elastic net,huber 
white,proportional hazards,k-means,latent dirichlet allocation,bayes,support 
vector machines,svm"/>
+<title>MADlib: ARIMA</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<script type="text/javascript">
+/* @license 
magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt 
GPL-v2 */
+  $(document).ready(initResizable);
+/* @license-end */</script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+/* @license 
magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt 
GPL-v2 */
+  $(document).ready(function() { init_search(); });
+/* @license-end */
+</script>
+<script type="text/x-mathjax-config">
+  MathJax.Hub.Config({
+    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
+    jax: ["input/TeX","output/HTML-CSS"],
+});
+</script><script type="text/javascript" async 
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js";></script>
+<!-- hack in the navigation tree -->
+<script type="text/javascript" src="eigen_navtree_hacks.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="madlib_extra.css" rel="stylesheet" type="text/css"/>
+<!-- google analytics -->
+<script>
+  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+  
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+  ga('create', 'UA-45382226-1', 'madlib.apache.org');
+  ga('send', 'pageview');
+</script>
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectlogo"><a href="http://madlib.apache.org";><img alt="Logo" 
src="madlib.png" height="50" style="padding-left:0.5em;" border="0"/ ></a></td>
+  <td style="padding-left: 0.5em;">
+   <div id="projectname">
+   <span id="projectnumber">1.15.1</span>
+   </div>
+   <div id="projectbrief">User Documentation for Apache MADlib</div>
+  </td>
+   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" 
href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" 
border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.14 -->
+<script type="text/javascript">
+/* @license 
magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt 
GPL-v2 */
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+/* @license-end */
+</script>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license 
magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt 
GPL-v2 */
+$(document).ready(function(){initNavTree('group__grp__arima.html','');});
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+  <div class="headertitle">
+<div class="title">ARIMA<div class="ingroups"><a class="el" 
href="group__grp__tsa.html">Time Series Analysis</a></div></div>  </div>
+</div><!--header-->
+<div class="contents">
+<div class="toc"><b>Contents</b> <ul>
+<li class="level1">
+<a href="#train">Training Function</a> </li>
+<li class="level1">
+<a href="#forecast">Forecasting Function</a> </li>
+<li class="level1">
+<a href="#examples">Examples</a> </li>
+<li class="level1">
+<a href="#background">Technical Background</a> </li>
+<li class="level1">
+<a href="#literature">Literature</a> </li>
+<li class="level1">
+<a href="#related">Related Topics</a> </li>
+</ul>
+</div><p>Given a time series of data X, the Autoregressive Integrated Moving 
Average (ARIMA) model is a tool for understanding and, perhaps, predicting 
future values in the series. The model consists of three parts, an 
autoregressive (AR) part, a moving average (MA) part, and an integrated (I) 
part where an initial differencing step can be applied to remove any 
non-stationarity in the signal. The model is generally referred to as an 
ARIMA(p, d, q) model where parameters p, d, and q are non-negative integers 
that refer to the order of the autoregressive, integrated, and moving average 
parts of the model respectively.</p>
+<p><a class="anchor" id="train"></a></p><dl class="section user"><dt>Training 
Function</dt><dd></dd></dl>
+<p>The ARIMA training function has the following syntax. </p><pre 
class="syntax">
+arima_train( input_table,
+       output_table,
+       timestamp_column,
+       timeseries_column,
+       grouping_columns,
+       include_mean,
+       non_seasonal_orders,
+       optimizer_params
+     )
+</pre><p><b>Arguments</b> </p><dl class="arglist">
+<dt>input_table </dt>
+<dd><p class="startdd">TEXT. The name of the table containing time series 
data.</p>
+<p class="enddd"></p>
+</dd>
+<dt>output_table </dt>
+<dd><p class="startdd">TEXT. The name of the table to store the ARIMA model. 
Three tables are created, with names based on the value of the 
<em>output_table</em> argument in the training function:</p>
+<ol type="1">
+<li><em>output_table</em>: Table containing the ARIMA model. Contains the 
following columns: <table class="output">
+<tr>
+<th>mean </th><td>Model mean (only if 'include_mean' is TRUE)  </td></tr>
+<tr>
+<th>mean_std_error </th><td>Standard errors for mean  </td></tr>
+<tr>
+<th>ar_params </th><td>Auto-regressions parameters of the ARIMA model  
</td></tr>
+<tr>
+<th>ar_std_errors </th><td>Standard errors for AR parameters  </td></tr>
+<tr>
+<th>ma_params </th><td>Moving average parameters of the ARIMA model  </td></tr>
+<tr>
+<th>ma_std_errors </th><td>Standard errors for MA parameters  </td></tr>
+</table>
+</li>
+<li><em>output_table</em>_summary: Table containing descriptive statistics of 
the ARIMA model. Contains the following columns: <table class="output">
+<tr>
+<th>input_table </th><td>Table name with the source data  </td></tr>
+<tr>
+<th>timestamp_col </th><td>Column name in the source table that contains the 
timestamp index to data  </td></tr>
+<tr>
+<th>timeseries_col </th><td>Column name in the source table that contains the 
data values  </td></tr>
+<tr>
+<th>non_seasonal_orders </th><td>Orders of the non-seasonal ARIMA model  
</td></tr>
+<tr>
+<th>include_mean </th><td>TRUE if intercept was included in ARIMA model  
</td></tr>
+<tr>
+<th>residual_variance </th><td>Variance of the residuals  </td></tr>
+<tr>
+<th>log_likelihood </th><td>Log likelihood value (when using MLE)  </td></tr>
+<tr>
+<th>iter_num </th><td>The number of iterations executed  </td></tr>
+<tr>
+<th>exec_time </th><td>Total time taken to train the model  </td></tr>
+</table>
+</li>
+<li><em>output_table</em>_residual: Table containing the residuals for each 
data point in 'input_table'. Contains the following columns: <table 
class="output">
+<tr>
+<th>timestamp_col </th><td>Same as the 'timestamp_col' parameter (all indices 
from source table included except the first <em>d</em> elements, where 
<em>d</em> is the differencing order value from 'non_seasonal_orders')   
</td></tr>
+<tr>
+<th>residual </th><td>Residual value for each data point  </td></tr>
+</table>
+</li>
+</ol>
+<p></p>
+<p class="enddd"></p>
+</dd>
+<dt>timestamp_column </dt>
+<dd><p class="startdd">TEXT. The name of the column containing the timestamp 
(index) data. This could be a serial index (INTEGER) or date/time value 
(TIMESTAMP).</p>
+<p class="enddd"></p>
+</dd>
+<dt>timeseries_column </dt>
+<dd><p class="startdd">TEXT. The name of the column containing the time series 
data. This data is currently restricted to DOUBLE PRECISION.</p>
+<p class="enddd"></p>
+</dd>
+<dt>grouping_columns (optional) </dt>
+<dd><p class="startdd">TEXT, default: NULL. <em>Not currently implemented. Any 
non-NULL value is ignored.</em></p>
+<p>A comma-separated list of column names used to group the input dataset into 
discrete groups, training one ARIMA model per group. It is similar to the SQL 
<code>GROUP BY</code> clause. When this value is null, no grouping is used and 
a single result model is generated.</p>
+<p class="enddd"></p>
+</dd>
+<dt>include_mean (optional) </dt>
+<dd><p class="startdd">BOOLEAN, default: FALSE. Mean value of the data series 
is added in the ARIMA model if this variable is True. </p>
+<p class="enddd"></p>
+</dd>
+<dt>non_seasonal_orders (optional) </dt>
+<dd><p class="startdd">INTEGER[], default: 'ARRAY[1,1,1]'. Orders of the ARIMA 
model. The orders are [p, d, q], where parameters p, d, and q are non-negative 
integers that refer to the order of the autoregressive, integrated, and moving 
average parts of the model respectively. </p>
+<p class="enddd"></p>
+</dd>
+<dt>optimizer_params (optional) </dt>
+<dd>TEXT. Comma-separated list of optimizer-specific parameters of the form 
‘name=value'. The order of the parameters does not matter. The following 
parameters are recognized:<ul>
+<li><b>max_iter:</b> Maximum number of iterations to run learning algorithm 
(Default = 100)</li>
+<li><b>tau:</b> Computes the initial step size for gradient algorithm (Default 
= 0.001)</li>
+<li><b>e1:</b> Algorithm-specific threshold for convergence (Default = 
1e-15)</li>
+<li><b>e2:</b> Algorithm-specific threshold for convergence (Default = 
1e-15)</li>
+<li><b>e3:</b> Algorithm-specific threshold for convergence (Default = 
1e-15)</li>
+<li><b>hessian_delta:</b> Delta parameter to compute a numerical approximation 
of the Hessian matrix (Default = 1e-6)  </li>
+</ul>
+</dd>
+</dl>
+<p><a class="anchor" id="forecast"></a></p><dl class="section 
user"><dt>Forecasting Function</dt><dd></dd></dl>
+<p>The ARIMA forecast function has the following syntax. </p><pre 
class="syntax">
+arima_forecast( model_table,
+                output_table,
+                steps_ahead
+              )
+</pre><p> <b>Arguments</b> </p><dl class="arglist">
+<dt>model_table </dt>
+<dd><p class="startdd">TEXT. The name of the table containing the ARIMA model 
trained on the time series dataset.</p>
+<p class="enddd"></p>
+</dd>
+<dt>output_table </dt>
+<dd><p class="startdd">TEXT. The name of the table to store the forecasted 
values. The output table produced by the forecast function contains the 
following columns. </p><table class="output">
+<tr>
+<th>group_by_cols </th><td>Grouping column values (if grouping parameter is 
provided)  </td></tr>
+<tr>
+<th>step_ahead </th><td>Time step for the forecast  </td></tr>
+<tr>
+<th>forecast_value </th><td>Forecast of the current time step  </td></tr>
+</table>
+<p class="enddd"></p>
+</dd>
+<dt>steps_ahead </dt>
+<dd>INTEGER. The number of steps to forecast at the end of the time series. 
</dd>
+</dl>
+<p><a class="anchor" id="examples"></a></p><dl class="section 
user"><dt>Examples</dt><dd><ol type="1">
+<li>View online help for the ARIMA training function. <pre class="example">
+SELECT madlib.arima_train();
+</pre></li>
+<li>Create an input data set. <pre class="example">
+DROP TABLE IF EXISTS arima_beer;
+CREATE TABLE arima_beer (time_id integer NOT NULL, value double precision NOT 
NULL );
+COPY arima_beer (time_id, value) FROM stdin WITH DELIMITER '|';
+1  | 93.2
+2  | 96.0
+3  | 95.2
+4  | 77.0
+5  | 70.9
+6  | 64.7
+7  | 70.0
+8  | 77.2
+9  | 79.5
+10 | 100.5
+11 | 100.7
+12 | 107.0
+13 | 95.9
+14 | 82.7
+15 | 83.2
+16 | 80.0
+17 | 80.4
+18 | 67.5
+19 | 75.7
+20 | 71.0
+21 | 89.2
+22 | 101.0
+23 | 105.2
+24 | 114.0
+25 | 96.2
+26 | 84.4
+27 | 91.2
+28 | 81.9
+29 | 80.5
+30 | 70.4
+31 | 74.7
+32 | 75.9
+33 | 86.2
+34 | 98.7
+35 | 100.9
+36 | 113.7
+37 | 89.7
+38 | 84.4
+39 | 87.2
+40 | 85.5
+\.
+</pre></li>
+<li>Train an ARIMA model. <pre class="example">
+-- Train ARIMA model with 'grouping_columns'=NULL, 'include_mean'=TRUE,
+--   and 'non_seasonal_orders'=[1,1,1]
+SELECT madlib.arima_train( 'arima_beer',
+                           'arima_beer_output',
+                           'time_id',
+                           'value',
+                           NULL,
+                           FALSE,
+                           ARRAY[1, 1, 1]
+                         );
+</pre></li>
+<li>Examine the ARIMA model. <pre class="example">
+\x ON
+SELECT * FROM arima_beer_output;
+</pre> Result: <pre class="result">
+-[ RECORD 1 ]-+------------------
+ar_params     | {0.221954769696}
+ar_std_errors | {0.575367782602}
+ma_params     | {-0.140623564576}
+ma_std_errors | {0.533445214346}
+</pre></li>
+<li>View the summary statistics table. <pre class="example">
+SELECT * FROM arima_beer_output_summary;
+</pre> Result: <pre class="result">
+-[ RECORD 1 ]-------+---------------
+input_table         | arima_beer
+timestamp_col       | time_id
+timeseries_col      | value
+non_seasonal_orders | {1,1,1}
+include_mean        | f
+residual_variance   | 100.989970539
+log_likelihood      | -145.331516396
+iter_num            | 28
+exec_time (s)       | 2.75
+</pre></li>
+<li>View the residuals. <pre class="example">
+\x OFF
+SELECT * FROM arima_beer_output_residual;
+</pre> Result: <pre class="result">
+ time_id |      residual
+---------+--------------------
+       2 |                  0
+       4 |   -18.222328834394
+       6 |  -5.49616627282665
+...
+      35 |   1.06298837051437
+      37 |  -25.0886854003757
+      39 |   3.48401666299571
+(40 rows)
+</pre></li>
+<li>Use the ARIMA forecast function to forecast 10 future values. <pre 
class="example">
+SELECT madlib.arima_forecast( 'arima_beer_output',
+                              'arima_beer_forecast_output',
+                              10
+                            );
+SELECT * FROM arima_beer_forecast_output;
+</pre> Result: <pre class="result">
+ steps_ahead | forecast_value
+-------------+----------------
+           1 |  85.3802343659
+           3 |  85.3477516875
+           5 |  85.3461514635
+           7 |  85.3460726302
+           9 |  85.3460687465
+           2 |  85.3536518121
+           4 |  85.3464421267
+           6 |  85.3460869494
+           8 |  85.3460694519
+          10 |    85.34606859
+(10 rows)
+</pre></li>
+</ol>
+</dd></dl>
+<p><a class="anchor" id="background"></a></p><dl class="section 
user"><dt>Technical Background</dt><dd>An ARIMA model is an 
<em>a</em>uto-<em>r</em>egressive <em>i</em>ntegrated <em>m</em>oving 
<em>a</em>verage model. An ARIMA model is typically expressed in the form <p 
class="formulaDsp">
+\[ (1 - \phi(B)) Y_t = (1 + \theta(B)) Z_t, \]
+</p>
+</dd></dl>
+<p>where \(B\) is the backshift operator. The time \( t \) is from \( 1 \) to 
\( N \).</p>
+<p>ARIMA models involve the following variables:</p><ul>
+<li>The values of the time series: \( X_t \).</li>
+<li>Parameters of the model: \( p \), \( q \), and \( d \); \( d \) is the 
differencing order, \( p \) is the order of the AR operator, and \( q \) is the 
order of the MA operator.</li>
+<li>The AR operator: \( \phi(B) \).</li>
+<li>The MA operator: \( \theta(B) \).</li>
+<li>The lag difference: \( Y_{t} \), where \( Y_{t} = (1-B)^{d}(X_{t} - \mu) 
\).</li>
+<li>The mean value: \( \mu \), which is set to be zero for \( d&gt;0 \) and 
estimated from the data when d=0.</li>
+<li>The error terms: \( Z_t \).</li>
+</ul>
+<p>The auto regression operator models the prediction for the next observation 
as some linear combination of the previous observations. More formally, an AR 
operator of order \( p \) is defined as</p>
+<p class="formulaDsp">
+\[ \phi(B) Y_t= \phi_1 Y_{t-1} + \dots + \phi_{p} Y_{t-p} \]
+</p>
+<p>The moving average operator is similar, and it models the prediction for 
the next observation as a linear combination of the errors in the previous 
prediction errors. More formally, the MA operator of order \( q \) is defined 
as</p>
+<p class="formulaDsp">
+\[ \theta(B) Z_t = \theta_{1} Z_{t-1} + \dots + \theta_{q} Z_{t-q}. \]
+</p>
+<p>We estimate the parameters using the Levenberg-Marquardt Algorithm. In 
mathematics and computing, the Levenberg-Marquardt algorithm (LMA), also known 
as the damped least-squares (DLS) method, provides a numerical solution to the 
problem of minimizing a function, generally nonlinear, over a space of 
parameters of the function.</p>
+<p>Like other numeric minimization algorithms, LMA is an iterative procedure. 
To start a minimization, the user has to provide an initial guess for the 
parameter vector, $p$, as well as some tuning parameters \(\tau, \epsilon_1, 
\epsilon_2, \epsilon_3,\).</p>
+<p><a class="anchor" id="literature"></a></p><dl class="section 
user"><dt>Literature</dt><dd></dd></dl>
+<p>[1] Rob J Hyndman and George Athanasopoulos: Forecasting: principles and 
practice, <a href="http://otexts.com/fpp/";>http://otexts.com/fpp/</a></p>
+<p>[2] Robert H. Shumway, David S. Stoffer: Time Series Analysis and Its 
Applications With R Examples, Third edition Springer Texts in Statistics, 
2010</p>
+<p>[3] Henri Gavin: The Levenberg-Marquardt method for nonlinear least squares 
curve-fitting problems, 2011</p>
+<p><a class="anchor" id="related"></a></p><dl class="section user"><dt>Related 
Topics</dt><dd></dd></dl>
+<p>File <a class="el" href="arima_8sql__in.html" title="Arima function for 
forecasting of timeseries data. ">arima.sql_in</a> documenting the ARIMA 
functions </p>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">Generated on Mon Oct 15 2018 11:24:30 for MADlib by
+    <a href="http://www.doxygen.org/index.html";>
+    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
+  </ul>
+</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/madlib-site/blob/af0e5f14/docs/v1.15.1/group__grp__array.html
----------------------------------------------------------------------
diff --git a/docs/v1.15.1/group__grp__array.html 
b/docs/v1.15.1/group__grp__array.html
new file mode 100644
index 0000000..d3d73a2
--- /dev/null
+++ b/docs/v1.15.1/group__grp__array.html
@@ -0,0 +1,365 @@
+<!-- HTML header for doxygen 1.8.4-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";>
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.14"/>
+<meta name="keywords" content="madlib,postgres,greenplum,machine learning,data 
mining,deep learning,ensemble methods,data science,market basket 
analysis,affinity analysis,pca,lda,regression,elastic net,huber 
white,proportional hazards,k-means,latent dirichlet allocation,bayes,support 
vector machines,svm"/>
+<title>MADlib: Array Operations</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<script type="text/javascript">
+/* @license 
magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt 
GPL-v2 */
+  $(document).ready(initResizable);
+/* @license-end */</script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+/* @license 
magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt 
GPL-v2 */
+  $(document).ready(function() { init_search(); });
+/* @license-end */
+</script>
+<script type="text/x-mathjax-config">
+  MathJax.Hub.Config({
+    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
+    jax: ["input/TeX","output/HTML-CSS"],
+});
+</script><script type="text/javascript" async 
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js";></script>
+<!-- hack in the navigation tree -->
+<script type="text/javascript" src="eigen_navtree_hacks.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="madlib_extra.css" rel="stylesheet" type="text/css"/>
+<!-- google analytics -->
+<script>
+  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+  
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+  ga('create', 'UA-45382226-1', 'madlib.apache.org');
+  ga('send', 'pageview');
+</script>
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectlogo"><a href="http://madlib.apache.org";><img alt="Logo" 
src="madlib.png" height="50" style="padding-left:0.5em;" border="0"/ ></a></td>
+  <td style="padding-left: 0.5em;">
+   <div id="projectname">
+   <span id="projectnumber">1.15.1</span>
+   </div>
+   <div id="projectbrief">User Documentation for Apache MADlib</div>
+  </td>
+   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" 
href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" 
border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.14 -->
+<script type="text/javascript">
+/* @license 
magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt 
GPL-v2 */
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+/* @license-end */
+</script>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license 
magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt 
GPL-v2 */
+$(document).ready(function(){initNavTree('group__grp__array.html','');});
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+  <div class="headertitle">
+<div class="title">Array Operations<div class="ingroups"><a class="el" 
href="group__grp__datatrans.html">Data Types and Transformations</a> &raquo; <a 
class="el" href="group__grp__arraysmatrix.html">Arrays and 
Matrices</a></div></div>  </div>
+</div><!--header-->
+<div class="contents">
+<div class="toc"><b>Contents</b> <ul>
+<li>
+<a href="#notes">Implementation Notes</a> </li>
+<li>
+<a href="#list">List of Array Operations</a> </li>
+<li>
+<a href="#examples">Examples</a> </li>
+<li>
+<a href="#related">Related Topics</a> </li>
+</ul>
+</div><p>This module provides a set of basic array operations implemented in C 
and SQL. It is a support module for several machine learning algorithms that 
require fast array operations.</p>
+<p><a class="anchor" id="notes"></a></p><dl class="section 
user"><dt>Implementation Notes</dt><dd></dd></dl>
+<p>All functions (except <a class="el" 
href="array__ops_8sql__in.html#acb57ea4521dcb717f9e3148e0acccc74" title="This 
function normalizes an array as sum of squares to be 1. ">normalize()</a> and 
<a class="el" href="array__ops_8sql__in.html#acc295a568878940ffc3e2c9a75990efb" 
title="This function takes an array as the input and keep only elements that 
satisfy the operator on specifi...">array_filter()</a>) described in this 
module work with 2-D arrays.</p>
+<p>These functions support several numeric types:</p><ul>
+<li>SMALLINT</li>
+<li>INTEGER</li>
+<li>BIGINT</li>
+<li>REAL</li>
+<li>DOUBLE PRECISION (FLOAT8)</li>
+<li>NUMERIC (internally casted into FLOAT8, loss of precisions can happen)</li>
+</ul>
+<p>Additionally, <a class="el" 
href="array__ops_8sql__in.html#af057b589f2a2cb1095caa99feaeb3d70" title="This 
function takes a 2-D array as the input and unnests it by one level. It returns 
a set of 1-D arr...">array_unnest_2d_to_1d()</a> supports other data types such 
as TEXT or VARCHAR.</p>
+<p>Several of the function require NO NULL VALUES, while others omit NULLs and 
return results. See details in description of individual functions.</p>
+<p><a class="anchor" id="list"></a></p><dl class="section user"><dt>Array 
Operations</dt><dd><table class="output">
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#a91c8d3715142927b3967f05a4fbf1575" title="Adds 
two arrays. It requires that all the values are NON-NULL. Return type is the 
same as the input t...">array_add()</a></th><td><p class="starttd">Adds two 
arrays. It requires that all the values are NON-NULL. Return type is the same 
as the input type.</p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#a26e8508a2bae10a6574cec697a270eea" 
title="Aggregate, element-wise sum of arrays. It requires that all the values 
are NON-NULL. Return type is the same as the input type. ">sum()</a></th><td><p 
class="starttd">Aggregate, sums vector element-wisely. It requires that all the 
values are NON-NULL. Return type is the same as the input type.</p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#a2875a161a01c7dcdea9a4997b074eefc" 
title="Subtracts two arrays. It requires that all the values are NON-NULL. 
Return type is the same as the in...">array_sub()</a></th><td><p 
class="starttd">Subtracts two arrays. It requires that all the values are 
NON-NULL. Return type is the same as the input type. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#a652d70c480d484c4a1a92ded384b0dd7" 
title="Element-wise product of two arrays. It requires that all the values are 
NON-NULL. Return type is the ...">array_mult()</a></th><td><p 
class="starttd">Element-wise product of two arrays. It requires that all the 
values are NON-NULL. Return type is the same as the input type. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#a6cc05e7052495f8b64692faf40219576" 
title="Element-wise division of two arrays. It requires that all the values are 
NON-NULL. Return type is the same as the input type. 
">array_div()</a></th><td><p class="starttd">Element-wise division of two 
arrays. It requires that all the values are NON-NULL. Return type is the same 
as the input type. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#acde10964ed23b7c8da515fb84cb8d5e0" 
title="Dot-product of two arrays. It requires that all the values are NON-NULL. 
Return type is the same as t...">array_dot()</a></th><td><p 
class="starttd">Dot-product of two arrays. It requires that all the values are 
NON-NULL. Return type is the same as the input type. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#aedf6cb13eb4803bcc12dc4d95ea8ff4e" title="Checks 
whether one array contains the other. This function returns TRUE if each 
non-zero element in t...">array_contains()</a></th><td><p 
class="starttd">Checks whether one array contains the other. This function 
returns TRUE if each non-zero element in the right array equals to the element 
with the same index in the left array. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#ae891429cc50705c530f3e5ca15541849" title="This 
function finds the maximum value in the array. NULLs are ignored. Return type 
is the same as the...">array_max()</a></th><td><p class="starttd">This function 
finds the maximum value in the array. NULLs are ignored. Return type is the 
same as the input type. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#aa415256a9064aecc600dfb5e377fb7b1" title="This 
function finds the maximum value and corresponding index in the array. NULLs 
are ignored...">array_max_index()</a></th><td><p class="starttd">This function 
finds the maximum value and corresponding index in the array. NULLs are 
ignored. Return type is array in format [max, index], and its element type is 
the same as the input type. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#a6659bf9d9363eb179fab34f81f8ac59b" title="This 
function finds the minimum value in the array. NULLs are ignored. Return type 
is the same as the...">array_min()</a></th><td><p class="starttd">This function 
finds the minimum value in the array. NULLs are ignored. Return type is the 
same as the input type. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#a813a4d9ffc1c18b1b3e18f6ecdb2051f" title="This 
function finds the minimum value and corresponding index in the array. NULLs 
are ignored...">array_min_index()</a></th><td><p class="starttd">This function 
finds the minimum value and corresponding index in the array. NULLs are 
ignored. Return type is array in format [min, index], and its element type is 
the same as the input type. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#a4c98f20e6a737358806f63318daea5ec" title="This 
function finds the sum of the values in the array. NULLs are ignored. Return 
type is the same as...">array_sum()</a></th><td><p class="starttd">This 
function finds the sum of the values in the array. NULLs are ignored. Return 
type is the same as the input type. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#a418de59800833aa95f9b7cbd6b12901c" title="This 
function finds the sum of the values in the array. NULLs are ignored. Return 
type is always FLOA...">array_sum_big()</a></th><td><p class="starttd">This 
function finds the sum of the values in the array. NULLs are ignored. Return 
type is always FLOAT8 regardless of input. This function is meant to replace <a 
class="el" href="array__ops_8sql__in.html#a4c98f20e6a737358806f63318daea5ec" 
title="This function finds the sum of the values in the array. NULLs are 
ignored. Return type is the same as...">array_sum()</a> in cases when a sum may 
overflow the element type. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#a13c0b0c53e8b0dc4e08c21bb8152ee7d" title="This 
function finds the sum of abs of the values in the array. NULLs are ignored. 
Return type is the ...">array_abs_sum()</a></th><td><p class="starttd">This 
function finds the sum of abs of the values in the array. NULLs are ignored. 
Return type is the same as the input type. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#ac14e74c10b58f5518cd0e3e56067e5ba" title="This 
function takes an array as the input and finds absolute value of each element 
in the array...">array_abs()</a></th><td><p class="starttd">This function takes 
an array as the input and finds abs of each element in the array, returning the 
resulting array. It requires that all the values are NON-NULL. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#a407598f9eb70637798b02fd731bfca2c" title="This 
function finds the mean of the values in the array. NULLs are ignored. 
">array_mean()</a></th><td><p class="starttd">This function finds the mean of 
the values in the array. NULLs are ignored. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#a3b6c2d173a611e6d6b184d825c2b336d" title="This 
function finds the standard deviation of the values in the array. NULLs are 
ignored. ">array_stddev()</a></th><td><p class="starttd">This function finds 
the standard deviation of the values in the array. NULLs are ignored. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#ab066e65a41db78b00b4532996b2a6efc" title="This 
function creates an array of set size (the argument value) of FLOAT8, 
initializing the values to...">array_of_float()</a></th><td><p 
class="starttd">This function creates an array of set size (the argument value) 
of FLOAT8, initializing the values to 0.0. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#ab7d8550e66d2e0bd54b8f0997d93880c" title="This 
function creates an array of set size (the argument value) of BIGINT, 
initializing the values to...">array_of_bigint()</a></th><td><p 
class="starttd">This function creates an array of set size (the argument value) 
of BIGINT, initializing the values to 0. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#a065a5323f3b742be47e39ad8b4c90fc2" title="This 
functions set every values in the array to some desired value (provided as the 
argument)...">array_fill()</a></th><td><p class="starttd">This functions set 
every value in the array to some desired value (provided as the argument). </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#acc295a568878940ffc3e2c9a75990efb" title="This 
function takes an array as the input and keep only elements that satisfy the 
operator on specifi...">array_filter()</a></th><td><p class="starttd">This 
function takes an array as the input and keep only elements that satisfy the 
operator on specified scalar. It requires that the array is 1-D and all the 
values are NON-NULL. Return type is the same as the input type. By default, 
this function removes all zeros. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#ae6881cc5c86941b6ffca35d7f3cd5c12" title="This 
function takes an array as the input and executes element-wise multiplication 
by the scalar prov...">array_scalar_mult()</a></th><td><p class="starttd">This 
function takes an array as the input and executes element-wise multiplication 
by the scalar provided as the second argument, returning the resulting array. 
It requires that all the values are NON-NULL. Return type is the same as the 
input type. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#a0b6ffe59b12c3dee076c3059f9ab363f" title="This 
function takes an array as the input and executes element-wise addition by the 
scalar provided a...">array_scalar_add()</a></th><td><p class="starttd">This 
function takes an array as the input and executes element-wise addition of the 
scalar provided as the second argument, returning the resulting array. It 
requires that all the values are NON-NULL. Return type is the same as the input 
type. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#a83451ed0c3ca5a9c62751dba47e45df7" title="This 
function takes an array as the input and finds square root of each element in 
the array...">array_sqrt()</a></th><td><p class="starttd">This function takes 
an array as the input and finds square root of each element in the array, 
returning the resulting array. It requires that all the values are NON-NULL. 
</p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#a761e7ca753a5e1acf26896b37ed8b0bd" title="This 
function takes an array and a float8 as the input and finds power of each 
element in the array...">array_pow()</a></th><td><p class="starttd">This 
function takes an array and a float8 as the input and finds power of each 
element in the array, returning the resulting array. It requires that all the 
values are NON-NULL. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#aff60f4091bed6374683f047c8a70ef9a" title="This 
function takes an array as the input and finds square of each element in the 
array...">array_square()</a></th><td><p class="starttd">This function takes an 
array as the input and finds square of each element in the array, returning the 
resulting array. It requires that all the values are NON-NULL. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#acb57ea4521dcb717f9e3148e0acccc74" title="This 
function normalizes an array as sum of squares to be 1. 
">normalize()</a></th><td><p class="starttd">This function normalizes an array 
as sum of squares to be 1. It requires that the array is 1-D and all the values 
are NON-NULL. </p>
+<p class="endtd"></p>
+</td></tr>
+<tr>
+<th><a class="el" 
href="array__ops_8sql__in.html#af057b589f2a2cb1095caa99feaeb3d70" title="This 
function takes a 2-D array as the input and unnests it by one level. It returns 
a set of 1-D arr...">array_unnest_2d_to_1d()</a></th><td><p 
class="starttd">This function takes a 2-D array as the input and unnests it by 
one level. It returns a set of 1-D arrays that correspond to rows of the input 
array as well as an ID column with values corresponding to row positions 
occupied by those 1-D arrays within the 2-D array. </p>
+<p class="endtd"></p>
+</td></tr>
+</table>
+</dd></dl>
+<p><a class="anchor" id="examples"></a></p><dl class="section 
user"><dt>Examples</dt><dd></dd></dl>
+<ol type="1">
+<li>Create a database table with two integer array columns and add some data. 
<pre class="example">
+CREATE TABLE array_tbl ( id integer,
+                         array1 integer[],
+                         array2 integer[]
+                       );
+INSERT INTO array_tbl VALUES
+                       ( 1, '{1,2,3,4,5,6,7,8,9}', '{9,8,7,6,5,4,3,2,1}' ),
+                       ( 2, '{1,1,0,1,1,2,3,99,8}','{0,0,0,-5,4,1,1,7,6}' );
+</pre></li>
+<li>Find the minimum, maximum, mean, and standard deviation of the 
<code>array1</code> column. <pre class="example">
+SELECT id, madlib.array_min(array1), madlib.array_max(array1),
+           madlib.array_min_index(array1), madlib.array_max_index(array1),
+           madlib.array_mean(array1), madlib.array_stddev(array1)
+FROM array_tbl;
+</pre> Result: <pre class="result">
+id | array_min | array_max | array_min_index | array_max_index |    array_mean 
   |   array_stddev
+----+-----------+-----------+---------------+---------------+------------------+------------------
+  1 |         1 |         9 | {1,1}         | {9,9}         |                5 
| 2.73861278752583
+  2 |         0 |        99 | {0,3}         | {99,8}        | 12.8888888888889 
| 32.3784050118457(2 rows)
+</pre></li>
+<li>Perform array addition and subtraction. <pre class="example">
+SELECT id, madlib.array_add(array1,array2),
+          madlib.array_sub(array1,array2)
+FROM array_tbl;
+</pre> Result: <pre class="result">
+ id |          array_add           |        array_sub
+&#160;---+------------------------------+-------------------------
+  2 | {1,1,0,-4,5,3,4,106,14}      | {1,1,0,6,-3,1,2,92,2}
+  1 | {10,10,10,10,10,10,10,10,10} | {-8,-6,-4,-2,0,2,4,6,8}
+(2 rows)
+</pre></li>
+<li>Perform element-wise array multiplication and division. The row with 
<code>id=2</code> is excluded because the divisor array contains zero, which 
would cause a divide-by-zero error. <pre class="example">
+SELECT id, madlib.array_mult(array1,array2),
+           madlib.array_div(array1,array2)
+FROM array_tbl
+WHERE 0 != ALL(array2);</pre> Result: <pre class="result">
+ id |         array_mult         |      array_div
+&#160;---+----------------------------+---------------------
+  1 | {9,16,21,24,25,24,21,16,9} | {0,0,0,0,1,1,2,4,9}
+(1 row)
+</pre></li>
+<li>Calculate the dot product of the arrays. <pre class="example">
+SELECT id, madlib.array_dot(array1, array2)
+FROM array_tbl;
+</pre> Result: <pre class="result">
+ id | array_dot
+&#160;---+----------
+  2 |       745
+  1 |       165
+(2 rows)
+</pre></li>
+<li>Multiply an array by a scalar 3. <pre class="example">
+SELECT id, madlib.array_scalar_mult(array1,3)
+FROM array_tbl;
+</pre> Result: <pre class="result">
+ id |     array_scalar_mult
+&#160;---+--------------------------
+  1 | {3,6,9,12,15,18,21,24,27}
+  2 | {3,3,0,3,3,6,9,297,24}
+(2 rows)
+</pre></li>
+<li>Construct a nine-element array with each element set to the value 1.3. 
<pre class="example">
+SELECT madlib.array_fill(madlib.array_of_float(9), 1.3::float);
+</pre> Result: <pre class="result">
+              array_fill
+&#160;--------------------------------------
+ {1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3}
+(1 row)
+</pre></li>
+<li>Unnest a column of 2-D arrays into sets of 1-D arrays. <pre 
class="example">
+SELECT id, (madlib.array_unnest_2d_to_1d(val)).*
+FROM (
+  SELECT 1::INT AS id, ARRAY[[1.3,2.0,3.2],[10.3,20.0,32.2]]::FLOAT8[][] AS val
+  UNION ALL
+  SELECT 2, ARRAY[[pi(),pi()/2],[2*pi(),pi()],[pi()/4,4*pi()]]::FLOAT8[][]
+) t
+ORDER BY 1,2;
+</pre> Result: <pre class="result">
+ id | unnest_row_id |            unnest_result
+----+---------------+--------------------------------------
+  1 |             1 | {1.3,2,3.2}
+  1 |             2 | {10.3,20,32.2}
+  2 |             1 | {3.14159265358979,1.5707963267949}
+  2 |             2 | {6.28318530717959,3.14159265358979}
+  2 |             3 | {0.785398163397448,12.5663706143592}
+(5 rows)
+</pre> If the function is called without the .* notation then it will return a 
composite record type with two attributes: the row ID and corresponding 
unnested array result.</li>
+</ol>
+<p><a class="anchor" id="related"></a></p><dl class="section user"><dt>Related 
Topics</dt><dd></dd></dl>
+<p>File <a class="el" href="array__ops_8sql__in.html" title="implementation of 
array operations in SQL ">array_ops.sql_in</a> for list of functions and usage. 
</p>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">Generated on Mon Oct 15 2018 11:24:30 for MADlib by
+    <a href="http://www.doxygen.org/index.html";>
+    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
+  </ul>
+</div>
+</body>
+</html>

Reply via email to