#include <learner.h>
The learning result status.
| Enumerator |
|---|
| CONVERGED |
|
| SAFE_UNCONVERGED |
|
| UNSAFE_UNCONVERGED |
|
| NO_GOLD_IN_AGENDA |
|
| ZGen::BestFirst::Learner::Learner |
( |
Model * |
model, |
|
|
int |
max_iteration = 1 |
|
) |
| |
| void ZGen::BestFirst::Learner::config_model |
( |
Model * |
model | ) |
|
Config the model onto the learner.
- Parameters
-
| [in] | model | The pointer to the model. |
| void ZGen::BestFirst::Learner::config_timestamp |
( |
int |
timestamp | ) |
|
Config the timestamp to learner.
- Parameters
-
| [in] | timestamp | The timestamp. |
The main function for Perceptron learning. The learning process includes:
- 1: calculate the number of gold spans in the agenda.
- 2: check whether the current agenda is converged.
- 3: while not converged: update parameter, check converged
PREREQUISITE
- model is configed.
- timestamp is configed.
- Parameters
-
| [in] | gold_spans | The set of gold spans. |
| in/out] | agenda The agenda. |
- Returns
- int The learning status.
The documentation for this class was generated from the following files: