normalize.features: Perform feature normalization

Description Usage Arguments Details Value Examples

View source: R/normalize_features.r

Description

This function performs feature normalization according to user- specified parameters.

Usage

1
2
3
4
normalize.features(siamcat,
norm.method = c("rank.unit", "rank.std", "log.std", "log.unit", "log.clr"),
norm.param = list(log.n0 = 1e-06, sd.min.q = 0.1, n.p = 2, norm.margin = 1),
verbose = 1)

Arguments

siamcat

an object of class siamcat-class

norm.method

string, normalization method, can be one of these: 'c('rank.unit', 'rank.std', 'log.std', 'log.unit', 'log.clr')

norm.param

list, specifying the parameters of the different normalization methods, see details for more information

verbose

control output: 0 for no output at all, 1 for only information about progress and success, 2 for normal level of information and 3 for full debug information, defaults to 1

Details

There are five different normalization methods available:

The list entries in 'norm.param' specify the normalzation parameters, which are dependant on the normalization method of choice:

The function additionally allows to perform a frozen normalization on a different dataset. After normalizing the first dataset, the output list $par contains all parameters of the normalization. Supplying this list together with a new dataset will normalize the second dataset in a comparable way to the first dataset (e.g. by using the same mean for the features for z-score standardization)

Value

an object of class siamcat-class with normalized features

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
    # Example data
    data(siamcat_example)
    # since the whole pipeline has been run in the example data, exchange the
    # normalized features with the original features
    siamcat_example <- reset.features(siamcat_example)

    # Simple example
    siamcat_norm <- normalize.features(siamcat_example,
    norm.method='rank.unit')

    # log.unit example
    siamcat_norm <- normalize.features(siamcat_example,
    norm.method='log.unit', norm.param=list(log.n0=1e-05, n.p=1,
    norm.margin=1))

    # log.std example
    siamcat_norm <- normalize.features(siamcat_example,
    norm.method='log.std', norm.param=list(log.n0=1e-05, sd.min.q=.1))

KonradZych/SIAMCAT documentation built on May 17, 2019, 6:20 p.m.