summaryrefslogtreecommitdiff
path: root/dpmert/line_optimizer.h
diff options
context:
space:
mode:
authorMichael Denkowski <michael.j.denkowski@gmail.com>2012-12-22 16:01:23 -0500
committerMichael Denkowski <michael.j.denkowski@gmail.com>2012-12-22 16:01:23 -0500
commit597d89c11db53e91bc011eab70fd613bbe6453e8 (patch)
tree83c87c07d1ff6d3ee4e3b1626f7eddd49c61095b /dpmert/line_optimizer.h
parent65e958ff2678a41c22be7171456a63f002ef370b (diff)
parent201af2acd394415a05072fbd53d42584875aa4b4 (diff)
Merge branch 'master' of git://github.com/redpony/cdec
Diffstat (limited to 'dpmert/line_optimizer.h')
-rw-r--r--dpmert/line_optimizer.h48
1 files changed, 0 insertions, 48 deletions
diff --git a/dpmert/line_optimizer.h b/dpmert/line_optimizer.h
deleted file mode 100644
index 83819f41..00000000
--- a/dpmert/line_optimizer.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef LINE_OPTIMIZER_H_
-#define LINE_OPTIMIZER_H_
-
-#include <vector>
-
-#include "sparse_vector.h"
-#include "error_surface.h"
-#include "sampler.h"
-
-class EvaluationMetric;
-class Weights;
-
-struct LineOptimizer {
-
- // use MINIMIZE_SCORE for things like TER, WER
- // MAXIMIZE_SCORE for things like BLEU
- enum ScoreType { MAXIMIZE_SCORE, MINIMIZE_SCORE };
-
- // merge all the error surfaces together into a global
- // error surface and find (the middle of) the best segment
- static double LineOptimize(
- const EvaluationMetric* metric,
- const std::vector<ErrorSurface>& envs,
- const LineOptimizer::ScoreType type,
- float* best_score,
- const double epsilon = 1.0/65536.0);
-
- // return a random vector of length 1 where all dimensions
- // not listed in dimensions will be 0.
- static void RandomUnitVector(const std::vector<int>& dimensions,
- SparseVector<double>* axis,
- RandomNumberGenerator<boost::mt19937>* rng);
-
- // generate a list of directions to optimize; the list will
- // contain the orthogonal vectors corresponding to the dimensions in
- // primary and then additional_random_directions directions in those
- // dimensions as well. All vectors will be length 1.
- static void CreateOptimizationDirections(
- const std::vector<int>& primary,
- int additional_random_directions,
- RandomNumberGenerator<boost::mt19937>* rng,
- std::vector<SparseVector<double> >* dirs
- , bool include_primary=true
- );
-
-};
-
-#endif