diff options
author | Eva <eva@deimos.(none)> | 2012-04-30 08:29:18 +0400 |
---|---|---|
committer | Eva <eva@deimos.(none)> | 2012-04-30 08:29:18 +0400 |
commit | 6c2a58a48eea6ca14a3d1bd9455cce5c33c40ece (patch) | |
tree | 2a74178cc1656288b4de37fb0091ebbf18001e70 /moses | |
parent | 6f39ad0b3e51a4034707e0b592a3d40e8c7f0fd4 (diff) |
clean up mira, add sampling from hope/model/fear
Diffstat (limited to 'moses')
-rw-r--r-- | moses/src/FeatureVector.cpp | 16 | ||||
-rw-r--r-- | moses/src/FeatureVector.h | 2 | ||||
-rw-r--r-- | moses/src/ScoreComponentCollection.h | 4 |
3 files changed, 0 insertions, 22 deletions
diff --git a/moses/src/FeatureVector.cpp b/moses/src/FeatureVector.cpp index f2c17813a..f9118347c 100644 --- a/moses/src/FeatureVector.cpp +++ b/moses/src/FeatureVector.cpp @@ -307,22 +307,6 @@ namespace Moses { void FVector::set(const FName& name, const FValue& value) { m_features[name] = value; } - - void FVector::logCoreFeatures(size_t baseOfLog) { - float logOfValue = 0; - // log_a(value) = ln(value) / ln(a) - for (size_t i = 0; i < m_coreFeatures.size(); ++i) { - FValue value = m_coreFeatures[i]; - if (value == 0) continue; - else if (value < 0) { - logOfValue = log(-1*value) / log(baseOfLog); - logOfValue *= -1; - } - else - logOfValue = log(value) / log(baseOfLog); - m_coreFeatures[i] = logOfValue; - } - } void FVector::printCoreFeatures() { cerr << "core=("; diff --git a/moses/src/FeatureVector.h b/moses/src/FeatureVector.h index ec693f220..fa6ca2301 100644 --- a/moses/src/FeatureVector.h +++ b/moses/src/FeatureVector.h @@ -195,8 +195,6 @@ namespace Moses { std::ostream& print(std::ostream& out) const; /** additional */ - - void logCoreFeatures(size_t baseOfLog); void printCoreFeatures(); //scale so that abs. value is less than maxvalue void thresholdScale(float maxValue ); diff --git a/moses/src/ScoreComponentCollection.h b/moses/src/ScoreComponentCollection.h index 8c57c82ad..d53eee247 100644 --- a/moses/src/ScoreComponentCollection.h +++ b/moses/src/ScoreComponentCollection.h @@ -314,10 +314,6 @@ public: { return m_scores[featureName]; } - - void LogCoreFeatures(size_t baseOfLog) { - m_scores.logCoreFeatures(baseOfLog); - } void PrintCoreFeatures() { m_scores.printCoreFeatures(); |