<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.14">
  <compounddef id="forest_8h" kind="file" language="C++">
    <compoundname>forest.h</compoundname>
    <includes refid="global_8h" local="yes">./global.h</includes>
    <includes local="yes">./util/serialization/basics.h</includes>
    <includes local="no">fstream</includes>
    <includes local="no">functional</includes>
    <includes local="no">memory</includes>
    <includes local="no">string</includes>
    <includes local="no">vector</includes>
    <includes refid="idataprovider_8h" local="yes">./data_providers/idataprovider.h</includes>
    <includes refid="fastdecider_8h" local="yes">./deciders/fastdecider.h</includes>
    <includes refid="classificationleaf_8h" local="yes">./leafs/classificationleaf.h</includes>
    <includes refid="fastclassopt_8h" local="yes">./threshold_optimizers/fastclassopt.h</includes>
    <includes refid="tree_8h" local="yes">./tree.h</includes>
    <includes refid="types_8h" local="yes">./types.h</includes>
    <includes refid="ctpl_8h" local="yes">./util/threading/ctpl.h</includes>
    <includedby refid="forpy_8h" local="yes">/Users/classner/git/forpy/include/forpy/forpy.h</includedby>
    <incdepgraph>
      <node id="266">
        <label>atomic</label>
      </node>
      <node id="230">
        <label>functional</label>
      </node>
      <node id="222">
        <label>iomanip</label>
      </node>
      <node id="273">
        <label>queue</label>
      </node>
      <node id="258">
        <label>../util/checks.h</label>
        <link refid="checks_8h"/>
        <childnode refid="259" relation="include">
        </childnode>
        <childnode refid="230" relation="include">
        </childnode>
        <childnode refid="246" relation="include">
        </childnode>
        <childnode refid="260" relation="include">
        </childnode>
        <childnode refid="232" relation="include">
        </childnode>
        <childnode refid="220" relation="include">
        </childnode>
      </node>
      <node id="246">
        <label>limits</label>
      </node>
      <node id="250">
        <label>../threshold_optimizers/ithreshopt.h</label>
        <link refid="ithreshopt_8h"/>
        <childnode refid="220" relation="include">
        </childnode>
        <childnode refid="234" relation="include">
        </childnode>
        <childnode refid="233" relation="include">
        </childnode>
        <childnode refid="235" relation="include">
        </childnode>
        <childnode refid="248" relation="include">
        </childnode>
      </node>
      <node id="243">
        <label>mapbox/variant_cast.hpp</label>
      </node>
      <node id="221">
        <label>glog/logging.h</label>
      </node>
      <node id="263">
        <label>./classification_opt.h</label>
        <link refid="classification__opt_8h"/>
        <childnode refid="220" relation="include">
        </childnode>
        <childnode refid="234" relation="include">
        </childnode>
        <childnode refid="256" relation="include">
        </childnode>
        <childnode refid="264" relation="include">
        </childnode>
        <childnode refid="235" relation="include">
        </childnode>
        <childnode refid="248" relation="include">
        </childnode>
        <childnode refid="250" relation="include">
        </childnode>
      </node>
      <node id="269">
        <label>./data_providers/fastdprov.h</label>
        <link refid="fastdprov_8h"/>
        <childnode refid="230" relation="include">
        </childnode>
        <childnode refid="232" relation="include">
        </childnode>
        <childnode refid="220" relation="include">
        </childnode>
        <childnode refid="235" relation="include">
        </childnode>
        <childnode refid="258" relation="include">
        </childnode>
        <childnode refid="233" relation="include">
        </childnode>
      </node>
      <node id="249">
        <label>./idecider.h</label>
        <link refid="idecider_8h"/>
        <childnode refid="220" relation="include">
        </childnode>
        <childnode refid="234" relation="include">
        </childnode>
        <childnode refid="246" relation="include">
        </childnode>
        <childnode refid="239" relation="include">
        </childnode>
        <childnode refid="232" relation="include">
        </childnode>
        <childnode refid="233" relation="include">
        </childnode>
        <childnode refid="250" relation="include">
        </childnode>
        <childnode refid="235" relation="include">
        </childnode>
        <childnode refid="248" relation="include">
        </childnode>
      </node>
      <node id="262">
        <label>cmath</label>
      </node>
      <node id="238">
        <label>numeric</label>
      </node>
      <node id="255">
        <label>./threshold_optimizers/fastclassopt.h</label>
        <link refid="fastclassopt_8h"/>
        <childnode refid="220" relation="include">
        </childnode>
        <childnode refid="234" relation="include">
        </childnode>
        <childnode refid="256" relation="include">
        </childnode>
        <childnode refid="257" relation="include">
        </childnode>
        <childnode refid="235" relation="include">
        </childnode>
        <childnode refid="248" relation="include">
        </childnode>
        <childnode refid="263" relation="include">
        </childnode>
        <childnode refid="250" relation="include">
        </childnode>
      </node>
      <node id="226">
        <label>string</label>
      </node>
      <node id="225">
        <label>./version.h</label>
        <link refid="version_8h"/>
      </node>
      <node id="237">
        <label>map</label>
      </node>
      <node id="248">
        <label>../util/desk.h</label>
        <link refid="desk_8h"/>
        <childnode refid="220" relation="include">
        </childnode>
        <childnode refid="235" relation="include">
        </childnode>
      </node>
      <node id="265">
        <label>./tree.h</label>
        <link refid="tree_8h"/>
        <childnode refid="220" relation="include">
        </childnode>
        <childnode refid="228" relation="include">
        </childnode>
        <childnode refid="266" relation="include">
        </childnode>
        <childnode refid="229" relation="include">
        </childnode>
        <childnode refid="267" relation="include">
        </childnode>
        <childnode refid="243" relation="include">
        </childnode>
        <childnode refid="231" relation="include">
        </childnode>
        <childnode refid="226" relation="include">
        </childnode>
        <childnode refid="268" relation="include">
        </childnode>
        <childnode refid="239" relation="include">
        </childnode>
        <childnode refid="232" relation="include">
        </childnode>
        <childnode refid="269" relation="include">
        </childnode>
        <childnode refid="233" relation="include">
        </childnode>
        <childnode refid="249" relation="include">
        </childnode>
        <childnode refid="254" relation="include">
        </childnode>
        <childnode refid="235" relation="include">
        </childnode>
        <childnode refid="248" relation="include">
        </childnode>
      </node>
      <node id="271">
        <label>exception</label>
      </node>
      <node id="251">
        <label>./leafs/classificationleaf.h</label>
        <link refid="classificationleaf_8h"/>
        <childnode refid="220" relation="include">
        </childnode>
        <childnode refid="234" relation="include">
        </childnode>
        <childnode refid="238" relation="include">
        </childnode>
        <childnode refid="232" relation="include">
        </childnode>
        <childnode refid="233" relation="include">
        </childnode>
        <childnode refid="235" relation="include">
        </childnode>
        <childnode refid="252" relation="include">
        </childnode>
        <childnode refid="253" relation="include">
        </childnode>
        <childnode refid="242" relation="include">
        </childnode>
        <childnode refid="254" relation="include">
        </childnode>
      </node>
      <node id="229">
        <label>fstream</label>
      </node>
      <node id="240">
        <label>./util/hash.h</label>
        <link refid="hash_8h"/>
        <childnode refid="241" relation="include">
        </childnode>
        <childnode refid="232" relation="include">
        </childnode>
      </node>
      <node id="236">
        <label>Eigen/Dense</label>
      </node>
      <node id="257">
        <label>../impurities/shannonentropy.h</label>
        <link refid="shannonentropy_8h"/>
        <childnode refid="220" relation="include">
        </childnode>
        <childnode refid="234" relation="include">
        </childnode>
        <childnode refid="238" relation="include">
        </childnode>
        <childnode refid="232" relation="include">
        </childnode>
        <childnode refid="235" relation="include">
        </childnode>
        <childnode refid="258" relation="include">
        </childnode>
        <childnode refid="261" relation="include">
        </childnode>
        <childnode refid="256" relation="include">
        </childnode>
      </node>
      <node id="247">
        <label>typeinfo</label>
      </node>
      <node id="268">
        <label>tuple</label>
      </node>
      <node id="267">
        <label>future</label>
      </node>
      <node id="256">
        <label>../impurities/ientropyfunction.h</label>
        <link refid="ientropyfunction_8h"/>
        <childnode refid="220" relation="include">
        </childnode>
        <childnode refid="234" relation="include">
        </childnode>
        <childnode refid="232" relation="include">
        </childnode>
        <childnode refid="235" relation="include">
        </childnode>
      </node>
      <node id="219">
        <label>/Users/classner/git/forpy/include/forpy/forest.h</label>
        <link refid="forest_8h"/>
        <childnode refid="220" relation="include">
        </childnode>
        <childnode refid="228" relation="include">
        </childnode>
        <childnode refid="229" relation="include">
        </childnode>
        <childnode refid="230" relation="include">
        </childnode>
        <childnode refid="231" relation="include">
        </childnode>
        <childnode refid="226" relation="include">
        </childnode>
        <childnode refid="232" relation="include">
        </childnode>
        <childnode refid="233" relation="include">
        </childnode>
        <childnode refid="245" relation="include">
        </childnode>
        <childnode refid="251" relation="include">
        </childnode>
        <childnode refid="255" relation="include">
        </childnode>
        <childnode refid="265" relation="include">
        </childnode>
        <childnode refid="235" relation="include">
        </childnode>
        <childnode refid="270" relation="include">
        </childnode>
      </node>
      <node id="233">
        <label>./data_providers/idataprovider.h</label>
        <link refid="idataprovider_8h"/>
        <childnode refid="220" relation="include">
        </childnode>
        <childnode refid="234" relation="include">
        </childnode>
        <childnode refid="230" relation="include">
        </childnode>
        <childnode refid="232" relation="include">
        </childnode>
        <childnode refid="235" relation="include">
        </childnode>
        <childnode refid="242" relation="include">
        </childnode>
      </node>
      <node id="242">
        <label>./util/storage.h</label>
        <link refid="storage_8h"/>
        <childnode refid="243" relation="include">
        </childnode>
        <childnode refid="244" relation="include">
        </childnode>
      </node>
      <node id="232">
        <label>vector</label>
      </node>
      <node id="239">
        <label>utility</label>
      </node>
      <node id="234">
        <label>../util/serialization/basics.h</label>
      </node>
      <node id="261">
        <label>../util/exponentials.h</label>
        <link refid="exponentials_8h"/>
        <childnode refid="262" relation="include">
        </childnode>
        <childnode refid="220" relation="include">
        </childnode>
      </node>
      <node id="264">
        <label>../impurities/inducedentropy.h</label>
        <link refid="inducedentropy_8h"/>
        <childnode refid="234" relation="include">
        </childnode>
        <childnode refid="246" relation="include">
        </childnode>
        <childnode refid="232" relation="include">
        </childnode>
        <childnode refid="220" relation="include">
        </childnode>
        <childnode refid="258" relation="include">
        </childnode>
        <childnode refid="261" relation="include">
        </childnode>
        <childnode refid="256" relation="include">
        </childnode>
      </node>
      <node id="223">
        <label>iostream</label>
      </node>
      <node id="220">
        <label>./global.h</label>
        <link refid="global_8h"/>
        <childnode refid="221" relation="include">
        </childnode>
        <childnode refid="222" relation="include">
        </childnode>
        <childnode refid="223" relation="include">
        </childnode>
        <childnode refid="224" relation="include">
        </childnode>
        <childnode refid="225" relation="include">
        </childnode>
        <childnode refid="226" relation="include">
        </childnode>
        <childnode refid="227" relation="include">
        </childnode>
      </node>
      <node id="241">
        <label>cstddef</label>
      </node>
      <node id="253">
        <label>../util/serialization/serialization.h</label>
      </node>
      <node id="254">
        <label>./ileaf.h</label>
        <link refid="ileaf_8h"/>
        <childnode refid="220" relation="include">
        </childnode>
        <childnode refid="234" relation="include">
        </childnode>
        <childnode refid="232" relation="include">
        </childnode>
        <childnode refid="233" relation="include">
        </childnode>
        <childnode refid="250" relation="include">
        </childnode>
        <childnode refid="235" relation="include">
        </childnode>
      </node>
      <node id="272">
        <label>mutex</label>
      </node>
      <node id="227">
        <label>csignal</label>
      </node>
      <node id="224">
        <label>thread</label>
      </node>
      <node id="260">
        <label>type_traits</label>
      </node>
      <node id="235">
        <label>../types.h</label>
        <link refid="types_8h"/>
        <childnode refid="236" relation="include">
        </childnode>
        <childnode refid="237" relation="include">
        </childnode>
        <childnode refid="231" relation="include">
        </childnode>
        <childnode refid="238" relation="include">
        </childnode>
        <childnode refid="239" relation="include">
        </childnode>
        <childnode refid="232" relation="include">
        </childnode>
        <childnode refid="240" relation="include">
        </childnode>
        <childnode refid="242" relation="include">
        </childnode>
      </node>
      <node id="244">
        <label>./serialization/variant.h</label>
      </node>
      <node id="228">
        <label>./util/serialization/basics.h</label>
      </node>
      <node id="259">
        <label>algorithm</label>
      </node>
      <node id="245">
        <label>./deciders/fastdecider.h</label>
        <link refid="fastdecider_8h"/>
        <childnode refid="220" relation="include">
        </childnode>
        <childnode refid="234" relation="include">
        </childnode>
        <childnode refid="246" relation="include">
        </childnode>
        <childnode refid="247" relation="include">
        </childnode>
        <childnode refid="239" relation="include">
        </childnode>
        <childnode refid="232" relation="include">
        </childnode>
        <childnode refid="235" relation="include">
        </childnode>
        <childnode refid="248" relation="include">
        </childnode>
        <childnode refid="242" relation="include">
        </childnode>
        <childnode refid="249" relation="include">
        </childnode>
      </node>
      <node id="252">
        <label>../util/serialization/eigen.h</label>
      </node>
      <node id="270">
        <label>./util/threading/ctpl.h</label>
        <link refid="ctpl_8h"/>
        <childnode refid="220" relation="include">
        </childnode>
        <childnode refid="266" relation="include">
        </childnode>
        <childnode refid="271" relation="include">
        </childnode>
        <childnode refid="230" relation="include">
        </childnode>
        <childnode refid="267" relation="include">
        </childnode>
        <childnode refid="231" relation="include">
        </childnode>
        <childnode refid="272" relation="include">
        </childnode>
        <childnode refid="273" relation="include">
        </childnode>
        <childnode refid="224" relation="include">
        </childnode>
        <childnode refid="232" relation="include">
        </childnode>
        <childnode refid="235" relation="include">
        </childnode>
        <childnode refid="248" relation="include">
        </childnode>
      </node>
      <node id="231">
        <label>memory</label>
      </node>
    </incdepgraph>
    <invincdepgraph>
      <node id="275">
        <label>/Users/classner/git/forpy/include/forpy/forpy.h</label>
        <link refid="forpy_8h"/>
      </node>
      <node id="274">
        <label>/Users/classner/git/forpy/include/forpy/forest.h</label>
        <link refid="forest_8h"/>
        <childnode refid="275" relation="include">
        </childnode>
      </node>
    </invincdepgraph>
    <innerclass refid="classforpy_1_1_forest" prot="public">forpy::Forest</innerclass>
    <innerclass refid="classforpy_1_1_classification_forest" prot="public">forpy::ClassificationForest</innerclass>
    <innerclass refid="classforpy_1_1_regression_forest" prot="public">forpy::RegressionForest</innerclass>
    <innernamespace refid="namespaceforpy">forpy</innernamespace>
      <sectiondef kind="define">
      <memberdef kind="define" id="forest_8h_1aad7b522d34f70b7eaaab53be0c841dca" prot="public" static="no">
        <name>FORPY_FOREST_H_</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/Users/classner/git/forpy/include/forpy/forest.h" line="4" column="9" bodyfile="/Users/classner/git/forpy/include/forpy/forest.h" bodystart="4" bodyend="-1"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*<sp/>Author:<sp/>Christoph<sp/>Lassner.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#pragma<sp/>once</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>FORPY_FOREST_H_</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4" refid="forest_8h_1aad7b522d34f70b7eaaab53be0c841dca" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>FORPY_FOREST_H_</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="global_8h" kindref="compound">./global.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;./util/serialization/basics.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="9"><highlight class="normal"></highlight></codeline>
<codeline lineno="10"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;fstream&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="11"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;functional&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="12"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;memory&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;string&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="14"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;vector&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="15"><highlight class="normal"></highlight></codeline>
<codeline lineno="16"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="idataprovider_8h" kindref="compound">./data_providers/idataprovider.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="17"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="fastdecider_8h" kindref="compound">./deciders/fastdecider.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="18"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="classificationleaf_8h" kindref="compound">./leafs/classificationleaf.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="19"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="fastclassopt_8h" kindref="compound">./threshold_optimizers/fastclassopt.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="tree_8h" kindref="compound">./tree.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="21"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="types_8h" kindref="compound">./types.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="22"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="ctpl_8h" kindref="compound">./util/threading/ctpl.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="23"><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal"><ref refid="namespaceforpy" kindref="compound">forpy</ref><sp/>{</highlight></codeline>
<codeline lineno="28" refid="classforpy_1_1_forest" refkind="compound"><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classforpy_1_1_forest" kindref="compound">Forest</ref><sp/>{</highlight></codeline>
<codeline lineno="29"><highlight class="normal"><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><ref refid="classforpy_1_1_forest_1aedfec5b8670f3f76a643574cf7cde15c" kindref="member">Forest</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;n_trees<sp/>=<sp/>10,</highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;max_depth<sp/>=<sp/>std::numeric_limits&lt;uint&gt;::max(),</highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;min_samples_at_leaf<sp/>=<sp/>1,</highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;min_samples_at_node<sp/>=<sp/>2,</highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::shared_ptr&lt;IDecider&gt;<sp/>&amp;decider_template<sp/>=<sp/></highlight><highlight class="keyword">nullptr</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::shared_ptr&lt;ILeaf&gt;<sp/>&amp;leaf_manager_template<sp/>=<sp/></highlight><highlight class="keyword">nullptr</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;<ref refid="classforpy_1_1_forest_1af46001e2d4aa46ed1ba7986945133ae6" kindref="member">random_seed</ref><sp/>=<sp/>1);</highlight></codeline>
<codeline lineno="53"><highlight class="normal"></highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><ref refid="classforpy_1_1_forest_1aedfec5b8670f3f76a643574cf7cde15c" kindref="member">Forest</ref>(std::vector&lt;std::shared_ptr&lt;Tree&gt;&gt;<sp/>&amp;<ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>);</highlight></codeline>
<codeline lineno="61"><highlight class="normal"></highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><ref refid="classforpy_1_1_forest_1aedfec5b8670f3f76a643574cf7cde15c" kindref="member">Forest</ref>(std::string<sp/>filename);</highlight></codeline>
<codeline lineno="69"><highlight class="normal"></highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><ref refid="classforpy_1_1_forest" kindref="compound">Forest</ref><sp/>*<ref refid="classforpy_1_1_forest_1a921dde74a71ab99e94117949ac9126a1" kindref="member">fit</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1a724d37691de11a57b50b9935b5550a89" kindref="member">Data&lt;MatCRef&gt;</ref><sp/>&amp;data_v,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1a724d37691de11a57b50b9935b5550a89" kindref="member">Data&lt;MatCRef&gt;</ref><sp/>&amp;annotation_v,</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>&amp;num_threads<sp/>=<sp/>1,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>&amp;bootstrap<sp/>=<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::vector&lt;float&gt;<sp/>&amp;weights<sp/>=<sp/>std::vector&lt;float&gt;());</highlight></codeline>
<codeline lineno="87"><highlight class="normal"></highlight></codeline>
<codeline lineno="94" refid="classforpy_1_1_forest_1a00157303fa85f51f93ed73666b74261f" refkind="member"><highlight class="normal"><sp/><sp/>std::vector&lt;size_t&gt;<sp/><ref refid="classforpy_1_1_forest_1a00157303fa85f51f93ed73666b74261f" kindref="member">get_depths</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/>std::vector&lt;size_t&gt;<sp/>result(<ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>.size());</highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>tree_id<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">auto</highlight><highlight class="normal"><sp/>&amp;tree_ptr<sp/>:<sp/><ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>)<sp/>{</highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>result[tree_id]<sp/>=<sp/>tree_ptr-&gt;get_depth();</highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tree_id++;</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="103"><highlight class="normal"></highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/><ref refid="classforpy_1_1_forest" kindref="compound">Forest</ref><sp/>*<ref refid="classforpy_1_1_forest_1ae84524c095dfa2c23501f4c96e4d8ab4" kindref="member">fit_dprov</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::shared_ptr&lt;IDataProvider&gt;<sp/>&amp;fdata_provider,</highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>&amp;bootstrap<sp/>=<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="117"><highlight class="normal"></highlight></codeline>
<codeline lineno="140" refid="classforpy_1_1_forest_1a5347f23789a3d1a6e89a5b3df37b47b5" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="namespaceforpy_1a724d37691de11a57b50b9935b5550a89" kindref="member">Data&lt;Mat&gt;</ref><sp/><ref refid="classforpy_1_1_forest_1a5347f23789a3d1a6e89a5b3df37b47b5" kindref="member">predict</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1a724d37691de11a57b50b9935b5550a89" kindref="member">Data&lt;MatCRef&gt;</ref><sp/>&amp;data_v,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>&amp;num_threads<sp/>=<sp/>1,</highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>&amp;use_fast_prediction_if_available<sp/>=<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>&amp;<ref refid="classforpy_1_1_forest_1a304fe941cebad325ca60b8bceb7ab2ab" kindref="member">predict_proba</ref><sp/>=<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(num_threads<sp/>==<sp/>0)</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forpy_exception" kindref="compound">ForpyException</ref>(</highlight><highlight class="stringliteral">&quot;The<sp/>number<sp/>of<sp/>threads<sp/>must<sp/>be<sp/>&gt;0!&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(num_threads<sp/>!=<sp/>1)<sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forpy_exception" kindref="compound">ForpyException</ref>(</highlight><highlight class="stringliteral">&quot;Unimplemented!&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/>std::vector&lt;Data&lt;Mat&gt;&gt;<sp/>results(0);</highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="namespaceforpy_1a36398396324079cc112b2c14d72ef20d" kindref="member">Vec&lt;float&gt;</ref><sp/>tree_weights(<ref refid="namespaceforpy_1a36398396324079cc112b2c14d72ef20d" kindref="member">Vec&lt;float&gt;::Zero</ref>(<ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>.size()));</highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/>results.reserve(<ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>.size());</highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>.size();<sp/>++i)<sp/>{</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>results.push_back(<ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>[i]-&gt;<ref refid="classforpy_1_1_forest_1a5347f23789a3d1a6e89a5b3df37b47b5" kindref="member">predict</ref>(</highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data_v,<sp/>1,<sp/>use_fast_prediction_if_available,<sp/><ref refid="classforpy_1_1_forest_1a304fe941cebad325ca60b8bceb7ab2ab" kindref="member">predict_proba</ref>,<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tree_weights(i)<sp/>=<sp/><ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>[i]-&gt;get_weight();</highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>[0]-&gt;combine_leaf_results(results,<sp/>tree_weights,<sp/><ref refid="classforpy_1_1_forest_1a304fe941cebad325ca60b8bceb7ab2ab" kindref="member">predict_proba</ref>);</highlight></codeline>
<codeline lineno="155"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="156"><highlight class="normal"></highlight></codeline>
<codeline lineno="158" refid="classforpy_1_1_forest_1a304fe941cebad325ca60b8bceb7ab2ab" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="namespaceforpy_1a724d37691de11a57b50b9935b5550a89" kindref="member">Data&lt;Mat&gt;</ref><sp/><ref refid="classforpy_1_1_forest_1a304fe941cebad325ca60b8bceb7ab2ab" kindref="member">predict_proba</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1a724d37691de11a57b50b9935b5550a89" kindref="member">Data&lt;MatCRef&gt;</ref><sp/>&amp;data_v,</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>&amp;num_threads<sp/>=<sp/>1,</highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>&amp;use_fast_prediction_if_available<sp/>=<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forest_1a5347f23789a3d1a6e89a5b3df37b47b5" kindref="member">predict</ref>(data_v,<sp/>num_threads,<sp/>use_fast_prediction_if_available,<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="163"><highlight class="normal"></highlight></codeline>
<codeline lineno="165" refid="classforpy_1_1_forest_1ab96fc7de460300b4969a8ba12526bf96" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forest_1ab96fc7de460300b4969a8ba12526bf96" kindref="member">get_input_data_dimensions</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>[0]-&gt;get_input_data_dimensions();</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="168"><highlight class="normal"></highlight></codeline>
<codeline lineno="170" refid="classforpy_1_1_forest_1ad3d1238b0a7591bf4ace2131d6d52f06" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/>std::shared_ptr&lt;const<sp/>IDecider&gt;<sp/><ref refid="classforpy_1_1_forest_1ad3d1238b0a7591bf4ace2131d6d52f06" kindref="member">get_decider</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>[0]-&gt;get_decider();</highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="173"><highlight class="normal"></highlight></codeline>
<codeline lineno="175" refid="classforpy_1_1_forest_1a3358c450c612d1a526052b2420e1ecf7" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/>std::vector&lt;std::shared_ptr&lt;Tree&gt;&gt;<sp/><ref refid="classforpy_1_1_forest_1a3358c450c612d1a526052b2420e1ecf7" kindref="member">get_trees</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>;<sp/>}</highlight></codeline>
<codeline lineno="176"><highlight class="normal"></highlight></codeline>
<codeline lineno="178" refid="classforpy_1_1_forest_1ae7d2aa97c0404e21210996f02c74c02b" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forest_1ae7d2aa97c0404e21210996f02c74c02b" kindref="member">enable_fast_prediction</ref>()<sp/>{</highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keyword">auto</highlight><highlight class="normal"><sp/>&amp;tree<sp/>:<sp/><ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>)<sp/>tree-&gt;enable_fast_prediction();</highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="181"><highlight class="normal"></highlight></codeline>
<codeline lineno="183" refid="classforpy_1_1_forest_1a6c711252c6ffc0754226623ddb321a14" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forest_1a6c711252c6ffc0754226623ddb321a14" kindref="member">disable_fast_prediction</ref>()<sp/>{</highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keyword">auto</highlight><highlight class="normal"><sp/>&amp;tree<sp/>:<sp/><ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>)<sp/>tree-&gt;disable_fast_prediction();</highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="186"><highlight class="normal"></highlight></codeline>
<codeline lineno="188" refid="classforpy_1_1_forest_1a0e8b80553e643ac3eb4de234bfa0dfe5" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/>std::shared_ptr&lt;const<sp/>ILeaf&gt;<sp/><ref refid="classforpy_1_1_forest_1a0e8b80553e643ac3eb4de234bfa0dfe5" kindref="member">get_leaf_manager</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>[0]-&gt;get_leaf_manager();</highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="191"><highlight class="normal"></highlight></codeline>
<codeline lineno="193" refid="classforpy_1_1_forest_1afaa517cf1c7bbf14bbc55ab3f757cd0e" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/>std::vector&lt;float&gt;<sp/><ref refid="classforpy_1_1_forest_1afaa517cf1c7bbf14bbc55ab3f757cd0e" kindref="member">get_tree_weights</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/><sp/><sp/>std::vector&lt;float&gt;<sp/>result(<ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>.size());</highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(std::size_t<sp/>tree_idx<sp/>=<sp/>0;<sp/>tree_idx<sp/>&lt;<sp/><ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>.size();<sp/>++tree_idx)<sp/>{</highlight></codeline>
<codeline lineno="196"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>result[tree_idx]<sp/>=<sp/><ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>.at(tree_idx)-&gt;get_weight();</highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="200"><highlight class="normal"></highlight></codeline>
<codeline lineno="202" refid="classforpy_1_1_forest_1a21aa3cff3a22fd0feffa7331fd3bda5a" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forest_1a21aa3cff3a22fd0feffa7331fd3bda5a" kindref="member">set_tree_weights</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::vector&lt;float&gt;<sp/>&amp;weights)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(weights.size()<sp/>!=<sp/><ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>.size())</highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forpy_exception" kindref="compound">ForpyException</ref>(</highlight><highlight class="stringliteral">&quot;Need<sp/>&quot;</highlight><highlight class="normal"><sp/>+<sp/>std::to_string(<ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>.size())<sp/>+</highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;<sp/>weights,<sp/>received<sp/>&quot;</highlight><highlight class="normal"><sp/>+</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::to_string(weights.size()));</highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(std::size_t<sp/>tree_idx<sp/>=<sp/>0;<sp/>tree_idx<sp/>&lt;<sp/><ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>.size();<sp/>++tree_idx)</highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>[tree_idx]-&gt;set_weight(weights[tree_idx]);</highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="210"><highlight class="normal"></highlight></codeline>
<codeline lineno="217"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forest_1a08772e8b9e5850140b39de064d23c805" kindref="member">save</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string<sp/>&amp;filename)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="218"><highlight class="normal"></highlight></codeline>
<codeline lineno="219" refid="classforpy_1_1_forest_1a064e5c9fdd1c9c8d439df7cac77c6f97" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forest_1a064e5c9fdd1c9c8d439df7cac77c6f97" kindref="member">operator==</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forest" kindref="compound">Forest</ref><sp/>&amp;rhs)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="220"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>.size()<sp/>!=<sp/>rhs.<ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>.size())<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>.size();<sp/>++i)<sp/>{</highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!(*(<ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>.at(i))<sp/>==<sp/>*(rhs.<ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>.at(i))))<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classforpy_1_1_forest_1af46001e2d4aa46ed1ba7986945133ae6" kindref="member">random_seed</ref><sp/>!=<sp/>rhs.<ref refid="classforpy_1_1_forest_1af46001e2d4aa46ed1ba7986945133ae6" kindref="member">random_seed</ref>)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="225"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="227"><highlight class="normal"></highlight></codeline>
<codeline lineno="228" refid="classforpy_1_1_forest_1a876fcf9d8d80ed02ee4f340d2567ece6" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">friend</highlight><highlight class="normal"><sp/>std::ostream<sp/>&amp;<ref refid="classforpy_1_1_forest_1a876fcf9d8d80ed02ee4f340d2567ece6" kindref="member">operator&lt;&lt;</ref>(std::ostream<sp/>&amp;stream,</highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forest" kindref="compound">Forest</ref><sp/>&amp;</highlight><highlight class="keyword">self</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/><sp/><sp/>stream<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;forpy::Forest[&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/></highlight><highlight class="keyword">self</highlight><highlight class="normal">.trees.size()<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;<sp/>trees]&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>stream;</highlight></codeline>
<codeline lineno="232" refid="classforpy_1_1_forest_1ab2f44cbb59a08132f4c843e5225bba0e" refkind="member"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="233"><highlight class="normal"></highlight></codeline>
<codeline lineno="234"><highlight class="normal"><sp/></highlight><highlight class="keyword">private</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="235"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">friend</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">cereal::access;</highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><sp/>&lt;</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Archive&gt;</highlight></codeline>
<codeline lineno="237" refid="classforpy_1_1_forest_1a84469d175fcc9100120a10eaa367a86e" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forest_1a84469d175fcc9100120a10eaa367a86e" kindref="member">serialize</ref>(Archive<sp/>&amp;ar,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;)<sp/>{</highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>To<sp/>make<sp/>this<sp/>work,<sp/>I<sp/>had<sp/>to<sp/>take<sp/>out<sp/>a<sp/>static<sp/>assertion<sp/>at<sp/>cereal.hpp,</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>at<sp/>least<sp/>for<sp/>clang.<sp/>Everything<sp/>works<sp/>as<sp/>expected<sp/>without<sp/>the<sp/>assertion</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>and<sp/>I<sp/>wouldn&apos;t<sp/>know<sp/>why<sp/>not.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/>ar(CEREAL_NVP(<ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>),<sp/>CEREAL_NVP(<ref refid="classforpy_1_1_forest_1af46001e2d4aa46ed1ba7986945133ae6" kindref="member">random_seed</ref>));</highlight></codeline>
<codeline lineno="242" refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" refkind="member"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="243"><highlight class="normal"></highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/>std::vector&lt;std::shared_ptr&lt;Tree&gt;&gt;<sp/><ref refid="classforpy_1_1_forest_1a6729d9158db3594237387a1fd5f4987c" kindref="member">trees</ref>;</highlight></codeline>
<codeline lineno="245" refid="classforpy_1_1_forest_1af46001e2d4aa46ed1ba7986945133ae6" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/><ref refid="classforpy_1_1_forest_1af46001e2d4aa46ed1ba7986945133ae6" kindref="member">random_seed</ref>;</highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/><ref refid="classforpy_1_1_forest_1a6b3ef5b2d2322eacebf1b6e1cf2a33fd" kindref="member">DISALLOW_COPY_AND_ASSIGN</ref>(<ref refid="classforpy_1_1_forest" kindref="compound">Forest</ref>);</highlight></codeline>
<codeline lineno="247"><highlight class="normal">};<sp/><sp/></highlight><highlight class="comment">//<sp/>class<sp/>Forest</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="248"><highlight class="normal"></highlight></codeline>
<codeline lineno="249" refid="classforpy_1_1_classification_forest" refkind="compound"><highlight class="normal"></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classforpy_1_1_classification_forest" kindref="compound">ClassificationForest</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forest" kindref="compound">Forest</ref><sp/>{</highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="251" refid="classforpy_1_1_classification_forest_1a6e8ff31ff91d89a0c16db1b9cfeed254" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_classification_forest_1a6e8ff31ff91d89a0c16db1b9cfeed254" kindref="member">ClassificationForest</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string<sp/>&amp;filename)<sp/>:<sp/><ref refid="classforpy_1_1_forest" kindref="compound">Forest</ref>(filename){};</highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/><ref refid="classforpy_1_1_classification_forest_1a6e8ff31ff91d89a0c16db1b9cfeed254" kindref="member">ClassificationForest</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>&amp;n_trees<sp/>=<sp/>10,</highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;max_depth<sp/>=<sp/>std::numeric_limits&lt;uint&gt;::max(),</highlight></codeline>
<codeline lineno="254"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;min_samples_at_leaf<sp/>=<sp/>1,</highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;min_samples_at_node<sp/>=<sp/>2,</highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;n_valid_features_to_use<sp/>=<sp/>0,</highlight></codeline>
<codeline lineno="257"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>&amp;autoscale_valid_features<sp/>=<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="258"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;<ref refid="classforpy_1_1_forest_1af46001e2d4aa46ed1ba7986945133ae6" kindref="member">random_seed</ref><sp/>=<sp/>1,</highlight></codeline>
<codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>&amp;n_thresholds<sp/>=<sp/>0,</highlight></codeline>
<codeline lineno="260"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>&amp;gain_threshold<sp/>=<sp/>1E-7f);</highlight></codeline>
<codeline lineno="261"><highlight class="normal"></highlight></codeline>
<codeline lineno="262"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/>std::unordered_map&lt;std::string,<sp/>mu::variant&lt;uint,<sp/>size_t,<sp/>float,<sp/>bool&gt;&gt;</highlight></codeline>
<codeline lineno="263" refid="classforpy_1_1_classification_forest_1a24b4e3bf840328f15a87b16b18208a18" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classforpy_1_1_classification_forest_1a24b4e3bf840328f15a87b16b18208a18" kindref="member">get_params</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>&amp;<sp/></highlight><highlight class="comment">/*deep*/</highlight><highlight class="normal"><sp/>=<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_classification_forest_1a122af2c18b60c14fced37a3ab44471a7" kindref="member">params</ref>;</highlight></codeline>
<codeline lineno="265"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="266"><highlight class="normal"></highlight></codeline>
<codeline lineno="267" refid="classforpy_1_1_classification_forest_1a1152e01fde08c95b9ad8d32943669d23" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/>std::shared_ptr&lt;ClassificationForest&gt;<sp/><ref refid="classforpy_1_1_classification_forest_1a1152e01fde08c95b9ad8d32943669d23" kindref="member">set_params</ref>(</highlight></codeline>
<codeline lineno="268"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::unordered_map&lt;</highlight></codeline>
<codeline lineno="269"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::string,<sp/>mu::variant&lt;uint,<sp/>size_t,<sp/>float,<sp/>bool&gt;&gt;<sp/>&amp;<ref refid="classforpy_1_1_classification_forest_1a122af2c18b60c14fced37a3ab44471a7" kindref="member">params</ref>)<sp/>{</highlight></codeline>
<codeline lineno="270"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>std::make_shared&lt;ClassificationForest&gt;(</highlight></codeline>
<codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;size_t&gt;(<ref refid="classforpy_1_1_classification_forest_1a122af2c18b60c14fced37a3ab44471a7" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;n_trees&quot;</highlight><highlight class="normal">,<sp/>10),</highlight></codeline>
<codeline lineno="272"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;uint&gt;(<ref refid="classforpy_1_1_classification_forest_1a122af2c18b60c14fced37a3ab44471a7" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;max_depth&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::numeric_limits&lt;uint&gt;::max()),</highlight></codeline>
<codeline lineno="274"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;uint&gt;(<ref refid="classforpy_1_1_classification_forest_1a122af2c18b60c14fced37a3ab44471a7" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;min_samples_at_leaf&quot;</highlight><highlight class="normal">,<sp/>1),</highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;uint&gt;(<ref refid="classforpy_1_1_classification_forest_1a122af2c18b60c14fced37a3ab44471a7" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;min_samples_at_node&quot;</highlight><highlight class="normal">,<sp/>2),</highlight></codeline>
<codeline lineno="276"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;uint&gt;(<ref refid="classforpy_1_1_classification_forest_1a122af2c18b60c14fced37a3ab44471a7" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;n_valid_features_to_use&quot;</highlight><highlight class="normal">,<sp/>0),</highlight></codeline>
<codeline lineno="277"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;bool&gt;(<ref refid="classforpy_1_1_classification_forest_1a122af2c18b60c14fced37a3ab44471a7" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;autoscale_valid_features&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">),</highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;uint&gt;(<ref refid="classforpy_1_1_classification_forest_1a122af2c18b60c14fced37a3ab44471a7" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;random_seed&quot;</highlight><highlight class="normal">,<sp/>1),</highlight></codeline>
<codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;size_t&gt;(<ref refid="classforpy_1_1_classification_forest_1a122af2c18b60c14fced37a3ab44471a7" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;n_thresholds&quot;</highlight><highlight class="normal">,<sp/>0),</highlight></codeline>
<codeline lineno="280"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;float&gt;(<ref refid="classforpy_1_1_classification_forest_1a122af2c18b60c14fced37a3ab44471a7" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;gain_threshold&quot;</highlight><highlight class="normal">,<sp/>1E-7f));</highlight></codeline>
<codeline lineno="281"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="282"><highlight class="normal"></highlight></codeline>
<codeline lineno="283" refid="classforpy_1_1_classification_forest_1a3e24fb641e12dccd0d1dc5e7c2c65cfa" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">friend</highlight><highlight class="normal"><sp/>std::ostream<sp/>&amp;<ref refid="classforpy_1_1_classification_forest_1a3e24fb641e12dccd0d1dc5e7c2c65cfa" kindref="member">operator&lt;&lt;</ref>(std::ostream<sp/>&amp;stream,</highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_classification_forest" kindref="compound">ClassificationForest</ref><sp/>&amp;</highlight><highlight class="keyword">self</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/>stream<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;forpy::ClassificationForest[&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="286"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>&lt;&lt;<sp/>mu::static_variant_cast&lt;</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal">&gt;(</highlight><highlight class="keyword">self</highlight><highlight class="normal">.params.at(</highlight><highlight class="stringliteral">&quot;n_trees&quot;</highlight><highlight class="normal">))</highlight></codeline>
<codeline lineno="287"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;<sp/>trees]&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="288"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>stream;</highlight></codeline>
<codeline lineno="289" refid="classforpy_1_1_classification_forest_1a122af2c18b60c14fced37a3ab44471a7" refkind="member"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="290"><highlight class="normal"></highlight></codeline>
<codeline lineno="291"><highlight class="normal"><sp/></highlight><highlight class="keyword">private</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="292"><highlight class="normal"><sp/><sp/>std::unordered_map&lt;std::string,<sp/>mu::variant&lt;uint,<sp/>size_t,<sp/>float,<sp/>bool&gt;&gt;</highlight></codeline>
<codeline lineno="293"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classforpy_1_1_classification_forest_1a122af2c18b60c14fced37a3ab44471a7" kindref="member">params</ref>;</highlight></codeline>
<codeline lineno="294" refid="classforpy_1_1_classification_forest_1ab2f44cbb59a08132f4c843e5225bba0e" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">friend</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classforpy_1_1_classification_forest_1ab2f44cbb59a08132f4c843e5225bba0e" kindref="member">cereal::access</ref>;</highlight></codeline>
<codeline lineno="295"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><sp/>&lt;</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Archive&gt;</highlight></codeline>
<codeline lineno="296" refid="classforpy_1_1_classification_forest_1a3b2955f6bd8de92927f54b9e72c5366b" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_classification_forest_1a3b2955f6bd8de92927f54b9e72c5366b" kindref="member">serialize</ref>(Archive<sp/>&amp;ar,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;)<sp/>{</highlight></codeline>
<codeline lineno="297"><highlight class="normal"><sp/><sp/><sp/><sp/>ar(cereal::make_nvp(</highlight><highlight class="stringliteral">&quot;base&quot;</highlight><highlight class="normal">,<sp/>cereal::base_class&lt;Forest&gt;(</highlight><highlight class="keyword">this</highlight><highlight class="normal">)),</highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>CEREAL_NVP(<ref refid="classforpy_1_1_classification_forest_1a122af2c18b60c14fced37a3ab44471a7" kindref="member">params</ref>));</highlight></codeline>
<codeline lineno="299"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="300"><highlight class="normal"><sp/><sp/><ref refid="classforpy_1_1_classification_forest_1a2ad96f920bfd298851a394a564247b8e" kindref="member">DISALLOW_COPY_AND_ASSIGN</ref>(<ref refid="classforpy_1_1_classification_forest" kindref="compound">ClassificationForest</ref>);</highlight></codeline>
<codeline lineno="301"><highlight class="normal">};</highlight></codeline>
<codeline lineno="302"><highlight class="normal"></highlight></codeline>
<codeline lineno="303" refid="classforpy_1_1_regression_forest" refkind="compound"><highlight class="normal"></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classforpy_1_1_regression_forest" kindref="compound">RegressionForest</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forest" kindref="compound">Forest</ref><sp/>{</highlight></codeline>
<codeline lineno="304"><highlight class="normal"><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="305" refid="classforpy_1_1_regression_forest_1a08b6ddda05219816e58e05389e6d500f" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_regression_forest_1a08b6ddda05219816e58e05389e6d500f" kindref="member">RegressionForest</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string<sp/>&amp;filename)<sp/>:<sp/><ref refid="classforpy_1_1_forest" kindref="compound">Forest</ref>(filename){};</highlight></codeline>
<codeline lineno="306"><highlight class="normal"><sp/><sp/><ref refid="classforpy_1_1_regression_forest_1a08b6ddda05219816e58e05389e6d500f" kindref="member">RegressionForest</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>&amp;n_trees<sp/>=<sp/>10,</highlight></codeline>
<codeline lineno="307"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;max_depth<sp/>=<sp/>std::numeric_limits&lt;uint&gt;::max(),</highlight></codeline>
<codeline lineno="308"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;min_samples_at_leaf<sp/>=<sp/>1,</highlight></codeline>
<codeline lineno="309"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;min_samples_at_node<sp/>=<sp/>2,</highlight></codeline>
<codeline lineno="310"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;n_valid_features_to_use<sp/>=<sp/>0,</highlight></codeline>
<codeline lineno="311"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>&amp;autoscale_valid_features<sp/>=<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="312"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;<ref refid="classforpy_1_1_forest_1af46001e2d4aa46ed1ba7986945133ae6" kindref="member">random_seed</ref><sp/>=<sp/>1,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>&amp;n_thresholds<sp/>=<sp/>0,</highlight></codeline>
<codeline lineno="313"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>&amp;gain_threshold<sp/>=<sp/>1E-7f,</highlight></codeline>
<codeline lineno="314"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>&amp;store_variance<sp/>=<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="315"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>&amp;summarize<sp/>=<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="316"><highlight class="normal"></highlight></codeline>
<codeline lineno="317"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/>std::unordered_map&lt;std::string,<sp/>mu::variant&lt;uint,<sp/>size_t,<sp/>float,<sp/>bool&gt;&gt;</highlight></codeline>
<codeline lineno="318" refid="classforpy_1_1_regression_forest_1ad434daa6c3753abfb902a606641c6181" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classforpy_1_1_regression_forest_1ad434daa6c3753abfb902a606641c6181" kindref="member">get_params</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>&amp;<sp/></highlight><highlight class="comment">/*deep*/</highlight><highlight class="normal"><sp/>=<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="319"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_regression_forest_1ae8fe4555761fa365881dffc820ac5dcc" kindref="member">params</ref>;</highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="321"><highlight class="normal"></highlight></codeline>
<codeline lineno="322" refid="classforpy_1_1_regression_forest_1a3cb1d183be9de60d80bdcab8c51bfbad" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/>std::shared_ptr&lt;RegressionForest&gt;<sp/><ref refid="classforpy_1_1_regression_forest_1a3cb1d183be9de60d80bdcab8c51bfbad" kindref="member">set_params</ref>(</highlight></codeline>
<codeline lineno="323"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::unordered_map&lt;</highlight></codeline>
<codeline lineno="324"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::string,<sp/>mu::variant&lt;uint,<sp/>size_t,<sp/>float,<sp/>bool&gt;&gt;<sp/>&amp;<ref refid="classforpy_1_1_regression_forest_1ae8fe4555761fa365881dffc820ac5dcc" kindref="member">params</ref>)<sp/>{</highlight></codeline>
<codeline lineno="325"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>std::make_shared&lt;RegressionForest&gt;(</highlight></codeline>
<codeline lineno="326"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;size_t&gt;(<ref refid="classforpy_1_1_regression_forest_1ae8fe4555761fa365881dffc820ac5dcc" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;n_trees&quot;</highlight><highlight class="normal">,<sp/>10),</highlight></codeline>
<codeline lineno="327"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;uint&gt;(<ref refid="classforpy_1_1_regression_forest_1ae8fe4555761fa365881dffc820ac5dcc" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;max_depth&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="328"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::numeric_limits&lt;uint&gt;::max()),</highlight></codeline>
<codeline lineno="329"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;uint&gt;(<ref refid="classforpy_1_1_regression_forest_1ae8fe4555761fa365881dffc820ac5dcc" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;min_samples_at_leaf&quot;</highlight><highlight class="normal">,<sp/>1),</highlight></codeline>
<codeline lineno="330"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;uint&gt;(<ref refid="classforpy_1_1_regression_forest_1ae8fe4555761fa365881dffc820ac5dcc" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;min_samples_at_node&quot;</highlight><highlight class="normal">,<sp/>2),</highlight></codeline>
<codeline lineno="331"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;uint&gt;(<ref refid="classforpy_1_1_regression_forest_1ae8fe4555761fa365881dffc820ac5dcc" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;n_valid_features_to_use&quot;</highlight><highlight class="normal">,<sp/>0),</highlight></codeline>
<codeline lineno="332"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;bool&gt;(<ref refid="classforpy_1_1_regression_forest_1ae8fe4555761fa365881dffc820ac5dcc" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;autoscale_valid_features&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">),</highlight></codeline>
<codeline lineno="333"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;uint&gt;(<ref refid="classforpy_1_1_regression_forest_1ae8fe4555761fa365881dffc820ac5dcc" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;random_seed&quot;</highlight><highlight class="normal">,<sp/>1),</highlight></codeline>
<codeline lineno="334"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;size_t&gt;(<ref refid="classforpy_1_1_regression_forest_1ae8fe4555761fa365881dffc820ac5dcc" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;n_thresholds&quot;</highlight><highlight class="normal">,<sp/>0),</highlight></codeline>
<codeline lineno="335"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;float&gt;(<ref refid="classforpy_1_1_regression_forest_1ae8fe4555761fa365881dffc820ac5dcc" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;gain_threshold&quot;</highlight><highlight class="normal">,<sp/>1E-7f),</highlight></codeline>
<codeline lineno="336"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;bool&gt;(<ref refid="classforpy_1_1_regression_forest_1ae8fe4555761fa365881dffc820ac5dcc" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;store_variance&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">),</highlight></codeline>
<codeline lineno="337"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GetWithDefVar&lt;bool&gt;(<ref refid="classforpy_1_1_regression_forest_1ae8fe4555761fa365881dffc820ac5dcc" kindref="member">params</ref>,<sp/></highlight><highlight class="stringliteral">&quot;summarize&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="338"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="339"><highlight class="normal"></highlight></codeline>
<codeline lineno="340" refid="classforpy_1_1_regression_forest_1ad5f7abc69f685d079ef4079e219d6690" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">friend</highlight><highlight class="normal"><sp/>std::ostream<sp/>&amp;<ref refid="classforpy_1_1_regression_forest_1ad5f7abc69f685d079ef4079e219d6690" kindref="member">operator&lt;&lt;</ref>(std::ostream<sp/>&amp;stream,</highlight></codeline>
<codeline lineno="341"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_regression_forest" kindref="compound">RegressionForest</ref><sp/>&amp;</highlight><highlight class="keyword">self</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
<codeline lineno="342"><highlight class="normal"><sp/><sp/><sp/><sp/>stream<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;forpy::RegressionForest[&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="343"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>&lt;&lt;<sp/>mu::static_variant_cast&lt;</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal">&gt;(</highlight><highlight class="keyword">self</highlight><highlight class="normal">.params.at(</highlight><highlight class="stringliteral">&quot;n_trees&quot;</highlight><highlight class="normal">))</highlight></codeline>
<codeline lineno="344"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;<sp/>trees]&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="345"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>stream;</highlight></codeline>
<codeline lineno="346" refid="classforpy_1_1_regression_forest_1ae8fe4555761fa365881dffc820ac5dcc" refkind="member"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="347"><highlight class="normal"></highlight></codeline>
<codeline lineno="348"><highlight class="normal"><sp/></highlight><highlight class="keyword">private</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="349"><highlight class="normal"><sp/><sp/>std::unordered_map&lt;std::string,<sp/>mu::variant&lt;uint,<sp/>size_t,<sp/>float,<sp/>bool&gt;&gt;</highlight></codeline>
<codeline lineno="350"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classforpy_1_1_regression_forest_1ae8fe4555761fa365881dffc820ac5dcc" kindref="member">params</ref>;</highlight></codeline>
<codeline lineno="351" refid="classforpy_1_1_regression_forest_1ab2f44cbb59a08132f4c843e5225bba0e" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">friend</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classforpy_1_1_regression_forest_1ab2f44cbb59a08132f4c843e5225bba0e" kindref="member">cereal::access</ref>;</highlight></codeline>
<codeline lineno="352"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><sp/>&lt;</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Archive&gt;</highlight></codeline>
<codeline lineno="353" refid="classforpy_1_1_regression_forest_1abf9a7302a3f58afd5cd2e8ae3e161535" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_regression_forest_1abf9a7302a3f58afd5cd2e8ae3e161535" kindref="member">serialize</ref>(Archive<sp/>&amp;ar,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;)<sp/>{</highlight></codeline>
<codeline lineno="354"><highlight class="normal"><sp/><sp/><sp/><sp/>ar(cereal::make_nvp(</highlight><highlight class="stringliteral">&quot;base&quot;</highlight><highlight class="normal">,<sp/>cereal::base_class&lt;Forest&gt;(</highlight><highlight class="keyword">this</highlight><highlight class="normal">)),</highlight></codeline>
<codeline lineno="355"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>CEREAL_NVP(<ref refid="classforpy_1_1_regression_forest_1ae8fe4555761fa365881dffc820ac5dcc" kindref="member">params</ref>));</highlight></codeline>
<codeline lineno="356"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="357"><highlight class="normal"><sp/><sp/><ref refid="classforpy_1_1_regression_forest_1a999cfe859aff6d32e57bf97a0251fdd1" kindref="member">DISALLOW_COPY_AND_ASSIGN</ref>(<ref refid="classforpy_1_1_regression_forest" kindref="compound">RegressionForest</ref>);</highlight></codeline>
<codeline lineno="358"><highlight class="normal">};</highlight></codeline>
<codeline lineno="359"><highlight class="normal"></highlight></codeline>
<codeline lineno="360"><highlight class="normal">};<sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>namespace<sp/>forpy</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="361"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/><sp/>//<sp/>FORPY_FOREST_H_</highlight></codeline>
    </programlisting>
    <location file="/Users/classner/git/forpy/include/forpy/forest.h"/>
  </compounddef>
</doxygen>
