Exemple #1
0
/**
 * Load a MaxentModel from a file.
 *
 * @param model The name of the model to load
 */
void MaxentModel::load(const string& model) {
    MaxentModelFile f;
    f.load(model);
    m_pred_map = f.pred_map();
    m_outcome_map = f.outcome_map();
    f.params(m_params, m_n_theta, m_theta);
}
Exemple #2
0
/*
 * Load training data.
 *
 * @param events the file name of
 */
void Trainer::load_training_data(const string& events, const string& model) {
    shared_ptr<MEEventSpace> e(new MEEventSpace);
    load_events_txt(events, *e);

    MaxentModelFile f;
    f.load(model);
    f.params(m_params, m_n_theta, m_theta);

    m_es = e;
}