[mlpack] 61/149: Now regression_distribution.cpp
Barak A. Pearlmutter
barak+git at pearlmutter.net
Sat May 2 09:11:09 UTC 2015
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to branch svn-trunk
in repository mlpack.
commit c8f397d9de2c55bb35dd84de906959d8ed8ca873
Author: michaelfox99 <michaelfox99 at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date: Sun Nov 2 17:57:02 2014 +0000
Now regression_distribution.cpp
git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@17281 9d5b8971-822b-0410-80eb-d18c1038ef23
---
src/mlpack/core/dists/hmm_regression_impl.hpp | 64 ---------------------------
1 file changed, 64 deletions(-)
diff --git a/src/mlpack/core/dists/hmm_regression_impl.hpp b/src/mlpack/core/dists/hmm_regression_impl.hpp
deleted file mode 100644
index 950e4e2..0000000
--- a/src/mlpack/core/dists/hmm_regression_impl.hpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * @file hmm_regression_impl.hpp
- * @author Michael Fox
- *
- * Implementation of conditional Gaussian distribution for HMM regression (HMMR)
- */
-#ifndef __MLPACK_METHODS_HMM_DISTRIBUTIONS_CONDITIONAL_GAUSSIAN_DISTRIBUTION_IMPL_HPP
-#define __MLPACK_METHODS_HMM_DISTRIBUTIONS_CONDITIONAL_GAUSSIAN_DISTRIBUTION_IMPL_HPP
-
-#include "hmm_regression.hpp"
-
-using namespace mlpack;
-using namespace mlpack::distribution;
-
-/**
- * Returns a string representation of this object.
- */
-std::string HMMRegression::ToString()
- const
-{
- std::ostringstream convert;
- convert << "HMMRegression [" << this << "]" << std::endl;
-
- // Secondary ostringstream so things can be indented right.
- std::ostringstream data;
- data << "Conditional mean function: " << std::endl << rf.ToString();
- data << "Parameters: " << std::endl << rf.Parameters();
- data << "Error distribution: " << std::endl << err.ToString();
-
- convert << util::Indent(data.str());
- return convert.str();
-}
-
-/**
-* Estimate parameters using provided observation weights
-*
-* @param weights probability that given observation is from distribution
-*/
-void HMMRegression::Estimate(const arma::mat& observations,
- const arma::vec& weights)
-{
- regression::LinearRegression lr(observations.rows(1, observations.n_rows-1),
- (observations.row(0)).t(), 0, true, weights);
- rf = lr;
- arma::vec fitted;
- lr.Predict(observations.rows(1, observations.n_rows-1), fitted);
- err.Estimate(observations.row(0)-fitted.t(), weights);
-}
-
-/**
-* Evaluate probability density function of given observation
-*
-* @param observation point to evaluate probability at
-*/
-double HMMRegression::Probability(const arma::vec& observation) const
-{
- arma::vec fitted;
- rf.Predict(observation.rows(1, observation.n_rows-1), fitted);
- return err.Probability(observation(0)-fitted);
-}
-
-
-
-#endif
\ No newline at end of file
--
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