23 static std::string
value() {
return "unknown"; };
27 static std::string
value() {
return "d"; }
31 static std::string
value() {
return "f"; }
35 static std::string
value() {
return "ui"; }
39 static std::string
value() {
return "ui8"; }
43 static std::string
value() {
return "i16"; }
47 static std::string
value() {
return "i"; }
51 template <
typename DT>
52 using Mat = Eigen::Matrix<DT, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
55 template <
typename DT>
57 Eigen::Matrix<DT, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor>;
60 template <
typename DT>
61 using MatCRef = Eigen::Ref<const Mat<DT>>;
64 template <
typename DT>
68 template <
typename DT>
72 template <
typename DT>
73 using Vec = Eigen::Matrix<DT, Eigen::Dynamic, 1, Eigen::ColMajor>;
75 template <
typename DT>
76 using VecRM = Eigen::Matrix<DT, 1, Eigen::Dynamic, Eigen::RowMajor>;
78 template <
typename DT>
81 template <
typename DT>
84 template <
typename DT>
85 using VecCRef = Eigen::Ref<const Vec<DT>>;
87 template <
typename DT>
89 Eigen::Map<const Eigen::Matrix<DT, 1, Eigen::Dynamic, Eigen::RowMajor>,
90 Eigen::Unaligned, Eigen::InnerStride<>>;
108 typedef std::function<id_t(const Data<MatCRef> &,
const id_t &,
109 const std::function<void(void *)> &)>
118 template <
typename FT>
127 stream <<
"forpy::SplitOptRes_X[<=" <<
self.thresh
128 <<
"; gain: " <<
self.gain <<
", valid: " <<
self.valid <<
"]";
137 typedef mu::variant<SplitOptRes<float>, SplitOptRes<double>, SplitOptRes<uint>,
138 SplitOptRes<uint8_t>>
161 std::shared_ptr<std::vector<id_t>>
sample_ids;
171 stream <<
"forpy::TodoMark[node_id: " <<
self.node_id <<
", depth " 172 <<
self.depth <<
"]";
179 template <
class Archive>
190 typedef std::vector<std::pair<std::shared_ptr<std::vector<size_t>>,
191 std::shared_ptr<std::vector<float>
const>>>
210 #pragma clang diagnostic push 211 #pragma clang diagnostic ignored "-Wunused-variable" 213 #pragma clang diagnostic pop 216 #endif // FORPY_TYPES_H_ std::pair< std::shared_ptr< std::vector< id_t > >, id_t > include_pair_t
A pair containing information about newly included samples.
friend class cereal::access
static std::string value()
bool operator==(TodoMark const &rhs) const
size_t id_t
Element id type.
Eigen::Ref< VecRM< DT > > VecRMRef
const MatCRef< float > FORPY_ZERO_MATR(Mat< float >::Zero(0, 1))
std::vector< std::pair< std::shared_ptr< std::vector< size_t > >, std::shared_ptr< std::vector< float > const > > > usage_map_t
Describes how each sample is used for each tree.
Eigen::Ref< const MatCM< DT > > MatCMCRef
Parameterized const matrix column major matrix ref type.
std::pair< id_t, id_t > interv_t
void serialize(Archive &ar, const uint &)
Eigen::Ref< Vec< DT > > VecRef
std::pair< ptrdiff_t, ptrdiff_t > regint_t
TodoMark(std::shared_ptr< std::vector< id_t >> sample_ids, const interv_t &interv, const id_t &node_id, const uint &depth)
Stores the parameters for one marked tree node.
friend std::ostream & operator<<(std::ostream &stream, const TodoMark &self)
std::unordered_set< std::vector< size_t >, vector_hasher > proposal_set_t
The type of a set of dimension selections.
static std::string value()
static std::string value()
Eigen::Matrix< DT, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > MatCM
Parameterized column major matrix type.
Eigen::Ref< Mat< DT > > MatRef
Parameterized standard non-const matrix ref type.
std::shared_ptr< std::vector< id_t > > sample_ids
DISALLOW_COPY_AND_ASSIGN(TodoMark)
mu::variant< SplitOptRes< float >, SplitOptRes< double >, SplitOptRes< uint >, SplitOptRes< uint8_t > > OptSplitV
EThresholdSelection
Specifies which thresholds should be used for a decision.
bool operator==(SplitOptRes< FT > const &rhs) const
static std::string value()
Struct for translating primitive types to a short name.
Eigen::Ref< const Vec< DT > > VecCRef
Eigen::Matrix< DT, Eigen::Dynamic, 1, Eigen::ColMajor > Vec
Eigen::Matrix< DT, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > Mat
Parameterized Matrix type (row major).
static std::string value()
A simple vector<size_t> hasher.
friend std::ostream & operator<<(std::ostream &stream, const SplitOptRes< FT > &self)
static std::string value()
Eigen::Map< const Eigen::Matrix< DT, 1, Eigen::Dynamic, Eigen::RowMajor >, Eigen::Unaligned, Eigen::InnerStride<> > VecCMap
ECompletionLevel
Specifies the completion level for one training step.
Eigen::Ref< const Mat< DT > > MatCRef
Parameterized const matrix ref type.
unsigned int uint
Convenience typedef for unsigned int.
Eigen::Matrix< DT, 1, Eigen::Dynamic, Eigen::RowMajor > VecRM
std::function< id_t(const Data< MatCRef > &, const id_t &, const std::function< void(void *)> &)> node_predf
static std::string value()