compute.balanced {FeaLect}R Documentation

Balances between negative and positive samples by oversampling.

Description

If negative samples are less than positive ones, more copies of the negative cases are added and vice versa.

Usage

compute.balanced(F_, L_)

Arguments

F_

The feature matrix, each column is a feature.

L_

The vector of labels named according to the rows of F.

Details

Considerably unbalanced classes may be probabilistic for fitting some models.

Value

Returns a list of:

F_

The feature matrix, each column is a feature.

L_

The vector of labels named according to the rows of F.

Author(s)

Habil Zare

References

"Statistical Analysis of Overfitting Features", manuscript in preparation.

See Also

FeaLect, train.doctor, doctor.validate, random.subset, compute.balanced,compute.logistic.score, ignore.redundant, input.check.FeaLect

Examples

library(FeaLect)
data(mcl_sll)
F <- as.matrix(mcl_sll[ ,-1])	# The Feature matrix
L <- as.numeric(mcl_sll[ ,1])	# The labels
names(L) <- rownames(F)
message(L)

balanced <- compute.balanced(F_=F, L_=L)
message(balanced$L_)


[Package FeaLect version 1.20 Index]