loess_smooth: Estimate the probabilities of a binary label as a function of...

Description Usage Arguments Details Examples

Description

Given a binary feature (0 or 1) of a set of individuals sequenced by some numerical attribute (length, say), this function performs loess smoothing on the observed feature values in order to the estimate the probability that each feature is 1, expressed as a function of the numerical attribute.

Usage

1
2
loess_smooth(lengths_all = NULL, lengths_0 = NULL, lengths_1 = NULL,
  monotonicity = NULL)

Arguments

lengths_all

NULL, or a vector of all lengths

lengths_0

NULL, or a vector of lengths for which the attribute is observed to be 0

lengths_1

NULL, or a vector of lengths for which the attribute is observed to be 1

monotonicity

NULL, 'increasing' or 'decreasing'.

Details

If set to 'increasing' (resp. 'decreasing'), the monotonicity argument enforces that the resulting probabilities be monotone by setting each label probability equal to the max (resp. min) of all estimated label probabilities on a shorter length individual.

Examples

1
2
> probs = loess_smooth(1:10, lengths_0=c(6, 7, 10), monotonicity='increasing')
> label_probs$length

dmanescu/enrichment-test documentation built on May 15, 2019, 9:19 a.m.