Filters in Tests
Was this helpful?
Was this helpful?
Filters can also be used to specify a sub-selection of rows in runs you would like to include in the test computation.
For example, our goal could be to create a test that asserts that, for rows where the loc column is ‘NY’, the absolute difference of means of the correct churn predictions is <= 0.2 between baseline and experiment runs.
We will walk through how this can be accomplished:
1. Navigate to the Project Detail page and click on “Configure Tests”.
Click Add Test on the Test Configuration page. Don’t forget to also set a baseline run for automated test configuration.
Create the test with the filter specified on the baseline and experiment run.
Filter for the baseline Run:
Filter for the experiment Run:
4. You can now see the new test in the Test Configuration Page. When new data is uploaded, this test will automatically run and compare the new run (as experiment) against the selected baseline run.
When new run data is uploaded, this test will run automatically and use the defined filters to sub-select for the rows that have the loc column equal to ‘NY’.
The full Test Spec in JSON format is shown below.