tidyms.filter.BlankCorrector¶
- class BlankCorrector(corrector_classes: List[str] | None = None, process_classes: List[str] | None = None, mode: str | Callable = 'lod', factor: float = 1, robust: bool = True, process_blanks: bool = True, verbose=False)¶
Corrects systematic bias due to sample preparation.
- Parameters:
- corrector_classeslist[str], optional
Classes used to generate the blank correction. If None, uses the value from blank in the DataContainer mapping attribute.
- process_classeslist[str], optional
Classes to be corrected. If None, uses the value from sample in the DataContainer mapping attribute.
- factorfloat
factor used to convert values to zero (see notes)
- mode{“mean”, “max”, “lod”, “loq”} or callable.
Function used to generate the blank correction. If mode is mean, the correction is generated as the mean of all blank samples. If max, the correction is generated as the maximum value for each feature in all blank samples. If mode is lod, the correction is the mean plus three times the standard deviation of the blanks. If mode is loq, the correction is the mean plus ten times the standard deviation.
- process_blanksbool
If True applies blank correction to blanks also.
- verbosebool
Shows a message with information after the correction has been applied.
Notes
Blank correction is applied for each feature in the following way:
\[\begin{split}X_{corrected} = 0 \textrm{ if } X < factor * mode(X_{blank}) \\ X_{corrected} = X - mode(X_{blank}) \textrm{ else}\end{split}\]Constructor for the BlankCorrector.