Joshua
open source statistical hierarchical phrase-based machine translation system
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
joshua.zmert.IntermediateOptimizer Class Reference
Collaboration diagram for joshua.zmert.IntermediateOptimizer:
[legend]

List of all members.

Public Member Functions

 IntermediateOptimizer (int in_j, Semaphore in_blocker, Vector< String > in_threadOutput, double[] in_initialLambda, double[] in_finalLambda, int[][] in_best1Cand_suffStats, double[] in_finalScore, int[] in_candCount, double[][][] in_featVal_array, ConcurrentHashMap< Integer, int[]>[] in_suffStats_array)
void run ()

Static Public Member Functions

static void set_MERTparams (int in_numSentences, int in_numDocuments, int[] in_docOfSentence, int[] in_docSubsetInfo, int in_numParams, double[] in_normalizationOptions, boolean[] in_isOptimizable, double[] in_minThValue, double[] in_maxThValue, boolean in_oneModificationPerIteration, EvaluationMetric in_evalMetric, String in_tmpDirPrefix, int in_verbosity)

Private Member Functions

void set_thresholdsForParam (TreeMap< Double, TreeMap< Integer, int[]>> thresholdsAll, int c, double[] currLambda, TreeSet< Integer >[] indicesOfInterest)
double[] line_opt (TreeMap< Double, TreeMap< Integer, int[]>> thresholdsAll, int[] indexOfCurrBest, int c, double[] lambda)
void set_suffStats_array (TreeSet< Integer >[] indicesOfInterest)
double L_norm (double[] A, double pow)
int[] initial_indexOfCurrBest (double[] temp_lambda, TreeSet< Integer >[] indicesOfInterest)
double[] bestParamToChange (TreeMap< Double, TreeMap< Integer, int[]>>[] thresholdsAll, int lastChanged_c, double[] currLambda)
void normalizeLambda (double[] origLambda)
void real_run ()
void println (String str, int priority)
void print (String str, int priority)
void println (String str)
void print (String str)
String lambdaToString (double[] lambdaA)

Private Attributes

int j
Semaphore blocker
Vector< String > threadOutput
String strToPrint
double[] initialLambda
double[] finalLambda
int[][] best1Cand_suffStats
double[] finalScore
int[] candCount
double[][][] featVal_array
ConcurrentHashMap< Integer,
int[]>[] 
suffStats_array

Static Private Attributes

static final DecimalFormat f4 = new DecimalFormat("###0.0000")
static final double NegInf = (-1.0 / 0.0)
static final double PosInf = (+1.0 / 0.0)
static int numSentences
static int numDocuments
static int[] docOfSentence
static int docSubset_firstRank
static int docSubset_lastRank
static boolean optimizeSubset
static int numParams
static double[] normalizationOptions
static boolean[] isOptimizable
static double[] minThValue
static double[] maxThValue
static boolean oneModificationPerIteration
static EvaluationMetric evalMetric
static String metricName
static String metricName_display
static int suffStatsCount
static String tmpDirPrefix
static int verbosity

Constructor & Destructor Documentation

joshua.zmert.IntermediateOptimizer.IntermediateOptimizer ( int  in_j,
Semaphore  in_blocker,
Vector< String >  in_threadOutput,
double[]  in_initialLambda,
double[]  in_finalLambda,
int  in_best1Cand_suffStats[][],
double[]  in_finalScore,
int[]  in_candCount,
double  in_featVal_array[][][],
ConcurrentHashMap< Integer, int[]>[]  in_suffStats_array 
)

Member Function Documentation

double [] joshua.zmert.IntermediateOptimizer.bestParamToChange ( TreeMap< Double, TreeMap< Integer, int[]>>[]  thresholdsAll,
int  lastChanged_c,
double[]  currLambda 
) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

int [] joshua.zmert.IntermediateOptimizer.initial_indexOfCurrBest ( double[]  temp_lambda,
TreeSet< Integer >[]  indicesOfInterest 
) [private]

Here is the caller graph for this function:

double joshua.zmert.IntermediateOptimizer.L_norm ( double[]  A,
double  pow 
) [private]

Here is the caller graph for this function:

String joshua.zmert.IntermediateOptimizer.lambdaToString ( double[]  lambdaA) [private]

Here is the caller graph for this function:

double [] joshua.zmert.IntermediateOptimizer.line_opt ( TreeMap< Double, TreeMap< Integer, int[]>>  thresholdsAll,
int[]  indexOfCurrBest,
int  c,
double[]  lambda 
) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void joshua.zmert.IntermediateOptimizer.normalizeLambda ( double[]  origLambda) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void joshua.zmert.IntermediateOptimizer.print ( String  str,
int  priority 
) [private]

Here is the caller graph for this function:

void joshua.zmert.IntermediateOptimizer.print ( String  str) [private]
void joshua.zmert.IntermediateOptimizer.println ( String  str,
int  priority 
) [private]

Here is the caller graph for this function:

void joshua.zmert.IntermediateOptimizer.println ( String  str) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

static void joshua.zmert.IntermediateOptimizer.set_MERTparams ( int  in_numSentences,
int  in_numDocuments,
int[]  in_docOfSentence,
int[]  in_docSubsetInfo,
int  in_numParams,
double[]  in_normalizationOptions,
boolean[]  in_isOptimizable,
double[]  in_minThValue,
double[]  in_maxThValue,
boolean  in_oneModificationPerIteration,
EvaluationMetric  in_evalMetric,
String  in_tmpDirPrefix,
int  in_verbosity 
) [static]

Here is the call graph for this function:

Here is the caller graph for this function:

void joshua.zmert.IntermediateOptimizer.set_suffStats_array ( TreeSet< Integer >[]  indicesOfInterest) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void joshua.zmert.IntermediateOptimizer.set_thresholdsForParam ( TreeMap< Double, TreeMap< Integer, int[]>>  thresholdsAll,
int  c,
double[]  currLambda,
TreeSet< Integer >[]  indicesOfInterest 
) [private]

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

final DecimalFormat joshua.zmert.IntermediateOptimizer.f4 = new DecimalFormat("###0.0000") [static, private]
double [] joshua.zmert.IntermediateOptimizer.maxThValue [static, private]
double [] joshua.zmert.IntermediateOptimizer.minThValue [static, private]
final double joshua.zmert.IntermediateOptimizer.NegInf = (-1.0 / 0.0) [static, private]
final double joshua.zmert.IntermediateOptimizer.PosInf = (+1.0 / 0.0) [static, private]
ConcurrentHashMap<Integer, int[]> [] joshua.zmert.IntermediateOptimizer.suffStats_array [private]