paretoscale: Pareto scaling method performed on the columns of the data...

Description Usage Arguments Details Value Author(s) Examples

Description

The function provides a data pretreatment approach called Pareto Scaling. Each column of the table is given a mean of zero by substracting the column column mean from each value in the column; then each value in each column is divided by a scaling factor, represented by the square root of the standard deviation of the column values.

Usage

1
paretoscale(data, exclude = T)

Arguments

data

a n x p matrix of n observations and p predictors. If the first two columns of the matrix represent respectively the sample names and the class labels associated to each sample, the scaling method should not include these two columns

exclude

a boolean variable. If set to True the scaling method will exclude the first two columns.

Details

This function is useful when variables have significantly different scales. It is generally the preferred option in NMR Metabolomics because it is a good compromise between no scaling (centering) and auto scaling

Value

a scaled version of the input matrix

Author(s)

Piegiorgio Palla

Examples

1
2
3
4
5
#' ## load the included example dataset
data(cachexiaData)
## call paretoscale with the parameter exclude set to TRUE (default) 
## in order to exclude the first two columns of the dataset from scaling
data.scaled <- paretoscale(cachexiaData, exclude = TRUE) 

Example output

Loading required package: AUCRF
Loading required package: randomForest
randomForest 4.6-12
Type rfNews() to see new features/changes/bug fixes.
AUCRF 1.1

Attaching package: 'RFmarkerDetector'

The following object is masked from 'package:stats':

    screeplot

RFmarkerDetector documentation built on May 2, 2019, 3:42 p.m.