[mlpack-git] master: Merge branch 'no-to-string' of https://github.com/rcurtin/mlpack into rcurtin-no-to-string (4326b99)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Sun Dec 13 22:12:13 EST 2015


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

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/f535c29999c3d57b06664cceb871b5c937666586...21b198b20beae6e567dc8c1e47293ddde562bef2

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

commit 4326b99657df484b04f9530fb6c8ed0c8baebe78
Merge: f535c29 a693c72
Author: Ryan Curtin <ryan at ratml.org>
Date:   Sun Dec 13 22:10:14 2015 -0500

    Merge branch 'no-to-string' of https://github.com/rcurtin/mlpack into rcurtin-no-to-string


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

4326b99657df484b04f9530fb6c8ed0c8baebe78
 HISTORY.md                                         |   2 +
 src/mlpack/core.hpp                                |   1 -
 src/mlpack/core/dists/discrete_distribution.cpp    |  18 -
 src/mlpack/core/dists/discrete_distribution.hpp    |   5 -
 src/mlpack/core/dists/gaussian_distribution.cpp    |  17 -
 src/mlpack/core/dists/gaussian_distribution.hpp    |   6 -
 src/mlpack/core/dists/laplace_distribution.cpp     |  14 -
 src/mlpack/core/dists/laplace_distribution.hpp     |   3 -
 src/mlpack/core/dists/regression_distribution.cpp  |  18 -
 src/mlpack/core/dists/regression_distribution.hpp  |   5 -
 src/mlpack/core/kernels/cosine_distance.hpp        |  10 -
 src/mlpack/core/kernels/epanechnikov_kernel.cpp    |  11 -
 src/mlpack/core/kernels/epanechnikov_kernel.hpp    |   3 -
 src/mlpack/core/kernels/example_kernel.hpp         |  12 -
 src/mlpack/core/kernels/gaussian_kernel.hpp        |   9 -
 .../core/kernels/hyperbolic_tangent_kernel.hpp     |  10 -
 src/mlpack/core/kernels/laplacian_kernel.hpp       |   9 -
 src/mlpack/core/kernels/linear_kernel.hpp          |   8 -
 src/mlpack/core/kernels/polynomial_kernel.hpp      |  10 -
 .../core/kernels/pspectrum_string_kernel.hpp       |  14 -
 src/mlpack/core/kernels/spherical_kernel.hpp       |   9 -
 src/mlpack/core/kernels/triangular_kernel.hpp      |   9 -
 src/mlpack/core/math/range.hpp                     |   6 -
 src/mlpack/core/math/range_impl.hpp                |   9 -
 src/mlpack/core/metrics/ip_metric.hpp              |   3 -
 src/mlpack/core/metrics/ip_metric_impl.hpp         |  11 -
 src/mlpack/core/metrics/lmetric.hpp                |   3 -
 src/mlpack/core/metrics/lmetric_impl.hpp           |  11 -
 src/mlpack/core/metrics/mahalanobis_distance.hpp   |   2 -
 .../core/metrics/mahalanobis_distance_impl.hpp     |  24 -
 .../optimizers/aug_lagrangian/aug_lagrangian.hpp   |   3 -
 .../aug_lagrangian/aug_lagrangian_function.hpp     |   3 -
 .../aug_lagrangian_function_impl.hpp               |  12 -
 .../aug_lagrangian/aug_lagrangian_impl.hpp         |  13 -
 .../aug_lagrangian_test_functions.cpp              |   8 -
 .../aug_lagrangian_test_functions.hpp              |   3 -
 src/mlpack/core/optimizers/lbfgs/lbfgs.hpp         |   3 -
 src/mlpack/core/optimizers/lbfgs/lbfgs_impl.hpp    |  20 -
 src/mlpack/core/optimizers/sa/sa.hpp               |   2 -
 src/mlpack/core/optimizers/sa/sa_impl.hpp          |  24 -
 src/mlpack/core/optimizers/sdp/lrsdp.hpp           |   3 -
 src/mlpack/core/optimizers/sdp/lrsdp_function.hpp  |   3 -
 .../core/optimizers/sdp/lrsdp_function_impl.hpp    |  14 -
 src/mlpack/core/optimizers/sdp/lrsdp_impl.hpp      |  10 -
 src/mlpack/core/optimizers/sgd/sgd.hpp             |   3 -
 src/mlpack/core/optimizers/sgd/sgd_impl.hpp        |  15 -
 src/mlpack/core/tree/ballbound.hpp                 |   5 -
 src/mlpack/core/tree/ballbound_impl.hpp            |  15 -
 .../tree/binary_space_tree/binary_space_tree.hpp   |   5 -
 .../binary_space_tree/binary_space_tree_impl.hpp   |  36 --
 src/mlpack/core/tree/cover_tree/cover_tree.hpp     |   5 -
 .../core/tree/cover_tree/cover_tree_impl.hpp       |  35 --
 src/mlpack/core/tree/hrectbound.hpp                |   5 -
 src/mlpack/core/tree/hrectbound_impl.hpp           |  20 -
 .../core/tree/rectangle_tree/rectangle_tree.hpp    |   5 -
 .../tree/rectangle_tree/rectangle_tree_impl.hpp    |  35 --
 src/mlpack/core/tree/statistic.hpp                 |  10 -
 src/mlpack/core/util/CMakeLists.txt                |   1 -
 src/mlpack/core/util/ostream_extra.hpp             |  37 --
 src/mlpack/core/util/prefixedoutstream.hpp         |  30 --
 src/mlpack/core/util/prefixedoutstream_impl.hpp    |  39 +-
 src/mlpack/methods/cf/cf.hpp                       |   5 -
 src/mlpack/methods/cf/cf_impl.hpp                  |  13 -
 src/mlpack/methods/det/dtree.cpp                   |  16 -
 src/mlpack/methods/det/dtree.hpp                   |   5 -
 src/mlpack/methods/emst/dtb.hpp                    |   5 -
 src/mlpack/methods/emst/dtb_impl.hpp               |  20 -
 src/mlpack/methods/fastmks/fastmks.hpp             |   5 -
 src/mlpack/methods/fastmks/fastmks_impl.hpp        |  18 -
 src/mlpack/methods/gmm/gmm.hpp                     |   5 -
 src/mlpack/methods/gmm/gmm_impl.hpp                |  29 --
 src/mlpack/methods/hmm/hmm.hpp                     |   5 -
 src/mlpack/methods/hmm/hmm_impl.hpp                |  12 -
 src/mlpack/methods/kernel_pca/kernel_pca.hpp       |   3 -
 src/mlpack/methods/kernel_pca/kernel_pca_impl.hpp  |  13 -
 .../methods/kmeans/dual_tree_kmeans_statistic.hpp  |  12 -
 src/mlpack/methods/kmeans/kmeans.hpp               |   3 -
 src/mlpack/methods/kmeans/kmeans_impl.hpp          |  20 -
 .../kmeans/pelleg_moore_kmeans_statistic.hpp       |  10 -
 src/mlpack/methods/lars/lars.cpp                   |  11 -
 src/mlpack/methods/lars/lars.hpp                   |   3 -
 .../linear_regression/linear_regression.cpp        |   8 -
 .../linear_regression/linear_regression.hpp        |   3 -
 src/mlpack/methods/local_coordinate_coding/lcc.hpp |   3 -
 .../methods/local_coordinate_coding/lcc_impl.hpp   |  10 -
 .../logistic_regression/logistic_regression.hpp    |   3 -
 .../logistic_regression_impl.hpp                   |  10 -
 src/mlpack/methods/lsh/lsh_search.hpp              |   3 -
 src/mlpack/methods/lsh/lsh_search_impl.hpp         |  13 -
 src/mlpack/methods/nca/nca.hpp                     |   3 -
 src/mlpack/methods/nca/nca_impl.hpp                |  13 -
 .../methods/nca/nca_softmax_error_function.hpp     |   3 -
 .../nca/nca_softmax_error_function_impl.hpp        |  12 -
 .../methods/neighbor_search/neighbor_search.hpp    |   3 -
 .../neighbor_search/neighbor_search_impl.hpp       |  24 -
 src/mlpack/methods/pca/pca.cpp                     |  10 -
 src/mlpack/methods/pca/pca.hpp                     |   3 -
 src/mlpack/methods/radical/radical.cpp             |  12 -
 src/mlpack/methods/radical/radical.hpp             |   3 -
 src/mlpack/methods/range_search/range_search.hpp   |   3 -
 .../methods/range_search/range_search_impl.hpp     |  18 -
 src/mlpack/methods/rann/ra_search.hpp              |   3 -
 src/mlpack/methods/rann/ra_search_impl.hpp         |  45 --
 src/mlpack/methods/sparse_coding/sparse_coding.cpp |  10 -
 src/mlpack/methods/sparse_coding/sparse_coding.hpp |   3 -
 src/mlpack/tests/CMakeLists.txt                    |   1 -
 src/mlpack/tests/to_string_test.cpp                | 533 ---------------------
 107 files changed, 3 insertions(+), 1659 deletions(-)

diff --cc src/mlpack/methods/lars/lars.hpp
index 67f5aed,01629a7..bc2380b
--- a/src/mlpack/methods/lars/lars.hpp
+++ b/src/mlpack/methods/lars/lars.hpp
@@@ -163,15 -163,6 +163,12 @@@ class LAR
    //! Access the upper triangular cholesky factor.
    const arma::mat& MatUtriCholFactor() const { return matUtriCholFactor; }
  
 +  /**
 +   * Serialize the LARS model.
 +   */
 +  template<typename Archive>
 +  void Serialize(Archive& ar, const unsigned int /* version */);
 +
-   // Returns a string representation of this object.
-   std::string ToString() const;
- 
   private:
    //! Gram matrix.
    arma::mat matGramInternal;
diff --cc src/mlpack/methods/sparse_coding/sparse_coding.cpp
index be2cd6a,0401936..aef67b8
--- a/src/mlpack/methods/sparse_coding/sparse_coding.cpp
+++ b/src/mlpack/methods/sparse_coding/sparse_coding.cpp
@@@ -269,15 -334,7 +269,5 @@@ double SparseCoding::Objective(const ar
    }
  }
  
- std::string SparseCoding::ToString() const
- {
-   std::ostringstream convert;
-   convert << "Sparse Coding  [" << this << "]" << std::endl;
-   convert << "  Atoms: " << atoms << std::endl;
-   convert << "  Lambda 1: " << lambda1 << std::endl;
-   convert << "  Lambda 2: " << lambda2 << std::endl;
-   return convert.str();
- }
- 
  } // namespace sparse_coding
  } // namespace mlpack
 -
 -#endif
diff --cc src/mlpack/methods/sparse_coding/sparse_coding.hpp
index 8d2b0b5,0590cbb..b8cef55
--- a/src/mlpack/methods/sparse_coding/sparse_coding.hpp
+++ b/src/mlpack/methods/sparse_coding/sparse_coding.hpp
@@@ -221,44 -175,11 +221,41 @@@ class SparseCodin
    //! Modify the dictionary.
    arma::mat& Dictionary() { return dictionary; }
  
 -  //! Access the sparse codes.
 -  const arma::mat& Codes() const { return codes; }
 -  //! Modify the sparse codes.
 -  arma::mat& Codes() { return codes; }
 +  //! Access the number of atoms.
 +  size_t Atoms() const { return atoms; }
 +  //! Modify the number of atoms.
 +  size_t& Atoms() { return atoms; }
 +
 +  //! Access the L1 regularization term.
 +  double Lambda1() const { return lambda1; }
 +  //! Modify the L1 regularization term.
 +  double& Lambda1() { return lambda1; }
 +
 +  //! Access the L2 regularization term.
 +  double Lambda2() const { return lambda2; }
 +  //! Modify the L2 regularization term.
 +  double& Lambda2() { return lambda2; }
 +
 +  //! Get the maximum number of iterations.
 +  size_t MaxIterations() const { return maxIterations; }
 +  //! Modify the maximum number of iterations.
 +  size_t& MaxIterations() { return maxIterations; }
 +
 +  //! Get the objective tolerance.
 +  double ObjTolerance() const { return objTolerance; }
 +  //! Modify the objective tolerance.
 +  double& ObjTolerance() { return objTolerance; }
 +
 +  //! Get the tolerance for Newton's method (dictionary optimization step).
 +  double NewtonTolerance() const { return newtonTolerance; }
 +  //! Modify the tolerance for Newton's method (dictionary optimization step).
 +  double& NewtonTolerance() { return newtonTolerance; }
 +
 +  //! Serialize the sparse coding model.
 +  template<typename Archive>
 +  void Serialize(Archive& ar, const unsigned int /* version */);
 +
  
-   // Returns a string representation of this object.
-   std::string ToString() const;
- 
   private:
    //! Number of atoms.
    size_t atoms;



More information about the mlpack-git mailing list