bilbo package¶
Subpackages¶
- bilbo.components package
- Subpackages
- bilbo.components.crf package
- bilbo.components.features package
- Submodules
- bilbo.components.features.decorator_feature module
- bilbo.components.features.externalfeatures module
- bilbo.components.features.features module
- bilbo.components.features.localfeatures module
- bilbo.components.features.regexfeatures module
- bilbo.components.features.xmlfeatures module
- Module contents
- bilbo.components.shape_data package
- bilbo.components.svm package
- Submodules
- bilbo.components.component module
- Module contents
- Subpackages
- bilbo.libs package
- bilbo.storage package
- bilbo.tests package
- bilbo.tokenizers package
- bilbo.utils package
Submodules¶
bilbo.bilbo module¶
bilbo.eval module¶
-
class
bilbo.eval.
Evaluation
(gold, predicted, option='fine')¶ Bases:
object
Evaluation class
-
evaluate
()¶ Compute all the precisions, recalls, f-measures and count for the confusion matrix :return: dict(label, precision), dict(label, recall), dict(label, f_measures), dict(label, count), dict(macro)
-
get_col_sum
(label)¶ return the sum of a given column
-
get_confusion_matrix
()¶ Generate the confusion matrix populate matrix with the confusion matrix populate imap
-
get_count_for_label
(label)¶ param label : a given label return the number of occurences for a given label
-
get_count_for_labels
()¶ return a dict with the number of occurences for each label :return: dict (label, count)
-
get_f_measure_for_labels
(beta: float = 1)¶ Returns F1 score for all labels. See http://en.wikipedia.org/wiki/F1_score
Parameters: beta – the beta parameter higher than 1 prefers recall,
lower than 1 prefers precision
Returns: dict (label, F1)
-
get_macro_f_measure
()¶ Returns: the mean f-measure for the whole document
-
get_macro_f_measure_weighted
()¶ Returns: the weighted mean f-measure for the whole document
-
get_macro_precision
()¶
-
get_macro_precision_weighted
()¶
-
get_macro_recall
()¶
-
get_macro_recall_weighted
()¶
-
get_precision_for_label
(label)¶ param label : a given label return the precision for a given label
-
get_precision_for_labels
()¶ return a dict with the precition of each label :return: dict (label, precision)
-
get_recall_for_label
(label)¶ param label : a given label return the recall for a given label
-
get_recall_for_labels
()¶ return a dict with the recall of each label :return: dict (label, recall)
-
get_row_sum
(label)¶ return the sum of a given row
-
get_true_positive
(label)¶ return the true positive from the matrix
-
get_unique_label
()¶ return a list of unique label from the gold and predicted lists
-
print_csv
(precisions, recalls, f_measures, counts, macro, csvfile)¶
-
print_std
(precisions, recalls, f_measures, counts, macro)¶
-