[mlpack] 50/207: Add convenience typedef for stumps.

Barak A. Pearlmutter barak+git at pearlmutter.net
Thu Mar 23 17:53:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch master
in repository mlpack.

commit f6bf8ba030b4965da65fd0c0027fc86c338f7191
Author: Ryan Curtin <ryan at ratml.org>
Date:   Mon Jan 23 17:26:56 2017 -0500

    Add convenience typedef for stumps.
---
 src/mlpack/methods/decision_tree/decision_tree.hpp | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/mlpack/methods/decision_tree/decision_tree.hpp b/src/mlpack/methods/decision_tree/decision_tree.hpp
index 39b5369..3503406 100644
--- a/src/mlpack/methods/decision_tree/decision_tree.hpp
+++ b/src/mlpack/methods/decision_tree/decision_tree.hpp
@@ -213,6 +213,19 @@ class DecisionTree :
                                    const size_t numClasses);
 };
 
+/**
+ * Convenience typedef for decision stumps (single level decision trees).
+ */
+template<typename FitnessFunction = GiniGain,
+         template<typename> class NumericSplitType = BestBinaryNumericSplit,
+         template<typename> class CategoricalSplitType = AllCategoricalSplit,
+         typename ElemType = double>
+using DecisionStump = DecisionTree<FitnessFunction,
+                                   NumericSplitType,
+                                   CategoricalSplitType,
+                                   ElemType,
+                                   false>;
+
 } // namespace tree
 } // namespace mlpack
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git



More information about the debian-science-commits mailing list