[mlpack-git] master: Serialization support. (b2b1939)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Wed Dec 23 11:43:23 EST 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/de9cc4b05069e1fa4793d9355f2f595af5ff45d2...6070527af14296cd99739de6c62666cc5d2a2125

>---------------------------------------------------------------

commit b2b193901f0be80cb0b6c4f77c997fff73624673
Author: ryan <ryan at ratml.org>
Date:   Thu Oct 1 14:19:20 2015 -0400

    Serialization support.


>---------------------------------------------------------------

b2b193901f0be80cb0b6c4f77c997fff73624673
 .../methods/hoeffding_trees/streaming_decision_tree_main.cpp       | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/mlpack/methods/hoeffding_trees/streaming_decision_tree_main.cpp b/src/mlpack/methods/hoeffding_trees/streaming_decision_tree_main.cpp
index 35a304d..9ba4b54 100644
--- a/src/mlpack/methods/hoeffding_trees/streaming_decision_tree_main.cpp
+++ b/src/mlpack/methods/hoeffding_trees/streaming_decision_tree_main.cpp
@@ -19,9 +19,11 @@ PARAM_STRING("labels_file", "Labels for training dataset.", "l", "");
 
 PARAM_DOUBLE("confidence", "Confidence before splitting (between 0 and 1).",
     "c", 0.95);
-PARAM_INT("max_samples", "Maximum number of samples before splitting.", "m",
+PARAM_INT("max_samples", "Maximum number of samples before splitting.", "n",
     5000);
 
+PARAM_STRING("model_file", "File to save trained tree to.", "m", "");
+
 PARAM_STRING("test_file", "File of testing data.", "T", "");
 
 
@@ -81,4 +83,7 @@ int main(int argc, char** argv)
           << "!\n";
 
   Log::Info << correct << " correct out of " << predictedLabels.n_elem << ".\n";
+
+  const string modelFile = CLI::GetParam<string>("model_file");
+  //data::Save(modelFile, "streamingDecisionTree", tree, true);
 }



More information about the mlpack-git mailing list