bucket_aibin: Applies Adaptive Inteligent Binning on a collection

Description Usage Arguments Details Value Note References Examples

View source: R/bucket_aibin.R

Description

Adaptive Inteligent Binning (aibin) recursively finds bin edges in existing bins by maximizing the information contained in each newly created bin.

Usage

1
2
3
4
bucket_aibin(x, ...)

## S3 method for class 'collection'
bucket_aibin(x, R, noise_region, snr = 1, skip = FALSE, ...)

Arguments

x

Acollection object to bucket

...

further arguments passed to or from other methods(not currenctly used).

R

resolution value, strictly positive and typically in the interval 0 > R >= 1.

noise_region

Acollection object containing a noise_region

snr

Signal to noise ratio for bucketting. snr should a real >=1. Factor by which to multiply the noise bin value. Can be useful to limit overbucketing of high-resolution data or in case of very smooth and low noise.

skip

Skip the creation of of processor step. If TRUE, this step will not be added to the list of processing steps. Typically reserved for nested function calls.

Details

AI binning will first consider the entire spectra as a single bin. It will then consider every position in the spectra as a potential splitting candidate and calulate a quality value for each splitting candidate. If the best splitting candidates fulfills quality requirements, the bin will be split and the process will be repeated on the newly created bins.

In order to limit splitting in local minima of noisy regions a minimal quality value is computed from the user-provided noise-region.

Value

An updated version of x

Note

The amount of created bins is not directly depending of a high or low R. If a maximal splitting is looked for, you should try several different values in the possible rangeof R (see references). However the differences in binning should limited to bins that are borderline noise and most likely has limited effect in the downstream analysis.

References

De Meyer T, Sinnaeve D, Van Gasse B, Tsiporkova E, Rietzschel ER, De Buyzere ML, Gillebert TC, Bekaert S, Martins JC, Van Criekinge W. NMR-based characterization of metabolic alterations in hypertension using an adaptive, intelligent binning algorithm. Anal Chem. 2008 May 15;80(10):3783-90. doi: 10.1021/ac7025964. https://pubmed.ncbi.nlm.nih.gov/18419139/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(tidySpectR)

# First we normalize the dataset and extract noise and sepctra regions
normalized <- fa_nmr %>% 
                  normalize_internalStandard(3.58, 3.64)
spectra <- normalized %>% extract(0.5, 7.2)
noise <- normalized %>% extract(7.5, Inf)

bucketted <- bucket_aibin(spectra, 0.5, noise)
bucketted

CVUA-RRW/tidySpectR documentation built on April 13, 2021, 11:41 a.m.