modSwap: Swap Case Subjects

Description Usage Arguments Details Value Methods (by class)

Description

This experimental function mutates a percentage of case subjects into noisy positives, false positives, or defined out-groups.

Usage

1
2
3
4
5
modSwap(object, how = "fp", percent = 10, theta = 1)

## S4 method for signature 'ExprsBinary'
modSwap(object, how = "fp", percent = 10,
  theta = 1)

Arguments

object

An ExprsBinary object to mutate.

how

A character string. The method used to mutate case subjects. Select from "rp.1", "rp.2", "fp", "ng", or "tg". Alternatively, another ExprsBinary object. See Details.

percent

A numeric scalar. The percentage of subjects to mutate.

theta

A numeric scalar. Applies a weight to the distribution of means when mutating subjects via the "ng" or "tg" method.

Details

This function includes several methods for distorting the features of ExprsBinary subjects. The "rp.1" method randomizes subject vectors to create "subject noise". The "rp.2" method creates a new subject vector by randomly sampling feature values from the respective feature vector. The "fp" method creates a new subject vector by randomly sampling feature values from the respective control feature vector.

The "ng" and "tg" methods create out-groups by defining new means for each feature. These methods yield fixed distributions around new feature means such that the mean of all new feature means remains constant. The argument theta dictates how much the new feature mean might differ from the original feature mean (where larger theta values lead to more similar new feature means). For the "ng" method, the mean of new feature means equals that of the original features for case subjects only. On the other hand, for the "tg" method, the mean of new feature means equals that of the original features for all subjects.

Alternatively, by providing another ExprsBinary object as the how argument, this function will swap a percentage of case subjects from the main dataset with control subjects from the second dataset.

Value

An ExprsBinary object containing mutated subjects with an index appended to the $mutated column of the @annot slot.

Methods (by class)


tpq/exprso documentation built on July 27, 2019, 8:44 a.m.