compute.balanced: Balances between negative and positive samples by...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/compute.balanced.R

Description

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

Usage

1

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

1
2
3
4
5
6
7
8
9
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_)

FeaLect documentation built on Feb. 26, 2020, 1:06 a.m.