858 lines
51 KiB
HTML
858 lines
51 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: mlpack::tree::HoeffdingTreeModel Class Reference</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 class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li><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="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="classes.html"><span>Class Index</span></a></li>
|
|
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class 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="namespacemlpack.html">mlpack</a></li><li class="navelem"><a class="el" href="namespacemlpack_1_1tree.html">tree</a></li><li class="navelem"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html">HoeffdingTreeModel</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-types">Public Types</a> |
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pri-attribs">Private Attributes</a> |
|
|
<a href="classmlpack_1_1tree_1_1HoeffdingTreeModel-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">mlpack::tree::HoeffdingTreeModel Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>This class is a serializable Hoeffding tree model that can hold four different types of Hoeffding trees.
|
|
<a href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#details">More...</a></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
|
|
Public Types</h2></td></tr>
|
|
<tr class="memitem:aa7266b045d09aa8f036df5db31495445"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTree.html">HoeffdingTree</a>< <a class="el" href="classmlpack_1_1tree_1_1GiniImpurity.html">GiniImpurity</a>, <a class="el" href="namespacemlpack_1_1tree.html#aee8064e063faf98870a4a5d4c2a0c46f">BinaryDoubleNumericSplit</a>, <a class="el" href="classmlpack_1_1tree_1_1HoeffdingCategoricalSplit.html">HoeffdingCategoricalSplit</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#aa7266b045d09aa8f036df5db31495445">GiniBinaryTreeType</a></td></tr>
|
|
<tr class="memdesc:aa7266b045d09aa8f036df5db31495445"><td class="mdescLeft"> </td><td class="mdescRight">Convenience typedef for GINI_BINARY tree type. <a href="#aa7266b045d09aa8f036df5db31495445">More...</a><br /></td></tr>
|
|
<tr class="separator:aa7266b045d09aa8f036df5db31495445"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa34a313eef873151ebad30a6b4524c1a"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTree.html">HoeffdingTree</a>< <a class="el" href="classmlpack_1_1tree_1_1GiniImpurity.html">GiniImpurity</a>, <a class="el" href="namespacemlpack_1_1tree.html#a20fda6c6aece9c58c011ffea7e123378">HoeffdingDoubleNumericSplit</a>, <a class="el" href="classmlpack_1_1tree_1_1HoeffdingCategoricalSplit.html">HoeffdingCategoricalSplit</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#aa34a313eef873151ebad30a6b4524c1a">GiniHoeffdingTreeType</a></td></tr>
|
|
<tr class="memdesc:aa34a313eef873151ebad30a6b4524c1a"><td class="mdescLeft"> </td><td class="mdescRight">Convenience typedef for GINI_HOEFFDING tree type. <a href="#aa34a313eef873151ebad30a6b4524c1a">More...</a><br /></td></tr>
|
|
<tr class="separator:aa34a313eef873151ebad30a6b4524c1a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac37ace0bacc02d33311f3adae2645437"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTree.html">HoeffdingTree</a>< <a class="el" href="classmlpack_1_1tree_1_1InformationGain.html">InformationGain</a>, <a class="el" href="namespacemlpack_1_1tree.html#aee8064e063faf98870a4a5d4c2a0c46f">BinaryDoubleNumericSplit</a>, <a class="el" href="classmlpack_1_1tree_1_1HoeffdingCategoricalSplit.html">HoeffdingCategoricalSplit</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ac37ace0bacc02d33311f3adae2645437">InfoBinaryTreeType</a></td></tr>
|
|
<tr class="memdesc:ac37ace0bacc02d33311f3adae2645437"><td class="mdescLeft"> </td><td class="mdescRight">Convenience typedef for INFO_BINARY tree type. <a href="#ac37ace0bacc02d33311f3adae2645437">More...</a><br /></td></tr>
|
|
<tr class="separator:ac37ace0bacc02d33311f3adae2645437"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa5fb55931696090698cdfdabcbecbd7c"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTree.html">HoeffdingTree</a>< <a class="el" href="classmlpack_1_1tree_1_1InformationGain.html">InformationGain</a>, <a class="el" href="namespacemlpack_1_1tree.html#a20fda6c6aece9c58c011ffea7e123378">HoeffdingDoubleNumericSplit</a>, <a class="el" href="classmlpack_1_1tree_1_1HoeffdingCategoricalSplit.html">HoeffdingCategoricalSplit</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#aa5fb55931696090698cdfdabcbecbd7c">InfoHoeffdingTreeType</a></td></tr>
|
|
<tr class="memdesc:aa5fb55931696090698cdfdabcbecbd7c"><td class="mdescLeft"> </td><td class="mdescRight">Convenience typedef for INFO_HOEFFDING tree type. <a href="#aa5fb55931696090698cdfdabcbecbd7c">More...</a><br /></td></tr>
|
|
<tr class="separator:aa5fb55931696090698cdfdabcbecbd7c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad7a5b513f01fee699b545686b5fed500"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ad7a5b513f01fee699b545686b5fed500">TreeType</a> { <br />
|
|
  <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ad7a5b513f01fee699b545686b5fed500a60dcc79ce1b3fbb1d3b8f6096fcb310a">GINI_HOEFFDING</a>,
|
|
<br />
|
|
  <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ad7a5b513f01fee699b545686b5fed500ad0a0e15a5b6e00a0b7ac22785a30398e">GINI_BINARY</a>,
|
|
<br />
|
|
  <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ad7a5b513f01fee699b545686b5fed500a02abed954e021b5b7841f00178081fc2">INFO_HOEFFDING</a>,
|
|
<br />
|
|
  <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ad7a5b513f01fee699b545686b5fed500a9f094dca949beadd5187e31a4612da42">INFO_BINARY</a>
|
|
<br />
|
|
}<tr class="memdesc:ad7a5b513f01fee699b545686b5fed500"><td class="mdescLeft"> </td><td class="mdescRight">This enumerates the four types of trees we can hold. <a href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ad7a5b513f01fee699b545686b5fed500">More...</a><br /></td></tr>
|
|
</td></tr>
|
|
<tr class="separator:ad7a5b513f01fee699b545686b5fed500"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a457befee70999a7d1bb2be7f5a917b36"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#a457befee70999a7d1bb2be7f5a917b36">HoeffdingTreeModel</a> (const <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ad7a5b513f01fee699b545686b5fed500">TreeType</a> &<a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ac5fdfa6e1ec4df537465e97152a322aa">type</a>=<a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ad7a5b513f01fee699b545686b5fed500a60dcc79ce1b3fbb1d3b8f6096fcb310a">GINI_HOEFFDING</a>)</td></tr>
|
|
<tr class="memdesc:a457befee70999a7d1bb2be7f5a917b36"><td class="mdescLeft"> </td><td class="mdescRight">Construct the Hoeffding tree model, but don't initialize any tree. <a href="#a457befee70999a7d1bb2be7f5a917b36">More...</a><br /></td></tr>
|
|
<tr class="separator:a457befee70999a7d1bb2be7f5a917b36"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa1cf05ba915197777b18da0eebc2a964"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#aa1cf05ba915197777b18da0eebc2a964">HoeffdingTreeModel</a> (const <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html">HoeffdingTreeModel</a> &other)</td></tr>
|
|
<tr class="memdesc:aa1cf05ba915197777b18da0eebc2a964"><td class="mdescLeft"> </td><td class="mdescRight">Copy the Hoeffding tree model from the given other model. <a href="#aa1cf05ba915197777b18da0eebc2a964">More...</a><br /></td></tr>
|
|
<tr class="separator:aa1cf05ba915197777b18da0eebc2a964"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad47d0f57ae28a5e17b4dfd9fa5f393e2"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ad47d0f57ae28a5e17b4dfd9fa5f393e2">HoeffdingTreeModel</a> (<a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html">HoeffdingTreeModel</a> &&other)</td></tr>
|
|
<tr class="memdesc:ad47d0f57ae28a5e17b4dfd9fa5f393e2"><td class="mdescLeft"> </td><td class="mdescRight">Move the Hoeffding tree model from the given other model. <a href="#ad47d0f57ae28a5e17b4dfd9fa5f393e2">More...</a><br /></td></tr>
|
|
<tr class="separator:ad47d0f57ae28a5e17b4dfd9fa5f393e2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4a2c214d9433e334f1c64e82dab0a7ea"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#a4a2c214d9433e334f1c64e82dab0a7ea">~HoeffdingTreeModel</a> ()</td></tr>
|
|
<tr class="memdesc:a4a2c214d9433e334f1c64e82dab0a7ea"><td class="mdescLeft"> </td><td class="mdescRight">Clean up the given model. <a href="#a4a2c214d9433e334f1c64e82dab0a7ea">More...</a><br /></td></tr>
|
|
<tr class="separator:a4a2c214d9433e334f1c64e82dab0a7ea"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a918f490ff31829c1aec521a452693b02"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#a918f490ff31829c1aec521a452693b02">BuildModel</a> (const arma::mat &dataset, const <a class="el" href="namespacemlpack_1_1data.html#a78dcb1509876d801331776f0b895cffb">data::DatasetInfo</a> &datasetInfo, const arma::Row< size_t > &labels, const size_t numClasses, const bool batchTraining, const double successProbability, const size_t maxSamples, const size_t checkInterval, const size_t minSamples, const size_t bins, const size_t observationsBeforeBinning)</td></tr>
|
|
<tr class="memdesc:a918f490ff31829c1aec521a452693b02"><td class="mdescLeft"> </td><td class="mdescRight">Train the model on the given dataset with the given labels. <a href="#a918f490ff31829c1aec521a452693b02">More...</a><br /></td></tr>
|
|
<tr class="separator:a918f490ff31829c1aec521a452693b02"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac3adc68c00cdd7c1483f261aca1a664e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ac3adc68c00cdd7c1483f261aca1a664e">Classify</a> (const arma::mat &dataset, arma::Row< size_t > &predictions) const </td></tr>
|
|
<tr class="memdesc:ac3adc68c00cdd7c1483f261aca1a664e"><td class="mdescLeft"> </td><td class="mdescRight">Using the model, classify the given test points. <a href="#ac3adc68c00cdd7c1483f261aca1a664e">More...</a><br /></td></tr>
|
|
<tr class="separator:ac3adc68c00cdd7c1483f261aca1a664e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a276398537c38595e7d8cb4beb14e2f0a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#a276398537c38595e7d8cb4beb14e2f0a">Classify</a> (const arma::mat &dataset, arma::Row< size_t > &predictions, arma::rowvec &probabilities) const </td></tr>
|
|
<tr class="memdesc:a276398537c38595e7d8cb4beb14e2f0a"><td class="mdescLeft"> </td><td class="mdescRight">Using the model, classify the given test points, returning class probabilities. <a href="#a276398537c38595e7d8cb4beb14e2f0a">More...</a><br /></td></tr>
|
|
<tr class="separator:a276398537c38595e7d8cb4beb14e2f0a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab4eef4ffae93a14308f6a7769263c838"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ab4eef4ffae93a14308f6a7769263c838">NumNodes</a> () const </td></tr>
|
|
<tr class="memdesc:ab4eef4ffae93a14308f6a7769263c838"><td class="mdescLeft"> </td><td class="mdescRight">Get the number of nodes in the tree. <a href="#ab4eef4ffae93a14308f6a7769263c838">More...</a><br /></td></tr>
|
|
<tr class="separator:ab4eef4ffae93a14308f6a7769263c838"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a27aa83b701381b3f67373ecd3e35d151"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html">HoeffdingTreeModel</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#a27aa83b701381b3f67373ecd3e35d151">operator=</a> (const <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html">HoeffdingTreeModel</a> &other)</td></tr>
|
|
<tr class="memdesc:a27aa83b701381b3f67373ecd3e35d151"><td class="mdescLeft"> </td><td class="mdescRight">Copy the Hoeffding tree model from the given other model. <a href="#a27aa83b701381b3f67373ecd3e35d151">More...</a><br /></td></tr>
|
|
<tr class="separator:a27aa83b701381b3f67373ecd3e35d151"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2af4cb992f2b1c32571a3ad30ed78eae"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html">HoeffdingTreeModel</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#a2af4cb992f2b1c32571a3ad30ed78eae">operator=</a> (<a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html">HoeffdingTreeModel</a> &&other)</td></tr>
|
|
<tr class="memdesc:a2af4cb992f2b1c32571a3ad30ed78eae"><td class="mdescLeft"> </td><td class="mdescRight">Move the Hoeffding tree model from the given other model. <a href="#a2af4cb992f2b1c32571a3ad30ed78eae">More...</a><br /></td></tr>
|
|
<tr class="separator:a2af4cb992f2b1c32571a3ad30ed78eae"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac47d426fc446eb3cdac675083ab7842f"><td class="memTemplParams" colspan="2">template<typename Archive > </td></tr>
|
|
<tr class="memitem:ac47d426fc446eb3cdac675083ab7842f"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ac47d426fc446eb3cdac675083ab7842f">Serialize</a> (Archive &ar, const unsigned int)</td></tr>
|
|
<tr class="memdesc:ac47d426fc446eb3cdac675083ab7842f"><td class="mdescLeft"> </td><td class="mdescRight">Serialize the model. <a href="#ac47d426fc446eb3cdac675083ab7842f">More...</a><br /></td></tr>
|
|
<tr class="separator:ac47d426fc446eb3cdac675083ab7842f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aeca10014b68a500247ed25bb7cb1baa7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#aeca10014b68a500247ed25bb7cb1baa7">Train</a> (const arma::mat &dataset, const arma::Row< size_t > &labels, const bool batchTraining)</td></tr>
|
|
<tr class="memdesc:aeca10014b68a500247ed25bb7cb1baa7"><td class="mdescLeft"> </td><td class="mdescRight">Train in streaming mode on the given dataset. <a href="#aeca10014b68a500247ed25bb7cb1baa7">More...</a><br /></td></tr>
|
|
<tr class="separator:aeca10014b68a500247ed25bb7cb1baa7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
|
|
Private Attributes</h2></td></tr>
|
|
<tr class="memitem:adbebc8f36de2a9fcdc4c9b86343c8264"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#aa7266b045d09aa8f036df5db31495445">GiniBinaryTreeType</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#adbebc8f36de2a9fcdc4c9b86343c8264">giniBinaryTree</a></td></tr>
|
|
<tr class="memdesc:adbebc8f36de2a9fcdc4c9b86343c8264"><td class="mdescLeft"> </td><td class="mdescRight">This is used if we are using the Gini impurity and the binary numeric split. <a href="#adbebc8f36de2a9fcdc4c9b86343c8264">More...</a><br /></td></tr>
|
|
<tr class="separator:adbebc8f36de2a9fcdc4c9b86343c8264"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a123c95574967ac5a081e570def2fd5a8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#aa34a313eef873151ebad30a6b4524c1a">GiniHoeffdingTreeType</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#a123c95574967ac5a081e570def2fd5a8">giniHoeffdingTree</a></td></tr>
|
|
<tr class="memdesc:a123c95574967ac5a081e570def2fd5a8"><td class="mdescLeft"> </td><td class="mdescRight">This is used if we are using the Gini impurity and the Hoeffding numeric split. <a href="#a123c95574967ac5a081e570def2fd5a8">More...</a><br /></td></tr>
|
|
<tr class="separator:a123c95574967ac5a081e570def2fd5a8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8728209e072bfde23cc974168c4d9f61"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ac37ace0bacc02d33311f3adae2645437">InfoBinaryTreeType</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#a8728209e072bfde23cc974168c4d9f61">infoBinaryTree</a></td></tr>
|
|
<tr class="memdesc:a8728209e072bfde23cc974168c4d9f61"><td class="mdescLeft"> </td><td class="mdescRight">This is used if we are using the information gain and the binary numeric split. <a href="#a8728209e072bfde23cc974168c4d9f61">More...</a><br /></td></tr>
|
|
<tr class="separator:a8728209e072bfde23cc974168c4d9f61"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a39d01b9a1c47cd399a9060c65d2e508d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#aa5fb55931696090698cdfdabcbecbd7c">InfoHoeffdingTreeType</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#a39d01b9a1c47cd399a9060c65d2e508d">infoHoeffdingTree</a></td></tr>
|
|
<tr class="memdesc:a39d01b9a1c47cd399a9060c65d2e508d"><td class="mdescLeft"> </td><td class="mdescRight">This is used if we are using the information gain and the Hoeffding numeric split. <a href="#a39d01b9a1c47cd399a9060c65d2e508d">More...</a><br /></td></tr>
|
|
<tr class="separator:a39d01b9a1c47cd399a9060c65d2e508d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac5fdfa6e1ec4df537465e97152a322aa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ad7a5b513f01fee699b545686b5fed500">TreeType</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ac5fdfa6e1ec4df537465e97152a322aa">type</a></td></tr>
|
|
<tr class="memdesc:ac5fdfa6e1ec4df537465e97152a322aa"><td class="mdescLeft"> </td><td class="mdescRight">The type of tree we are using. <a href="#ac5fdfa6e1ec4df537465e97152a322aa">More...</a><br /></td></tr>
|
|
<tr class="separator:ac5fdfa6e1ec4df537465e97152a322aa"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>This class is a serializable Hoeffding tree model that can hold four different types of Hoeffding trees. </p>
|
|
<p>It is meant to be used by the command-line program for Hoeffding trees. </p>
|
|
|
|
<p>Definition at line <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00022">22</a> of file <a class="el" href="hoeffding__tree__model_8hpp_source.html">hoeffding_tree_model.hpp</a>.</p>
|
|
</div><h2 class="groupheader">Member Typedef Documentation</h2>
|
|
<a class="anchor" id="aa7266b045d09aa8f036df5db31495445"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTree.html">HoeffdingTree</a><<a class="el" href="classmlpack_1_1tree_1_1GiniImpurity.html">GiniImpurity</a>, <a class="el" href="namespacemlpack_1_1tree.html#aee8064e063faf98870a4a5d4c2a0c46f">BinaryDoubleNumericSplit</a>, <a class="el" href="classmlpack_1_1tree_1_1HoeffdingCategoricalSplit.html">HoeffdingCategoricalSplit</a>> <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#aa7266b045d09aa8f036df5db31495445">mlpack::tree::HoeffdingTreeModel::GiniBinaryTreeType</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Convenience typedef for GINI_BINARY tree type. </p>
|
|
|
|
<p>Definition at line <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00039">39</a> of file <a class="el" href="hoeffding__tree__model_8hpp_source.html">hoeffding_tree_model.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aa34a313eef873151ebad30a6b4524c1a"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTree.html">HoeffdingTree</a><<a class="el" href="classmlpack_1_1tree_1_1GiniImpurity.html">GiniImpurity</a>, <a class="el" href="namespacemlpack_1_1tree.html#a20fda6c6aece9c58c011ffea7e123378">HoeffdingDoubleNumericSplit</a>, <a class="el" href="classmlpack_1_1tree_1_1HoeffdingCategoricalSplit.html">HoeffdingCategoricalSplit</a>> <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#aa34a313eef873151ebad30a6b4524c1a">mlpack::tree::HoeffdingTreeModel::GiniHoeffdingTreeType</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Convenience typedef for GINI_HOEFFDING tree type. </p>
|
|
|
|
<p>Definition at line <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00036">36</a> of file <a class="el" href="hoeffding__tree__model_8hpp_source.html">hoeffding_tree_model.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ac37ace0bacc02d33311f3adae2645437"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTree.html">HoeffdingTree</a><<a class="el" href="classmlpack_1_1tree_1_1InformationGain.html">InformationGain</a>, <a class="el" href="namespacemlpack_1_1tree.html#aee8064e063faf98870a4a5d4c2a0c46f">BinaryDoubleNumericSplit</a>, <a class="el" href="classmlpack_1_1tree_1_1HoeffdingCategoricalSplit.html">HoeffdingCategoricalSplit</a>> <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ac37ace0bacc02d33311f3adae2645437">mlpack::tree::HoeffdingTreeModel::InfoBinaryTreeType</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Convenience typedef for INFO_BINARY tree type. </p>
|
|
|
|
<p>Definition at line <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00045">45</a> of file <a class="el" href="hoeffding__tree__model_8hpp_source.html">hoeffding_tree_model.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aa5fb55931696090698cdfdabcbecbd7c"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTree.html">HoeffdingTree</a><<a class="el" href="classmlpack_1_1tree_1_1InformationGain.html">InformationGain</a>, <a class="el" href="namespacemlpack_1_1tree.html#a20fda6c6aece9c58c011ffea7e123378">HoeffdingDoubleNumericSplit</a>, <a class="el" href="classmlpack_1_1tree_1_1HoeffdingCategoricalSplit.html">HoeffdingCategoricalSplit</a>> <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#aa5fb55931696090698cdfdabcbecbd7c">mlpack::tree::HoeffdingTreeModel::InfoHoeffdingTreeType</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Convenience typedef for INFO_HOEFFDING tree type. </p>
|
|
|
|
<p>Definition at line <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00042">42</a> of file <a class="el" href="hoeffding__tree__model_8hpp_source.html">hoeffding_tree_model.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Enumeration Documentation</h2>
|
|
<a class="anchor" id="ad7a5b513f01fee699b545686b5fed500"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">enum <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ad7a5b513f01fee699b545686b5fed500">mlpack::tree::HoeffdingTreeModel::TreeType</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This enumerates the four types of trees we can hold. </p>
|
|
<table class="fieldtable">
|
|
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="ad7a5b513f01fee699b545686b5fed500a60dcc79ce1b3fbb1d3b8f6096fcb310a"></a>GINI_HOEFFDING </td><td class="fielddoc">
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a class="anchor" id="ad7a5b513f01fee699b545686b5fed500ad0a0e15a5b6e00a0b7ac22785a30398e"></a>GINI_BINARY </td><td class="fielddoc">
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a class="anchor" id="ad7a5b513f01fee699b545686b5fed500a02abed954e021b5b7841f00178081fc2"></a>INFO_HOEFFDING </td><td class="fielddoc">
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a class="anchor" id="ad7a5b513f01fee699b545686b5fed500a9f094dca949beadd5187e31a4612da42"></a>INFO_BINARY </td><td class="fielddoc">
|
|
</td></tr>
|
|
</table>
|
|
|
|
<p>Definition at line <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00026">26</a> of file <a class="el" href="hoeffding__tree__model_8hpp_source.html">hoeffding_tree_model.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a class="anchor" id="a457befee70999a7d1bb2be7f5a917b36"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">mlpack::tree::HoeffdingTreeModel::HoeffdingTreeModel </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ad7a5b513f01fee699b545686b5fed500">TreeType</a> & </td>
|
|
<td class="paramname"><em>type</em> = <code><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ad7a5b513f01fee699b545686b5fed500a60dcc79ce1b3fbb1d3b8f6096fcb310a">GINI_HOEFFDING</a></code></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Construct the Hoeffding tree model, but don't initialize any tree. </p>
|
|
<p>Be sure to call <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#aeca10014b68a500247ed25bb7cb1baa7" title="Train in streaming mode on the given dataset. ">Train()</a> before doing anything with the model!</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">type</td><td>Type of tree that will be used. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aa1cf05ba915197777b18da0eebc2a964"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">mlpack::tree::HoeffdingTreeModel::HoeffdingTreeModel </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html">HoeffdingTreeModel</a> & </td>
|
|
<td class="paramname"><em>other</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Copy the Hoeffding tree model from the given other model. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">other</td><td>Hoeffding tree model to copy. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ad47d0f57ae28a5e17b4dfd9fa5f393e2"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">mlpack::tree::HoeffdingTreeModel::HoeffdingTreeModel </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html">HoeffdingTreeModel</a> && </td>
|
|
<td class="paramname"><em>other</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Move the Hoeffding tree model from the given other model. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">other</td><td>Hoeffding tree model to move. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a4a2c214d9433e334f1c64e82dab0a7ea"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">mlpack::tree::HoeffdingTreeModel::~HoeffdingTreeModel </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Clean up the given model. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a class="anchor" id="a918f490ff31829c1aec521a452693b02"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void mlpack::tree::HoeffdingTreeModel::BuildModel </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const arma::mat & </td>
|
|
<td class="paramname"><em>dataset</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="namespacemlpack_1_1data.html#a78dcb1509876d801331776f0b895cffb">data::DatasetInfo</a> & </td>
|
|
<td class="paramname"><em>datasetInfo</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const arma::Row< size_t > & </td>
|
|
<td class="paramname"><em>labels</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const size_t </td>
|
|
<td class="paramname"><em>numClasses</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const bool </td>
|
|
<td class="paramname"><em>batchTraining</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const double </td>
|
|
<td class="paramname"><em>successProbability</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const size_t </td>
|
|
<td class="paramname"><em>maxSamples</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const size_t </td>
|
|
<td class="paramname"><em>checkInterval</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const size_t </td>
|
|
<td class="paramname"><em>minSamples</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const size_t </td>
|
|
<td class="paramname"><em>bins</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const size_t </td>
|
|
<td class="paramname"><em>observationsBeforeBinning</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Train the model on the given dataset with the given labels. </p>
|
|
<p>This method just passes to the appropriate HoeffdingTree<...> constructor, and will train with one pass over the dataset.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">dataset</td><td>Dataset to train on. </td></tr>
|
|
<tr><td class="paramname">datasetInfo</td><td>Information about dimensions of dataset. </td></tr>
|
|
<tr><td class="paramname">labels</td><td>Labels for training set. </td></tr>
|
|
<tr><td class="paramname">numClasses</td><td>Number of classes in dataset. </td></tr>
|
|
<tr><td class="paramname">batchTraining</td><td>Whether or not to train in batch. </td></tr>
|
|
<tr><td class="paramname">successProbability</td><td>Probability of success required in Hoeffding bound before a split can happen. </td></tr>
|
|
<tr><td class="paramname">maxSamples</td><td>Maximum number of samples before a split is forced. </td></tr>
|
|
<tr><td class="paramname">checkInterval</td><td>Number of samples required before each split check. </td></tr>
|
|
<tr><td class="paramname">minSamples</td><td>If the node has seen this many points or fewer, no split will be allowed. </td></tr>
|
|
<tr><td class="paramname">bins</td><td>Number of bins, for Hoeffding numeric split. </td></tr>
|
|
<tr><td class="paramname">observationsBeforeBinning</td><td>Number of observations before binning, for Hoeffding numeric split. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ac3adc68c00cdd7c1483f261aca1a664e"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void mlpack::tree::HoeffdingTreeModel::Classify </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const arma::mat & </td>
|
|
<td class="paramname"><em>dataset</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">arma::Row< size_t > & </td>
|
|
<td class="paramname"><em>predictions</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Using the model, classify the given test points. </p>
|
|
<p>Be sure that <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#a918f490ff31829c1aec521a452693b02" title="Train the model on the given dataset with the given labels. ">BuildModel()</a> has been called first!</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">dataset</td><td>Dataset to classify. </td></tr>
|
|
<tr><td class="paramname">predictions</td><td>Vector to store predictions for test points in. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a276398537c38595e7d8cb4beb14e2f0a"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void mlpack::tree::HoeffdingTreeModel::Classify </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const arma::mat & </td>
|
|
<td class="paramname"><em>dataset</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">arma::Row< size_t > & </td>
|
|
<td class="paramname"><em>predictions</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">arma::rowvec & </td>
|
|
<td class="paramname"><em>probabilities</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Using the model, classify the given test points, returning class probabilities. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">dataset</td><td>Dataset to classify. </td></tr>
|
|
<tr><td class="paramname">predictions</td><td>Vector to store predictions for test points in. </td></tr>
|
|
<tr><td class="paramname">probabilities</td><td>Vector to store probabilities for test points in. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ab4eef4ffae93a14308f6a7769263c838"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">size_t mlpack::tree::HoeffdingTreeModel::NumNodes </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the number of nodes in the tree. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a27aa83b701381b3f67373ecd3e35d151"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html">HoeffdingTreeModel</a>& mlpack::tree::HoeffdingTreeModel::operator= </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html">HoeffdingTreeModel</a> & </td>
|
|
<td class="paramname"><em>other</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Copy the Hoeffding tree model from the given other model. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">other</td><td>Hoeffding tree model to copy. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a2af4cb992f2b1c32571a3ad30ed78eae"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html">HoeffdingTreeModel</a>& mlpack::tree::HoeffdingTreeModel::operator= </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html">HoeffdingTreeModel</a> && </td>
|
|
<td class="paramname"><em>other</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Move the Hoeffding tree model from the given other model. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">other</td><td>Hoeffding tree model to move. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ac47d426fc446eb3cdac675083ab7842f"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename Archive > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void mlpack::tree::HoeffdingTreeModel::Serialize </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Archive & </td>
|
|
<td class="paramname"><em>ar</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const unsigned </td>
|
|
<td class="paramname"><em>int</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Serialize the model. </p>
|
|
|
|
<p>Definition at line <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00164">164</a> of file <a class="el" href="hoeffding__tree__model_8hpp_source.html">hoeffding_tree_model.hpp</a>.</p>
|
|
|
|
<p>References <a class="el" href="serialization__shim_8hpp_source.html#l00094">mlpack::data::CreateNVP()</a>, <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00029">GINI_BINARY</a>, <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00028">GINI_HOEFFDING</a>, <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00224">giniBinaryTree</a>, <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00220">giniHoeffdingTree</a>, <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00031">INFO_BINARY</a>, <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00030">INFO_HOEFFDING</a>, <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00232">infoBinaryTree</a>, <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00228">infoHoeffdingTree</a>, and <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00216">type</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aeca10014b68a500247ed25bb7cb1baa7"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void mlpack::tree::HoeffdingTreeModel::Train </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const arma::mat & </td>
|
|
<td class="paramname"><em>dataset</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const arma::Row< size_t > & </td>
|
|
<td class="paramname"><em>labels</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const bool </td>
|
|
<td class="paramname"><em>batchTraining</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Train in streaming mode on the given dataset. </p>
|
|
<p>This takes one pass. Be sure that <a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#a918f490ff31829c1aec521a452693b02" title="Train the model on the given dataset with the given labels. ">BuildModel()</a> has been called first!</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">dataset</td><td>Dataset to train on. </td></tr>
|
|
<tr><td class="paramname">labels</td><td>Labels for training set. </td></tr>
|
|
<tr><td class="paramname">batchTraining</td><td>Whether or not to train in batch. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Data Documentation</h2>
|
|
<a class="anchor" id="adbebc8f36de2a9fcdc4c9b86343c8264"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#aa7266b045d09aa8f036df5db31495445">GiniBinaryTreeType</a>* mlpack::tree::HoeffdingTreeModel::giniBinaryTree</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is used if we are using the Gini impurity and the binary numeric split. </p>
|
|
|
|
<p>Definition at line <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00224">224</a> of file <a class="el" href="hoeffding__tree__model_8hpp_source.html">hoeffding_tree_model.hpp</a>.</p>
|
|
|
|
<p>Referenced by <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00164">Serialize()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a123c95574967ac5a081e570def2fd5a8"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#aa34a313eef873151ebad30a6b4524c1a">GiniHoeffdingTreeType</a>* mlpack::tree::HoeffdingTreeModel::giniHoeffdingTree</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is used if we are using the Gini impurity and the Hoeffding numeric split. </p>
|
|
|
|
<p>Definition at line <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00220">220</a> of file <a class="el" href="hoeffding__tree__model_8hpp_source.html">hoeffding_tree_model.hpp</a>.</p>
|
|
|
|
<p>Referenced by <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00164">Serialize()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a8728209e072bfde23cc974168c4d9f61"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ac37ace0bacc02d33311f3adae2645437">InfoBinaryTreeType</a>* mlpack::tree::HoeffdingTreeModel::infoBinaryTree</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is used if we are using the information gain and the binary numeric split. </p>
|
|
|
|
<p>Definition at line <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00232">232</a> of file <a class="el" href="hoeffding__tree__model_8hpp_source.html">hoeffding_tree_model.hpp</a>.</p>
|
|
|
|
<p>Referenced by <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00164">Serialize()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a39d01b9a1c47cd399a9060c65d2e508d"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#aa5fb55931696090698cdfdabcbecbd7c">InfoHoeffdingTreeType</a>* mlpack::tree::HoeffdingTreeModel::infoHoeffdingTree</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is used if we are using the information gain and the Hoeffding numeric split. </p>
|
|
|
|
<p>Definition at line <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00228">228</a> of file <a class="el" href="hoeffding__tree__model_8hpp_source.html">hoeffding_tree_model.hpp</a>.</p>
|
|
|
|
<p>Referenced by <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00164">Serialize()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ac5fdfa6e1ec4df537465e97152a322aa"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classmlpack_1_1tree_1_1HoeffdingTreeModel.html#ad7a5b513f01fee699b545686b5fed500">TreeType</a> mlpack::tree::HoeffdingTreeModel::type</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The type of tree we are using. </p>
|
|
|
|
<p>Definition at line <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00216">216</a> of file <a class="el" href="hoeffding__tree__model_8hpp_source.html">hoeffding_tree_model.hpp</a>.</p>
|
|
|
|
<p>Referenced by <a class="el" href="hoeffding__tree__model_8hpp_source.html#l00164">Serialize()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
|
<li>src/mlpack/methods/hoeffding_trees/<a class="el" href="hoeffding__tree__model_8hpp_source.html">hoeffding_tree_model.hpp</a></li>
|
|
</ul>
|
|
</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>
|