tidyms.filter.PrevalenceFilter¶
- class PrevalenceFilter(process_classes: List[str] | None = None, lb: float | int = 0.5, ub: float | int = 1, intraclass: bool = True, verbose: bool = False, threshold: float | int = 0)¶
Remove Features detected in a low number of samples.
- Parameters:
- process_classesList[str], optional
Classes used to compute prevalence. If None, classes are obtained from sample classes in the DataContainer mapping.
- lbNumber between 0 and 1
Lower bound of acceptance.
- ubNumber between 0 and 1
Upper bound of acceptance. Must be greater or equal than lb.
- thresholdnon negative number
Minimum intensity to consider a feature as detected.
- intraclassbool
Whether to evaluate a global prevalence or a per class prevalence. If intraclass is True, the detection rate is computed for each class, and the prevalence is defined as the minimum value for the classes analyzed. If intraclass is False, the prevalence is computed as the detection rate for all the samples that belong to the process_classes.
- verbosebool
Shows a message with information after the correction has been applied.
Notes
The prevalence is computed using the detection rate, that is, the fraction of samples where a feature was detected. A feature is considered detected if its value is above a threshold. The mode parameter controls how the prevalence is computed.
Constructor of the PrevalenceFilter.