161 lines
62 KiB
HTML
161 lines
62 KiB
HTML
<!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.11"/>
|
|
<title>mlpack: src/mlpack/methods/hoeffding_trees/hoeffding_tree.hpp Source File</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="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">
|
|
$(document).ready(function() { init_search(); });
|
|
</script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="extra-stylesheet.css" rel="stylesheet" type="text/css"/>
|
|
</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="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">mlpack
|
|
 <span id="projectnumber">master</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.11 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
|
<li>
|
|
<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>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>File Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<!-- 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 id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_44a936ef30fc126706c6284a2fc0c990.html">mlpack</a></li><li class="navelem"><a class="el" href="dir_3cfbf900288ec2fe8dd2c2c8482f216e.html">methods</a></li><li class="navelem"><a class="el" href="dir_9728dd99c5f8edcf7fb9ef7255873dbb.html">hoeffding_trees</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">hoeffding_tree.hpp</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="hoeffding__tree_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> </div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#ifndef MLPACK_METHODS_HOEFFDING_TREES_HOEFFDING_TREE_HPP</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#define MLPACK_METHODS_HOEFFDING_TREES_HOEFFDING_TREE_HPP</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> </div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include <<a class="code" href="prereqs_8hpp.html">mlpack/prereqs.hpp</a>></span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include <<a class="code" href="dataset__mapper_8hpp.html">mlpack/core/data/dataset_mapper.hpp</a>></span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include "<a class="code" href="gini__impurity_8hpp.html">gini_impurity.hpp</a>"</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include "<a class="code" href="hoeffding__numeric__split_8hpp.html">hoeffding_numeric_split.hpp</a>"</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include "<a class="code" href="hoeffding__categorical__split_8hpp.html">hoeffding_categorical_split.hpp</a>"</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="keyword">namespace </span><a class="code" href="namespacemlpack.html">mlpack</a> {</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="keyword">namespace </span>tree {</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="keyword">template</span><<span class="keyword">typename</span> FitnessFunction = GiniImpurity,</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="keyword">template</span><<span class="keyword">typename</span>> <span class="keyword">class </span>NumericSplitType =</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <a class="code" href="namespacemlpack_1_1tree.html#a20fda6c6aece9c58c011ffea7e123378">HoeffdingDoubleNumericSplit</a>,</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keyword">template</span><<span class="keyword">typename</span>> <span class="keyword">class </span>CategoricalSplitType =</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  HoeffdingCategoricalSplit</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> ></div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html"> 61</a></span> <span class="keyword">class </span><a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html">HoeffdingTree</a></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> {</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keyword">public</span>:</div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a0eff97cb145bfc41d3a1dc4efd682e45"> 65</a></span>  <span class="keyword">typedef</span> NumericSplitType<FitnessFunction> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a0eff97cb145bfc41d3a1dc4efd682e45">NumericSplit</a>;</div><div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a8d2bce15dacf23fc6f513e1fcd66a786"> 67</a></span>  <span class="keyword">typedef</span> CategoricalSplitType<FitnessFunction> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a8d2bce15dacf23fc6f513e1fcd66a786">CategoricalSplit</a>;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> </div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keyword">template</span><<span class="keyword">typename</span> MatType></div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ad07c2c792ceaace94b5125de78c353a5">HoeffdingTree</a>(<span class="keyword">const</span> MatType& data,</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keyword">const</span> <a class="code" href="classmlpack_1_1data_1_1DatasetMapper.html">data::DatasetInfo</a>& <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a3b2adfbce59218d401a955fe11926ee7">datasetInfo</a>,</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keyword">const</span> arma::Row<size_t>& labels,</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4f53c35d0d231b21d743768e79c40e7c">numClasses</a>,</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keyword">const</span> <span class="keywordtype">bool</span> batchTraining = <span class="keyword">true</span>,</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4504ac6c73113e466ec26746e7db6af2">successProbability</a> = 0.95,</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4b14b0df4fc515d8d92f058370ab6ba9">maxSamples</a> = 0,</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ae989373eed16a13a99f7dabb521edb6a">checkInterval</a> = 100,</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ab2d14a1b3688ffeb4a14f32505be3567">minSamples</a> = 100,</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keyword">const</span> CategoricalSplitType<FitnessFunction>& categoricalSplitIn</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  = CategoricalSplitType<FitnessFunction>(0, 0),</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keyword">const</span> NumericSplitType<FitnessFunction>& numericSplitIn =</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  NumericSplitType<FitnessFunction>(0));</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span> </div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ad07c2c792ceaace94b5125de78c353a5">HoeffdingTree</a>(<span class="keyword">const</span> <a class="code" href="classmlpack_1_1data_1_1DatasetMapper.html">data::DatasetInfo</a>& datasetInfo,</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keyword">const</span> <span class="keywordtype">size_t</span> numClasses,</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4504ac6c73113e466ec26746e7db6af2">successProbability</a> = 0.95,</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4b14b0df4fc515d8d92f058370ab6ba9">maxSamples</a> = 0,</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ae989373eed16a13a99f7dabb521edb6a">checkInterval</a> = 100,</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ab2d14a1b3688ffeb4a14f32505be3567">minSamples</a> = 100,</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keyword">const</span> CategoricalSplitType<FitnessFunction>& categoricalSplitIn</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  = CategoricalSplitType<FitnessFunction>(0, 0),</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keyword">const</span> NumericSplitType<FitnessFunction>& numericSplitIn =</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  NumericSplitType<FitnessFunction>(0),</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  std::unordered_map<<span class="keywordtype">size_t</span>, std::pair<size_t, size_t>>*</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a5ee68a0a876a9a8bb9e4633541b710f4">dimensionMappings</a> = NULL);</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span> </div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ad07c2c792ceaace94b5125de78c353a5">HoeffdingTree</a>(<span class="keyword">const</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html">HoeffdingTree</a>& other);</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span> </div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#aa172871b4874bb500eaff55f2e7a9be9">~HoeffdingTree</a>();</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span> </div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="keyword">template</span><<span class="keyword">typename</span> MatType></div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keywordtype">void</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a54cf439ed323eac7dc3f17c876c768e7">Train</a>(<span class="keyword">const</span> MatType& data,</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  <span class="keyword">const</span> arma::Row<size_t>& labels,</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <span class="keyword">const</span> <span class="keywordtype">bool</span> batchTraining = <span class="keyword">true</span>);</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span> </div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <span class="keyword">template</span><<span class="keyword">typename</span> VecType></div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="keywordtype">void</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a54cf439ed323eac7dc3f17c876c768e7">Train</a>(<span class="keyword">const</span> VecType& point, <span class="keyword">const</span> <span class="keywordtype">size_t</span> label);</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span> </div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a6ac5b55cf81817624a3251db20b50160">SplitCheck</a>();</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span> </div><div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a74d712fe39e9a3f0375d22c2f17b8c0e"> 181</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a74d712fe39e9a3f0375d22c2f17b8c0e">SplitDimension</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a1795be22222c893656fcc7b1262faea9">splitDimension</a>; }</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> </div><div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ade4967faf6c0d09b19b86f9d47df2d48"> 184</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ade4967faf6c0d09b19b86f9d47df2d48">MajorityClass</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ad7295c1e96ba6a145c3acfec2aa09ffa">majorityClass</a>; }</div><div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a574d52457625baf2596be5c649d04db1"> 186</a></span>  <span class="keywordtype">size_t</span>& <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a574d52457625baf2596be5c649d04db1">MajorityClass</a>() { <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ad7295c1e96ba6a145c3acfec2aa09ffa">majorityClass</a>; }</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span> </div><div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a95f09abf1a126c2b53b34f064b2c142f"> 189</a></span>  <span class="keywordtype">double</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a95f09abf1a126c2b53b34f064b2c142f">MajorityProbability</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a85132e63b14563edc7c86fb2b6c536df">majorityProbability</a>; }</div><div class="line"><a name="l00191"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4b19bab10125e782e20b37d1814c4e9d"> 191</a></span>  <span class="keywordtype">double</span>& <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4b19bab10125e782e20b37d1814c4e9d">MajorityProbability</a>() { <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a85132e63b14563edc7c86fb2b6c536df">majorityProbability</a>; }</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span> </div><div class="line"><a name="l00194"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4a8190c38569b104398f7ff796346589"> 194</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4a8190c38569b104398f7ff796346589">NumChildren</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a14215fa247b8c2c9123de4d31f95154d">children</a>.size(); }</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span> </div><div class="line"><a name="l00197"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a383ffcc47c960bedba0ad4cde609a2e8"> 197</a></span>  <span class="keyword">const</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html">HoeffdingTree</a>& <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a383ffcc47c960bedba0ad4cde609a2e8">Child</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> i)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *<a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a14215fa247b8c2c9123de4d31f95154d">children</a>[i]; }</div><div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ad141745c3ebd2d225ac2347c468a3b36"> 199</a></span>  <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html">HoeffdingTree</a>& <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ad141745c3ebd2d225ac2347c468a3b36">Child</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> i) { <span class="keywordflow">return</span> *<a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a14215fa247b8c2c9123de4d31f95154d">children</a>[i]; }</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span> </div><div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ad2dfd14baf1fdd2b13b03ac8f277eee8"> 202</a></span>  <span class="keywordtype">double</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ad2dfd14baf1fdd2b13b03ac8f277eee8">SuccessProbability</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4504ac6c73113e466ec26746e7db6af2">successProbability</a>; }</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <span class="keywordtype">void</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ad2dfd14baf1fdd2b13b03ac8f277eee8">SuccessProbability</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4504ac6c73113e466ec26746e7db6af2">successProbability</a>);</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span> </div><div class="line"><a name="l00207"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a3edbbf10cc1a4d4c4e3c960aadc11875"> 207</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a3edbbf10cc1a4d4c4e3c960aadc11875">MinSamples</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ab2d14a1b3688ffeb4a14f32505be3567">minSamples</a>; }</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="keywordtype">void</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a3edbbf10cc1a4d4c4e3c960aadc11875">MinSamples</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ab2d14a1b3688ffeb4a14f32505be3567">minSamples</a>);</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span> </div><div class="line"><a name="l00212"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a6ebd8e5c32a96a709c12e6a286857a51"> 212</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a6ebd8e5c32a96a709c12e6a286857a51">MaxSamples</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4b14b0df4fc515d8d92f058370ab6ba9">maxSamples</a>; }</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="keywordtype">void</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a6ebd8e5c32a96a709c12e6a286857a51">MaxSamples</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4b14b0df4fc515d8d92f058370ab6ba9">maxSamples</a>);</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span> </div><div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a53dc23294ad20763514b84aba8f4fea7"> 217</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a53dc23294ad20763514b84aba8f4fea7">CheckInterval</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ae989373eed16a13a99f7dabb521edb6a">checkInterval</a>; }</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <span class="keywordtype">void</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a53dc23294ad20763514b84aba8f4fea7">CheckInterval</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ae989373eed16a13a99f7dabb521edb6a">checkInterval</a>);</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span> </div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="keyword">template</span><<span class="keyword">typename</span> VecType></div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a7c99fda2dfe1b7225a0369cfd5ee3c70">CalculateDirection</a>(<span class="keyword">const</span> VecType& point) <span class="keyword">const</span>;</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span> </div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <span class="keyword">template</span><<span class="keyword">typename</span> VecType></div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#acc0e953e5b981804d6249915728e0e8e">Classify</a>(<span class="keyword">const</span> VecType& point) <span class="keyword">const</span>;</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span> </div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  <span class="keyword">template</span><<span class="keyword">typename</span> VecType></div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <span class="keywordtype">void</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#acc0e953e5b981804d6249915728e0e8e">Classify</a>(<span class="keyword">const</span> VecType& point, <span class="keywordtype">size_t</span>& prediction, <span class="keywordtype">double</span>& probability)</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <span class="keyword">const</span>;</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span> </div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  <span class="keyword">template</span><<span class="keyword">typename</span> MatType></div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  <span class="keywordtype">void</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#acc0e953e5b981804d6249915728e0e8e">Classify</a>(<span class="keyword">const</span> MatType& data, arma::Row<size_t>& predictions) <span class="keyword">const</span>;</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span> </div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <span class="keyword">template</span><<span class="keyword">typename</span> MatType></div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  <span class="keywordtype">void</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#acc0e953e5b981804d6249915728e0e8e">Classify</a>(<span class="keyword">const</span> MatType& data,</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  arma::Row<size_t>& predictions,</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  arma::rowvec& probabilities) <span class="keyword">const</span>;</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span> </div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  <span class="keywordtype">void</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a7919868233138dd248b6e2778cb762b5">CreateChildren</a>();</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span> </div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  <span class="keyword">template</span><<span class="keyword">typename</span> Archive></div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  <span class="keywordtype">void</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a48a89464c5fb95d12bc38cbb6ec9b678">Serialize</a>(Archive& ar, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <span class="comment">/* version */</span>);</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span> </div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  <span class="keyword">private</span>:</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <span class="comment">// We need to keep some information for before we have split.</span></div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span> </div><div class="line"><a name="l00295"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a041f5826547efdf330a60bcdf4f362d3"> 295</a></span>  std::vector<NumericSplitType<FitnessFunction>> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a041f5826547efdf330a60bcdf4f362d3">numericSplits</a>;</div><div class="line"><a name="l00297"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a88d41a2fe0df1df3833fc035cf647e95"> 297</a></span>  std::vector<CategoricalSplitType<FitnessFunction>> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a88d41a2fe0df1df3833fc035cf647e95">categoricalSplits</a>;</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span> </div><div class="line"><a name="l00300"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a5ee68a0a876a9a8bb9e4633541b710f4"> 300</a></span>  std::unordered_map<size_t, std::pair<size_t, size_t>>* <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a5ee68a0a876a9a8bb9e4633541b710f4">dimensionMappings</a>;</div><div class="line"><a name="l00302"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a258b46af757f1022515c988858c72feb"> 302</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a258b46af757f1022515c988858c72feb">ownsMappings</a>;</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span> </div><div class="line"><a name="l00305"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#acc5763176c600afe01104b4ed4892d32"> 305</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#acc5763176c600afe01104b4ed4892d32">numSamples</a>;</div><div class="line"><a name="l00307"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4f53c35d0d231b21d743768e79c40e7c"> 307</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4f53c35d0d231b21d743768e79c40e7c">numClasses</a>;</div><div class="line"><a name="l00309"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4b14b0df4fc515d8d92f058370ab6ba9"> 309</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4b14b0df4fc515d8d92f058370ab6ba9">maxSamples</a>;</div><div class="line"><a name="l00311"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ae989373eed16a13a99f7dabb521edb6a"> 311</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ae989373eed16a13a99f7dabb521edb6a">checkInterval</a>;</div><div class="line"><a name="l00313"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ab2d14a1b3688ffeb4a14f32505be3567"> 313</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ab2d14a1b3688ffeb4a14f32505be3567">minSamples</a>;</div><div class="line"><a name="l00315"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a3b2adfbce59218d401a955fe11926ee7"> 315</a></span>  <span class="keyword">const</span> <a class="code" href="classmlpack_1_1data_1_1DatasetMapper.html">data::DatasetInfo</a>* <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a3b2adfbce59218d401a955fe11926ee7">datasetInfo</a>;</div><div class="line"><a name="l00317"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a289d372af1648bc3585bef53bfe50392"> 317</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a289d372af1648bc3585bef53bfe50392">ownsInfo</a>;</div><div class="line"><a name="l00319"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4504ac6c73113e466ec26746e7db6af2"> 319</a></span>  <span class="keywordtype">double</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4504ac6c73113e466ec26746e7db6af2">successProbability</a>;</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span> </div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  <span class="comment">// And we need to keep some information for after we have split.</span></div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span> </div><div class="line"><a name="l00324"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a1795be22222c893656fcc7b1262faea9"> 324</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a1795be22222c893656fcc7b1262faea9">splitDimension</a>;</div><div class="line"><a name="l00326"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ad7295c1e96ba6a145c3acfec2aa09ffa"> 326</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#ad7295c1e96ba6a145c3acfec2aa09ffa">majorityClass</a>;</div><div class="line"><a name="l00329"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a85132e63b14563edc7c86fb2b6c536df"> 329</a></span>  <span class="keywordtype">double</span> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a85132e63b14563edc7c86fb2b6c536df">majorityProbability</a>;</div><div class="line"><a name="l00331"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a75921b6a575c0bfd4feb7edea67fb731"> 331</a></span>  <span class="keyword">typename</span> CategoricalSplitType<FitnessFunction>::SplitInfo <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a75921b6a575c0bfd4feb7edea67fb731">categoricalSplit</a>;</div><div class="line"><a name="l00333"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#aae9d70d3718a68d83e9bcf016e37166b"> 333</a></span>  <span class="keyword">typename</span> NumericSplitType<FitnessFunction>::SplitInfo <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#aae9d70d3718a68d83e9bcf016e37166b">numericSplit</a>;</div><div class="line"><a name="l00335"></a><span class="lineno"><a class="line" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a14215fa247b8c2c9123de4d31f95154d"> 335</a></span>  std::vector<HoeffdingTree*> <a class="code" href="classmlpack_1_1tree_1_1HoeffdingTree.html#a14215fa247b8c2c9123de4d31f95154d">children</a>;</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span> };</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span> </div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span> } <span class="comment">// namespace tree</span></div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span> } <span class="comment">// namespace mlpack</span></div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span> </div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span> <span class="preprocessor">#include "hoeffding_tree_impl.hpp"</span></div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span> </div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span> <span class="preprocessor">#endif</span></div><div class="ttc" id="gini__impurity_8hpp_html"><div class="ttname"><a href="gini__impurity_8hpp.html">gini_impurity.hpp</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a0eff97cb145bfc41d3a1dc4efd682e45"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a0eff97cb145bfc41d3a1dc4efd682e45">mlpack::tree::HoeffdingTree::NumericSplit</a></div><div class="ttdeci">NumericSplitType< FitnessFunction > NumericSplit</div><div class="ttdoc">Allow access to the numeric split type. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00065">hoeffding_tree.hpp:65</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1data_1_1DatasetMapper_html"><div class="ttname"><a href="classmlpack_1_1data_1_1DatasetMapper.html">mlpack::data::DatasetMapper</a></div><div class="ttdoc">Auxiliary information for a dataset, including mappings to/from strings and the datatype of each dime...</div><div class="ttdef"><b>Definition:</b> <a href="dataset__mapper_8hpp_source.html#l00036">dataset_mapper.hpp:36</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_acc0e953e5b981804d6249915728e0e8e"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#acc0e953e5b981804d6249915728e0e8e">mlpack::tree::HoeffdingTree::Classify</a></div><div class="ttdeci">size_t Classify(const VecType &point) const </div><div class="ttdoc">Classify the given point, using this node and the entire (sub)tree beneath it. </div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_ad07c2c792ceaace94b5125de78c353a5"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#ad07c2c792ceaace94b5125de78c353a5">mlpack::tree::HoeffdingTree::HoeffdingTree</a></div><div class="ttdeci">HoeffdingTree(const MatType &data, const data::DatasetInfo &datasetInfo, const arma::Row< size_t > &labels, const size_t numClasses, const bool batchTraining=true, const double successProbability=0.95, const size_t maxSamples=0, const size_t checkInterval=100, const size_t minSamples=100, const CategoricalSplitType< FitnessFunction > &categoricalSplitIn=CategoricalSplitType< FitnessFunction >(0, 0), const NumericSplitType< FitnessFunction > &numericSplitIn=NumericSplitType< FitnessFunction >(0))</div><div class="ttdoc">Construct the Hoeffding tree with the given parameters and given training data. </div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a289d372af1648bc3585bef53bfe50392"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a289d372af1648bc3585bef53bfe50392">mlpack::tree::HoeffdingTree::ownsInfo</a></div><div class="ttdeci">bool ownsInfo</div><div class="ttdoc">Whether or not we own the dataset information. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00317">hoeffding_tree.hpp:317</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html">mlpack::tree::HoeffdingTree</a></div><div class="ttdoc">The HoeffdingTree object represents all of the necessary information for a Hoeffding-bound-based deci...</div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00061">hoeffding_tree.hpp:61</a></div></div>
|
|
<div class="ttc" id="namespacemlpack_html"><div class="ttname"><a href="namespacemlpack.html">mlpack</a></div><div class="ttdoc">Linear algebra utility functions, generally performed on matrices or vectors. </div><div class="ttdef"><b>Definition:</b> <a href="binarize_8hpp_source.html#l00018">binarize.hpp:18</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_ae989373eed16a13a99f7dabb521edb6a"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#ae989373eed16a13a99f7dabb521edb6a">mlpack::tree::HoeffdingTree::checkInterval</a></div><div class="ttdeci">size_t checkInterval</div><div class="ttdoc">The number of samples that should be seen before checking for a split. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00311">hoeffding_tree.hpp:311</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_aa172871b4874bb500eaff55f2e7a9be9"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#aa172871b4874bb500eaff55f2e7a9be9">mlpack::tree::HoeffdingTree::~HoeffdingTree</a></div><div class="ttdeci">~HoeffdingTree()</div><div class="ttdoc">Clean up memory. </div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a7c99fda2dfe1b7225a0369cfd5ee3c70"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a7c99fda2dfe1b7225a0369cfd5ee3c70">mlpack::tree::HoeffdingTree::CalculateDirection</a></div><div class="ttdeci">size_t CalculateDirection(const VecType &point) const </div><div class="ttdoc">Given a point and that this node is not a leaf, calculate the index of the child node this point woul...</div></div>
|
|
<div class="ttc" id="prereqs_8hpp_html"><div class="ttname"><a href="prereqs_8hpp.html">prereqs.hpp</a></div><div class="ttdoc">The core includes that mlpack expects; standard C++ includes and Armadillo. </div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a4b19bab10125e782e20b37d1814c4e9d"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4b19bab10125e782e20b37d1814c4e9d">mlpack::tree::HoeffdingTree::MajorityProbability</a></div><div class="ttdeci">double & MajorityProbability()</div><div class="ttdoc">Modify the probability of the majority class. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00191">hoeffding_tree.hpp:191</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_ab2d14a1b3688ffeb4a14f32505be3567"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#ab2d14a1b3688ffeb4a14f32505be3567">mlpack::tree::HoeffdingTree::minSamples</a></div><div class="ttdeci">size_t minSamples</div><div class="ttdoc">The minimum number of samples for splitting. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00313">hoeffding_tree.hpp:313</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_acc5763176c600afe01104b4ed4892d32"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#acc5763176c600afe01104b4ed4892d32">mlpack::tree::HoeffdingTree::numSamples</a></div><div class="ttdeci">size_t numSamples</div><div class="ttdoc">The number of samples seen so far by this node. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00305">hoeffding_tree.hpp:305</a></div></div>
|
|
<div class="ttc" id="namespacemlpack_1_1tree_html_a20fda6c6aece9c58c011ffea7e123378"><div class="ttname"><a href="namespacemlpack_1_1tree.html#a20fda6c6aece9c58c011ffea7e123378">mlpack::tree::HoeffdingDoubleNumericSplit</a></div><div class="ttdeci">HoeffdingNumericSplit< FitnessFunction, double > HoeffdingDoubleNumericSplit</div><div class="ttdoc">Convenience typedef. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__numeric__split_8hpp_source.html#l00148">hoeffding_numeric_split.hpp:148</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a74d712fe39e9a3f0375d22c2f17b8c0e"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a74d712fe39e9a3f0375d22c2f17b8c0e">mlpack::tree::HoeffdingTree::SplitDimension</a></div><div class="ttdeci">size_t SplitDimension() const </div><div class="ttdoc">Get the splitting dimension (size_t(-1) if no split). </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00181">hoeffding_tree.hpp:181</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_ad2dfd14baf1fdd2b13b03ac8f277eee8"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#ad2dfd14baf1fdd2b13b03ac8f277eee8">mlpack::tree::HoeffdingTree::SuccessProbability</a></div><div class="ttdeci">double SuccessProbability() const </div><div class="ttdoc">Get the confidence required for a split. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00202">hoeffding_tree.hpp:202</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a95f09abf1a126c2b53b34f064b2c142f"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a95f09abf1a126c2b53b34f064b2c142f">mlpack::tree::HoeffdingTree::MajorityProbability</a></div><div class="ttdeci">double MajorityProbability() const </div><div class="ttdoc">Get the probability of the majority class (based on training samples). </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00189">hoeffding_tree.hpp:189</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a258b46af757f1022515c988858c72feb"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a258b46af757f1022515c988858c72feb">mlpack::tree::HoeffdingTree::ownsMappings</a></div><div class="ttdeci">bool ownsMappings</div><div class="ttdoc">Indicates whether or not we own the mappings. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00302">hoeffding_tree.hpp:302</a></div></div>
|
|
<div class="ttc" id="hoeffding__categorical__split_8hpp_html"><div class="ttname"><a href="hoeffding__categorical__split_8hpp.html">hoeffding_categorical_split.hpp</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a75921b6a575c0bfd4feb7edea67fb731"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a75921b6a575c0bfd4feb7edea67fb731">mlpack::tree::HoeffdingTree::categoricalSplit</a></div><div class="ttdeci">CategoricalSplitType< FitnessFunction >::SplitInfo categoricalSplit</div><div class="ttdoc">If the split is categorical, this holds the splitting information. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00331">hoeffding_tree.hpp:331</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a041f5826547efdf330a60bcdf4f362d3"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a041f5826547efdf330a60bcdf4f362d3">mlpack::tree::HoeffdingTree::numericSplits</a></div><div class="ttdeci">std::vector< NumericSplitType< FitnessFunction > > numericSplits</div><div class="ttdoc">Information for splitting of numeric features (used before split). </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00295">hoeffding_tree.hpp:295</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a54cf439ed323eac7dc3f17c876c768e7"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a54cf439ed323eac7dc3f17c876c768e7">mlpack::tree::HoeffdingTree::Train</a></div><div class="ttdeci">void Train(const MatType &data, const arma::Row< size_t > &labels, const bool batchTraining=true)</div><div class="ttdoc">Train on a set of points, either in streaming mode or in batch mode, with the given labels...</div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a48a89464c5fb95d12bc38cbb6ec9b678"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a48a89464c5fb95d12bc38cbb6ec9b678">mlpack::tree::HoeffdingTree::Serialize</a></div><div class="ttdeci">void Serialize(Archive &ar, const unsigned int)</div><div class="ttdoc">Serialize the split. </div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a3edbbf10cc1a4d4c4e3c960aadc11875"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a3edbbf10cc1a4d4c4e3c960aadc11875">mlpack::tree::HoeffdingTree::MinSamples</a></div><div class="ttdeci">size_t MinSamples() const </div><div class="ttdoc">Get the minimum number of samples for a split. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00207">hoeffding_tree.hpp:207</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a6ebd8e5c32a96a709c12e6a286857a51"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a6ebd8e5c32a96a709c12e6a286857a51">mlpack::tree::HoeffdingTree::MaxSamples</a></div><div class="ttdeci">size_t MaxSamples() const </div><div class="ttdoc">Get the maximum number of samples before a split is forced. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00212">hoeffding_tree.hpp:212</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_aae9d70d3718a68d83e9bcf016e37166b"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#aae9d70d3718a68d83e9bcf016e37166b">mlpack::tree::HoeffdingTree::numericSplit</a></div><div class="ttdeci">NumericSplitType< FitnessFunction >::SplitInfo numericSplit</div><div class="ttdoc">If the split is numeric, this holds the splitting information. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00333">hoeffding_tree.hpp:333</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a383ffcc47c960bedba0ad4cde609a2e8"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a383ffcc47c960bedba0ad4cde609a2e8">mlpack::tree::HoeffdingTree::Child</a></div><div class="ttdeci">const HoeffdingTree & Child(const size_t i) const </div><div class="ttdoc">Get a child. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00197">hoeffding_tree.hpp:197</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a4b14b0df4fc515d8d92f058370ab6ba9"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4b14b0df4fc515d8d92f058370ab6ba9">mlpack::tree::HoeffdingTree::maxSamples</a></div><div class="ttdeci">size_t maxSamples</div><div class="ttdoc">The maximum number of samples we can see before splitting. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00309">hoeffding_tree.hpp:309</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a53dc23294ad20763514b84aba8f4fea7"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a53dc23294ad20763514b84aba8f4fea7">mlpack::tree::HoeffdingTree::CheckInterval</a></div><div class="ttdeci">size_t CheckInterval() const </div><div class="ttdoc">Get the number of samples before a split check is performed. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00217">hoeffding_tree.hpp:217</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_ade4967faf6c0d09b19b86f9d47df2d48"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#ade4967faf6c0d09b19b86f9d47df2d48">mlpack::tree::HoeffdingTree::MajorityClass</a></div><div class="ttdeci">size_t MajorityClass() const </div><div class="ttdoc">Get the majority class. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00184">hoeffding_tree.hpp:184</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_ad7295c1e96ba6a145c3acfec2aa09ffa"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#ad7295c1e96ba6a145c3acfec2aa09ffa">mlpack::tree::HoeffdingTree::majorityClass</a></div><div class="ttdeci">size_t majorityClass</div><div class="ttdoc">The majority class of this node. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00326">hoeffding_tree.hpp:326</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a5ee68a0a876a9a8bb9e4633541b710f4"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a5ee68a0a876a9a8bb9e4633541b710f4">mlpack::tree::HoeffdingTree::dimensionMappings</a></div><div class="ttdeci">std::unordered_map< size_t, std::pair< size_t, size_t > > * dimensionMappings</div><div class="ttdoc">This structure is owned by this node only if it is the root of the tree. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00300">hoeffding_tree.hpp:300</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a4504ac6c73113e466ec26746e7db6af2"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4504ac6c73113e466ec26746e7db6af2">mlpack::tree::HoeffdingTree::successProbability</a></div><div class="ttdeci">double successProbability</div><div class="ttdoc">The required probability of success for a split to be performed. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00319">hoeffding_tree.hpp:319</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a85132e63b14563edc7c86fb2b6c536df"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a85132e63b14563edc7c86fb2b6c536df">mlpack::tree::HoeffdingTree::majorityProbability</a></div><div class="ttdeci">double majorityProbability</div><div class="ttdoc">The empirical probability of a point this node saw having the majority class. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00329">hoeffding_tree.hpp:329</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a4f53c35d0d231b21d743768e79c40e7c"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4f53c35d0d231b21d743768e79c40e7c">mlpack::tree::HoeffdingTree::numClasses</a></div><div class="ttdeci">size_t numClasses</div><div class="ttdoc">The number of classes this node is trained on. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00307">hoeffding_tree.hpp:307</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a88d41a2fe0df1df3833fc035cf647e95"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a88d41a2fe0df1df3833fc035cf647e95">mlpack::tree::HoeffdingTree::categoricalSplits</a></div><div class="ttdeci">std::vector< CategoricalSplitType< FitnessFunction > > categoricalSplits</div><div class="ttdoc">Information for splitting of categorical features (used before split). </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00297">hoeffding_tree.hpp:297</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a6ac5b55cf81817624a3251db20b50160"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a6ac5b55cf81817624a3251db20b50160">mlpack::tree::HoeffdingTree::SplitCheck</a></div><div class="ttdeci">size_t SplitCheck()</div><div class="ttdoc">Check if a split would satisfy the conditions of the Hoeffding bound with the node&#39;s specified succes...</div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a14215fa247b8c2c9123de4d31f95154d"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a14215fa247b8c2c9123de4d31f95154d">mlpack::tree::HoeffdingTree::children</a></div><div class="ttdeci">std::vector< HoeffdingTree * > children</div><div class="ttdoc">If the split has occurred, these are the children. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00335">hoeffding_tree.hpp:335</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a8d2bce15dacf23fc6f513e1fcd66a786"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a8d2bce15dacf23fc6f513e1fcd66a786">mlpack::tree::HoeffdingTree::CategoricalSplit</a></div><div class="ttdeci">CategoricalSplitType< FitnessFunction > CategoricalSplit</div><div class="ttdoc">Allow access to the categorical split type. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00067">hoeffding_tree.hpp:67</a></div></div>
|
|
<div class="ttc" id="dataset__mapper_8hpp_html"><div class="ttname"><a href="dataset__mapper_8hpp.html">dataset_mapper.hpp</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a4a8190c38569b104398f7ff796346589"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a4a8190c38569b104398f7ff796346589">mlpack::tree::HoeffdingTree::NumChildren</a></div><div class="ttdeci">size_t NumChildren() const </div><div class="ttdoc">Get the number of children. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00194">hoeffding_tree.hpp:194</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a574d52457625baf2596be5c649d04db1"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a574d52457625baf2596be5c649d04db1">mlpack::tree::HoeffdingTree::MajorityClass</a></div><div class="ttdeci">size_t & MajorityClass()</div><div class="ttdoc">Modify the majority class. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00186">hoeffding_tree.hpp:186</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a1795be22222c893656fcc7b1262faea9"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a1795be22222c893656fcc7b1262faea9">mlpack::tree::HoeffdingTree::splitDimension</a></div><div class="ttdeci">size_t splitDimension</div><div class="ttdoc">The dimension that this node has split on. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00324">hoeffding_tree.hpp:324</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a3b2adfbce59218d401a955fe11926ee7"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a3b2adfbce59218d401a955fe11926ee7">mlpack::tree::HoeffdingTree::datasetInfo</a></div><div class="ttdeci">const data::DatasetInfo * datasetInfo</div><div class="ttdoc">The dataset information. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00315">hoeffding_tree.hpp:315</a></div></div>
|
|
<div class="ttc" id="hoeffding__numeric__split_8hpp_html"><div class="ttname"><a href="hoeffding__numeric__split_8hpp.html">hoeffding_numeric_split.hpp</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_ad141745c3ebd2d225ac2347c468a3b36"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#ad141745c3ebd2d225ac2347c468a3b36">mlpack::tree::HoeffdingTree::Child</a></div><div class="ttdeci">HoeffdingTree & Child(const size_t i)</div><div class="ttdoc">Modify a child. </div><div class="ttdef"><b>Definition:</b> <a href="hoeffding__tree_8hpp_source.html#l00199">hoeffding_tree.hpp:199</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1tree_1_1HoeffdingTree_html_a7919868233138dd248b6e2778cb762b5"><div class="ttname"><a href="classmlpack_1_1tree_1_1HoeffdingTree.html#a7919868233138dd248b6e2778cb762b5">mlpack::tree::HoeffdingTree::CreateChildren</a></div><div class="ttdeci">void CreateChildren()</div><div class="ttdoc">Given that this node should split, create the children. </div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.11
|
|
</small></address>
|
|
</body>
|
|
<script type="text/javascript">
|
|
var x = document.getElementsByClassName("formulaDsp");
|
|
var i;
|
|
for (i = 0; i < x.length; i++)
|
|
{
|
|
x[i].width /= 4;
|
|
}
|
|
</script>
|
|
</html>
|