Sometimes, while running a Tamr mastering project, you may want to programmatically extract the model statistics; like recall, accuracy, and precision. You may want these to test how well you were able to transfer labeled pairs from one project to the next. In whatever use case you desire these statistics for, after searching the Tamr toolbox and other Tamr resources, you can’t find any existing functions or instructions on how to get the statistics you need.
In order to resolve the issue, add the following function into your jupyter notebook or .py file that you are using to programmatically run jobs for your Tamr mastering project.
Note: This example makes use of non-versioned APIs and so is not guaranteed to be stable across future versions of Tamr.
Follow these steps:
- This following code only requires the tamr_unify_client and YAML packages. You will most likely have already imported these packages if you are already programmatically running jobs, but make sure you have the following packages imported into your project:
- Set your credentials and define your Tamr client. This can be done programmatically in the following way (see here for more information):
- Add the following function to your project:
- Call the function and project:
Updated over 1 year ago