add methods to linker
@@ -42,7 +42,11 @@ from .pipeline import SQLPipeline
from .vertically_concatenate import vertically_concatenate_sql
from .m_from_labels import estimate_m_from_pairwise_labels
-from .accuracy import roc_table
+from .accuracy import (
+ roc_table,
+ prediction_errors_from_labels_table,
+ prediction_errors_from_label_column,
+)
from .match_weights_histogram import histogram_data
from .comparison_vector_distribution import comparison_vector_distribution_sql
@@ -1969,3 +1973,33 @@ class Linker:
" possible comparisons, we expect a total of around "
f"{prob*cartesian:,.2f} matching pairs"
)
+
+ def prediction_errors_from_labels_table(
+ self,
+ labels_tablename,
+ include_false_positives=True,
+ include_false_negatives=True,
+ threshold=0.5,
+ ):
+ return prediction_errors_from_labels_table(
+ self,
+ labels_tablename,
+ include_false_positives,
+ include_false_negatives,
+ threshold,
+ )
+
+ def prediction_errors_from_label_column(
+ self,
+ label_colname,
+ include_false_positives=True,
+ include_false_negatives=True,
+ threshold=0.5,
+ ):
+ return prediction_errors_from_label_column(
+ self,
+ label_colname,
+ include_false_positives,
+ include_false_negatives,
+ threshold,
+ )
