hazy_model Struct Reference

This model allows enapsulates the state of the SVM and the high, and low water. More...

#include <hazy_model.h>

List of all members.

Public Types

 LAZY_NAIVE
 EAGER_NAIVE
 LAZY_HAZY
 EAGER_HAZY
enum  strategy { LAZY_NAIVE, EAGER_NAIVE, LAZY_HAZY, EAGER_HAZY }

Public Member Functions

bool test_and_set_model_in_db ()
 Returns true if the model is in the database.
void invalidate_db_model ()
 Invalidates model_is_in_db variable.
bool isEager ()
 Returns whether the strategy is eager or not.
bool isLazy ()
 Returns whether the strategy is lazy or not.
bool isHazy ()
 Returns whether the strategy is hazy or not.
bool isNaive ()
 Returns whether the strategy is naive or not.
 hazy_model (struct model &model, strategy s)
 hazy_model constructor

Static Public Member Functions

static bool isEager (strategy s)
 Returns whether given strategy is eager or not.
static bool isLazy (strategy s)
 Returns whether given strategy is lazy or not.
static bool isHazy (strategy s)
 Returns whether given strategy is hazy or not.
static bool isNaive (strategy s)
 Returns whether given strategy is naive or not.

Public Attributes

model_model
enum hazy_model::strategy _strategy
double low_water
double high_water
bool model_is_in_db
 This is used by the LAZY algorithms to determine if they need to reupdate/cache the model inside the database.


Detailed Description

This model allows enapsulates the state of the SVM and the high, and low water.

It also contains some helper functions for the enum, strategy


Member Enumeration Documentation

enum hazy_model::strategy

Enumerator:
LAZY_NAIVE 
EAGER_NAIVE 
LAZY_HAZY 
EAGER_HAZY 


Constructor & Destructor Documentation

hazy_model::hazy_model ( struct model model,
strategy  s 
) [inline]

hazy_model constructor

Parameters:
[in] model sgd model
[in] s strategy being used


Member Function Documentation

void hazy_model::invalidate_db_model (  )  [inline]

Invalidates model_is_in_db variable.

static bool hazy_model::isEager ( strategy  s  )  [inline, static]

Returns whether given strategy is eager or not.

Parameters:
[in] s strategy
Returns:
s is eager or not

bool hazy_model::isEager (  )  [inline]

Returns whether the strategy is eager or not.

static bool hazy_model::isHazy ( strategy  s  )  [inline, static]

Returns whether given strategy is hazy or not.

Parameters:
[in] s strategy
Returns:
s is hazy or not

bool hazy_model::isHazy (  )  [inline]

Returns whether the strategy is hazy or not.

static bool hazy_model::isLazy ( strategy  s  )  [inline, static]

Returns whether given strategy is lazy or not.

Parameters:
[in] s strategy
Returns:
s is lazy or not

bool hazy_model::isLazy (  )  [inline]

Returns whether the strategy is lazy or not.

static bool hazy_model::isNaive ( strategy  s  )  [inline, static]

Returns whether given strategy is naive or not.

Parameters:
[in] s strategy
Returns:
s is naive or not

bool hazy_model::isNaive (  )  [inline]

Returns whether the strategy is naive or not.

bool hazy_model::test_and_set_model_in_db (  )  [inline]

Returns true if the model is in the database.


Member Data Documentation

struct model& hazy_model::_model

enum hazy_model::strategy hazy_model::_strategy

double hazy_model::high_water

double hazy_model::low_water

bool hazy_model::model_is_in_db

This is used by the LAZY algorithms to determine if they need to reupdate/cache the model inside the database.

It is to support an optimization. The protocol is that a model is in the db, until an update arrives, then we can no longer assume that the model is inside the databse. when we execute the prepared stmt (or equivalent) of model caching we will set this value to be true.


The documentation for this struct was generated from the following file:
Generated on Wed Dec 15 10:46:16 2010 for Hazy_System by  doxygen 1.4.7