Classes | Functions
Evaluation utility
CRFSuite C API

Classes

struct  crfsuite_label_evaluation_t
 Label-wise performance values. More...
struct  crfsuite_evaluation_t
 An overall performance values. More...

Functions

void crfsuite_evaluation_init (crfsuite_evaluation_t *eval, int n)
 Initialize an evaluation structure.
void crfsuite_evaluation_finish (crfsuite_evaluation_t *eval)
 Uninitialize an evaluation structure.
void crfsuite_evaluation_clear (crfsuite_evaluation_t *eval)
 Reset an evaluation structure.
int crfsuite_evaluation_accmulate (crfsuite_evaluation_t *eval, const int *reference, const int *prediction, int T)
 Accmulate the correctness of the predicted label sequence.
void crfsuite_evaluation_finalize (crfsuite_evaluation_t *eval)
 Finalize the evaluation result.
void crfsuite_evaluation_output (crfsuite_evaluation_t *eval, crfsuite_dictionary_t *labels, crfsuite_logging_callback cbm, void *user)
 Print the evaluation result.

Function Documentation

int crfsuite_evaluation_accmulate ( crfsuite_evaluation_t eval,
const int *  reference,
const int *  prediction,
int  T 
)

Accmulate the correctness of the predicted label sequence.

Parameters:
evalThe pointer to crfsuite_evaluation_t.
referenceThe reference label sequence.
predictionThe predicted label sequence.
TThe length of the label sequence.
Returns:
int 0 if succeeded, 1 otherwise.
void crfsuite_evaluation_clear ( crfsuite_evaluation_t eval)

Reset an evaluation structure.

Parameters:
evalThe pointer to crfsuite_evaluation_t.
void crfsuite_evaluation_finalize ( crfsuite_evaluation_t eval)

Finalize the evaluation result.

Parameters:
evalThe pointer to crfsuite_evaluation_t.
void crfsuite_evaluation_finish ( crfsuite_evaluation_t eval)

Uninitialize an evaluation structure.

Parameters:
evalThe pointer to crfsuite_evaluation_t.
void crfsuite_evaluation_init ( crfsuite_evaluation_t eval,
int  n 
)

Initialize an evaluation structure.

Parameters:
evalThe pointer to crfsuite_evaluation_t.
nThe number of labels in the dataset.
void crfsuite_evaluation_output ( crfsuite_evaluation_t eval,
crfsuite_dictionary_t labels,
crfsuite_logging_callback  cbm,
void *  user 
)

Print the evaluation result.

Parameters:
evalThe pointer to crfsuite_evaluation_t.
labelsThe pointer to the label dictionary.
cbmThe callback function to receive the evaluation result.
userThe pointer to the user data that is forwarded to the callback function.

Copyright (c) 2002-2011 by Naoaki Okazaki
Thu Aug 11 2011 12:37:05