- QCFilter.add_iqr_test(var_name, coef=1.5, test_meaning=None, test_assessment='Indeterminate', test_number=None, flag_value=False, prepend_text=None)¶
Method to perform an interquartile range outliers test on 1D data. Data that lie within the lower and upper limits are considered non-outliers. The lower limit is the number that lies coef IQRs below the first quartile; the upper limit is the number that lies coef IQRs above the third quartile. This method will flag data failing the test in the corresponding quality control variable.
The library used to perform test does not accept NaN values. The NaN values will be filtered out prior to testing and outlier values will be matched after. This can cause the test to run slower on large data sets.
var_name (str) – Data variable name.
coef (float) – Coefficient by which interquartile range is multiplied.
test_meaning (str) – Optional text description to add to flag_meanings describing the test. Will use a default if not set.
test_assessment (str) – Optional single word describing the assessment of the test. Will use a default if not set.
test_number (int) – Optional test number to use. If not set will use next available test number.
flag_value (boolean) – Indicates that the tests are stored as integers not bit packed values in quality control variable.
prepend_text (str) – Optional text to prepend to the test meaning. Example is indicate what institution added the test.
test_info (tuple) – A tuple containing test information including var_name, qc variable name, test_number, test_meaning, test_assessment