[mlpack-git] master: Remove incomplete Train() overload. (76eb541)

gitdub at mlpack.org gitdub at mlpack.org
Tue Aug 9 16:58:00 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/931ec74894dd2fe0218d0d7dd77fc0ad9be0954d...76eb541d45efe31729b2a6780bb5191f6a440ae3

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

commit 76eb541d45efe31729b2a6780bb5191f6a440ae3
Author: Ryan Curtin <ryan at ratml.org>
Date:   Tue Aug 9 16:58:00 2016 -0400

    Remove incomplete Train() overload.


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

76eb541d45efe31729b2a6780bb5191f6a440ae3
 src/mlpack/core/dists/gamma_distribution.cpp          |  7 -------
 src/mlpack/core/dists/gamma_distribution.hpp          | 19 ++++++++++++-------
 .../core/tree/binary_space_tree/binary_space_tree.hpp |  3 ---
 src/mlpack/core/tree/cover_tree/cover_tree.hpp        |  3 ---
 .../core/tree/rectangle_tree/rectangle_tree.hpp       |  3 ---
 .../tree/vantage_point_tree/vantage_point_tree.hpp    |  3 ---
 6 files changed, 12 insertions(+), 26 deletions(-)

diff --git a/src/mlpack/core/dists/gamma_distribution.cpp b/src/mlpack/core/dists/gamma_distribution.cpp
index db9ae38..22c858a 100644
--- a/src/mlpack/core/dists/gamma_distribution.cpp
+++ b/src/mlpack/core/dists/gamma_distribution.cpp
@@ -63,13 +63,6 @@ void GammaDistribution::Train(const arma::mat& rdata, const double tol)
   Train(logMeanxVec, meanLogxVec, meanxVec, tol);
 }
 
-// Fits an alpha and beta parameter according to observation probabilities.
-void GammaDistribution::Train(const arma::mat& observations, 
-                              const arma::vec& probabilities,
-                              const double tol)
-{
-}
-
 // Fits an alpha and beta parameter to each dimension of the data.
 void GammaDistribution::Train(const arma::vec& logMeanxVec, 
                               const arma::vec& meanLogxVec,
diff --git a/src/mlpack/core/dists/gamma_distribution.hpp b/src/mlpack/core/dists/gamma_distribution.hpp
index 55ed55c..a64c55c 100644
--- a/src/mlpack/core/dists/gamma_distribution.hpp
+++ b/src/mlpack/core/dists/gamma_distribution.hpp
@@ -88,6 +88,7 @@ class GammaDistribution
 
     /**
      * Fits an alpha and beta parameter according to observation probabilities.
+     * This method is not yet implemented.
      *
      * @param observations The reference data, one observation per column
      * @param probabilities The probability of each observation. One value per
@@ -95,16 +96,18 @@ class GammaDistribution
      * @param tol Convergence tolerance. This is *not* an absolute measure:
      *    It will stop the approximation once the *change* in the value is 
      *    smaller than tol.
-     */
+     *
     void Train(const arma::mat& observations,
                const arma::vec& probabilities,
                const double tol = 1e-8);
+     */
 
     /**
      * This function trains (fits distribution parameters) to a dataset with
      * pre-computed statistics logMeanx, meanLogx, meanx for each dimension.
      *
-     * @param logMeanxVec Is each dimension's logarithm of the mean (log(mean(x))).
+     * @param logMeanxVec Is each dimension's logarithm of the mean
+     *     (log(mean(x))).
      * @param meanLogxVec Is each dimension's mean of logarithms (mean(log(x))).
      * @param meanxVec Is each dimension's mean (mean(x)).
      * @param tol Convergence tolerance. This is *not* an absolute measure:
@@ -190,13 +193,15 @@ class GammaDistribution
     arma::vec beta;
 
     /**
-     * This is a small function that returns true if the update of alpha is smaller
-     * than the tolerance ratio.
+     * This is a small function that returns true if the update of alpha is
+     * smaller than the tolerance ratio.
      *
-     * @param aOld old value of parameter we want to estimate (alpha in our case).
-     * @param aNew new value of parameter (the value after 1 iteration from aOld).
+     * @param aOld old value of parameter we want to estimate (alpha in our
+     *      case).
+     * @param aNew new value of parameter (the value after 1 iteration from
+     *      aOld).
      * @param tol Convergence tolerance. Relative measure (see documentation of
-     * GammaDistribution::Train)
+     *      GammaDistribution::Train).
      */
     inline bool Converged(const double aOld,
                           const double aNew,
diff --git a/src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp b/src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp
index d249468..20fe739 100644
--- a/src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp
+++ b/src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp
@@ -450,9 +450,6 @@ class BinarySpaceTree
   //! Modify the number of points in this subset.
   size_t& Count() { return count; }
 
-  //! Returns false: this tree type does not have self children.
-  static bool HasSelfChildren() { return false; }
-
   //! Store the center of the bounding region in the given vector.
   void Center(arma::vec& center) { bound.Center(center); }
 
diff --git a/src/mlpack/core/tree/cover_tree/cover_tree.hpp b/src/mlpack/core/tree/cover_tree/cover_tree.hpp
index 82c6a2c..f75250e 100644
--- a/src/mlpack/core/tree/cover_tree/cover_tree.hpp
+++ b/src/mlpack/core/tree/cover_tree/cover_tree.hpp
@@ -338,9 +338,6 @@ class CoverTree
   math::RangeType<ElemType> RangeDistance(const arma::vec& other,
                                           const ElemType distance) const;
 
-  //! Returns true: this tree does have self-children.
-  static bool HasSelfChildren() { return true; }
-
   //! Get the parent node.
   CoverTree* Parent() const { return parent; }
   //! Modify the parent node.
diff --git a/src/mlpack/core/tree/rectangle_tree/rectangle_tree.hpp b/src/mlpack/core/tree/rectangle_tree/rectangle_tree.hpp
index bbdebda..c694337 100644
--- a/src/mlpack/core/tree/rectangle_tree/rectangle_tree.hpp
+++ b/src/mlpack/core/tree/rectangle_tree/rectangle_tree.hpp
@@ -489,9 +489,6 @@ class RectangleTree
   //! Modify the number of points in this subset.
   size_t& Count() { return count; }
 
-  //! Returns false: this tree type does not have self children.
-  static bool HasSelfChildren() { return false; }
-
  private:
   /**
    * Splits the current node, recursing up the tree.
diff --git a/src/mlpack/core/tree/vantage_point_tree/vantage_point_tree.hpp b/src/mlpack/core/tree/vantage_point_tree/vantage_point_tree.hpp
index 16aef9e..12e2e78 100644
--- a/src/mlpack/core/tree/vantage_point_tree/vantage_point_tree.hpp
+++ b/src/mlpack/core/tree/vantage_point_tree/vantage_point_tree.hpp
@@ -454,9 +454,6 @@ class VantagePointTree
   //! Modify the number of points in this subset.
   size_t& Count() { return count; }
 
-  //! Returns false: this tree type does not have self children.
-  static bool HasSelfChildren() { return false; }
-
   //! Store the center of the bounding region in the given vector.
   void Center(arma::vec& center) { bound.Center(center); }
 




More information about the mlpack-git mailing list