classWeights: Calculate class weights

Description Usage Arguments Value Author(s) Examples

View source: R/utils.R

Description

Calculates class weights to be used for parameter optimisation and classification such as svmOptimisation or svmClassification - see the pRoloc tutorial vignette for an example. The weights are calculated for all non-unknown classes the inverse of the number of observations.

Usage

1
classWeights(object, fcol = "markers")

Arguments

object

An instance of class MSnSet

fcol

The name of the features to be weighted

Value

A table of class weights

Author(s)

Laurent Gatto

Examples

1
2
3
4
5
library("pRolocdata")
data(hyperLOPIT2015)
classWeights(hyperLOPIT2015)
data(dunkley2006)
classWeights(dunkley2006)

pRoloc documentation built on Nov. 8, 2020, 6:26 p.m.