MosesTuning::Point Class Reference

#include <Point.h>

List of all members.

Public Member Functions

 Point ()
 Point (const std::vector< parameter_t > &init, const std::vector< parameter_t > &min, const std::vector< parameter_t > &max)
 ~Point ()
void Randomize ()
double operator* (const FeatureStats &) const
const Point operator+ (const Point &) const
void operator+= (const Point &)
const Point operator* (float) const
void Normalize ()
void NormalizeL2 ()
void NormalizeL1 ()
void GetAllWeights (std::vector< parameter_t > &w) const
statscore_t GetScore () const
void SetScore (statscore_t score)

Static Public Member Functions

static unsigned int getdim ()
static void setdim (std::size_t d)
static unsigned int getpdim ()
static void setpdim (std::size_t pd)
static void set_optindices (const std::vector< unsigned int > &indices)
static const std::vector
< unsigned int > & 
get_optindices ()
static bool OptimizeAll ()

Friends

class Optimizer
std::ostream & operator<< (std::ostream &o, const Point &P)


Detailed Description

A class that handles the subset of the Feature weight on which we run the optimization.

Definition at line 20 of file Point.h.


Constructor & Destructor Documentation

MosesTuning::Point::Point (  ) 

Definition at line 27 of file Point.cpp.

MosesTuning::Point::Point ( const std::vector< parameter_t > &  init,
const std::vector< parameter_t > &  min,
const std::vector< parameter_t > &  max 
)

MosesTuning::Point::~Point (  ) 

Definition at line 54 of file Point.cpp.


Member Function Documentation

static const std::vector<unsigned int>& MosesTuning::Point::get_optindices (  )  [inline, static]

Definition at line 74 of file Point.h.

void MosesTuning::Point::GetAllWeights ( std::vector< parameter_t > &  w  )  const

Return a vector of size m_pdim where all weights have been put (including fixed ones).

Referenced by MosesTuning::operator<<().

Here is the caller graph for this function:

static unsigned int MosesTuning::Point::getdim (  )  [inline, static]

Definition at line 56 of file Point.h.

Referenced by MosesTuning::Optimizer::LineOptimize(), and MosesTuning::SimpleOptimizer::TrueRun().

Here is the caller graph for this function:

static unsigned int MosesTuning::Point::getpdim (  )  [inline, static]

Definition at line 63 of file Point.h.

statscore_t MosesTuning::Point::GetScore (  )  const [inline]

Definition at line 113 of file Point.h.

Referenced by BOOST_AUTO_TEST_CASE(), MosesTuning::Optimizer::Run(), MosesTuning::RandomDirectionOptimizer::TrueRun(), and MosesTuning::SimpleOptimizer::TrueRun().

Here is the caller graph for this function:

void MosesTuning::Point::Normalize (  )  [inline]

Definition at line 101 of file Point.h.

References NormalizeL2().

Here is the call graph for this function:

void MosesTuning::Point::NormalizeL1 (  ) 

Definition at line 137 of file Point.cpp.

Referenced by main().

Here is the caller graph for this function:

void MosesTuning::Point::NormalizeL2 (  ) 

Definition at line 124 of file Point.cpp.

Referenced by Normalize().

Here is the caller graph for this function:

const Point MosesTuning::Point::operator* ( float  l  )  const

Definition at line 104 of file Point.cpp.

double MosesTuning::Point::operator* ( const FeatureStats F  )  const

Definition at line 65 of file Point.cpp.

References MosesTuning::FeatureStats::get(), and OptimizeAll().

Here is the call graph for this function:

const Point MosesTuning::Point::operator+ ( const Point p2  )  const

Definition at line 82 of file Point.cpp.

References UTIL_THROW_IF.

void MosesTuning::Point::operator+= ( const Point p2  ) 

Definition at line 95 of file Point.cpp.

References UTIL_THROW_IF.

static bool MosesTuning::Point::OptimizeAll (  )  [inline, static]

Definition at line 78 of file Point.h.

Referenced by operator*().

Here is the caller graph for this function:

void MosesTuning::Point::Randomize (  ) 

Definition at line 56 of file Point.cpp.

References util::rand_incl(), and UTIL_THROW_IF.

Referenced by MosesTuning::RandomOptimizer::TrueRun(), MosesTuning::RandomDirectionOptimizer::TrueRun(), and MosesTuning::SimpleOptimizer::TrueRun().

Here is the call graph for this function:

Here is the caller graph for this function:

static void MosesTuning::Point::set_optindices ( const std::vector< unsigned int > &  indices  )  [inline, static]

Definition at line 70 of file Point.h.

static void MosesTuning::Point::setdim ( std::size_t  d  )  [inline, static]

Definition at line 59 of file Point.h.

static void MosesTuning::Point::setpdim ( std::size_t  pd  )  [inline, static]

Definition at line 66 of file Point.h.

void MosesTuning::Point::SetScore ( statscore_t  score  )  [inline]

Definition at line 116 of file Point.h.

Referenced by MosesTuning::Optimizer::LineOptimize(), MosesTuning::Optimizer::Run(), and MosesTuning::RandomOptimizer::TrueRun().

Here is the caller graph for this function:


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const Point P 
) [friend]

Write the Whole featureweight to a stream (ie m_pdim float).

friend class Optimizer [friend]

Definition at line 22 of file Point.h.


The documentation for this class was generated from the following files:

Generated on Thu Jul 6 00:34:19 2017 for Moses by  doxygen 1.5.9