diff options
author | Barry Haddow <barry.haddow@gmail.com> | 2015-04-03 17:46:59 +0300 |
---|---|---|
committer | Barry Haddow <barry.haddow@gmail.com> | 2015-04-03 17:46:59 +0300 |
commit | 217f389230fe4e2114a82aedf43d471b1baaa111 (patch) | |
tree | 29b0ffcd3b0b26767e0291db9f72db9c65021dcc /mert/MiraWeightVector.h | |
parent | 6626d59cfceb8f8aa980c731ae62b9a375cefa2e (diff) |
Attempt at fixing sparse features for hgmira
Diffstat (limited to 'mert/MiraWeightVector.h')
-rw-r--r-- | mert/MiraWeightVector.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mert/MiraWeightVector.h b/mert/MiraWeightVector.h index bbc28704b..8200d6013 100644 --- a/mert/MiraWeightVector.h +++ b/mert/MiraWeightVector.h @@ -64,9 +64,9 @@ public: AvgWeightVector avg(); /** - * Convert to sparse vector, interpreting all features as sparse. + * Convert to sparse vector, interpreting all features as sparse. Only used by hgmira. **/ - void ToSparse(SparseVector* sparse) const; + void ToSparse(SparseVector* sparse, size_t denseSize) const; friend class AvgWeightVector; @@ -104,7 +104,7 @@ public: ValType score(const MiraFeatureVector& fv) const; ValType weight(std::size_t index) const; std::size_t size() const; - void ToSparse(SparseVector* sparse) const; + void ToSparse(SparseVector* sparse, size_t num_dense) const; private: const MiraWeightVector& m_wv; }; |