#include <model.h>
|
| Model (const option_t &opts) |
|
floatval_t | score (const StateItem &state, const Action &act, bool avg) |
|
floatval_t | score (const ScoreContext &ctx, const Action &act, bool avg) |
|
void | update (const StateItem &state, const Action &act, int timestamp, floatval_t scale) |
|
void | update (const ScoreContext &ctx, const Action &act, int timestamp, floatval_t scale) |
|
void | flush (int timestamp) |
|
bool | save (std::ostream &os) |
|
bool | load (std::istream &is) |
|
ZGen::ShiftReduce::Model::Model |
( |
const option_t & |
opts | ) |
|
void ZGen::ShiftReduce::Model::flush |
( |
int |
timestamp | ) |
|
bool ZGen::ShiftReduce::Model::load |
( |
std::istream & |
is | ) |
|
Load the model fron input stream.
- Parameters
-
- Returns
- bool If successfully loaded, return true; otherwise return false.
bool ZGen::ShiftReduce::Model::save |
( |
std::ostream & |
os | ) |
|
Save the model into the output stream.
- Parameters
-
[out] | os | The output stream. |
- Returns
- bool If successfully saved, return true; otherwise return false.
Get score for the state.
- Parameters
-
[in] | state | The state |
[in] | act | The action |
[in] | avg | The average parameter. |
- Returns
- floatval_t The score of applying the action act to the state.
Get score for the state context.
- Parameters
-
[in] | ctx | The input state context. |
[in] | act | The action. |
[in] | avg | The average parameter. |
- Returns
- floatval_t The score of applying the action act to the state context.
Update the model with the state.
- Parameters
-
[in] | state | The input state. |
[in] | act | The action. |
[in] | timestamp | The updated timestamp. |
[in] | scale | The updated scale. |
Update the model with the state context.
- Parameters
-
[in] | ctx | The input state context. |
[in] | act | The action. |
[in] | timestamp | The updated timestamp. |
[in] | scale | The updated scale. |
The documentation for this class was generated from the following files: