flowFPModel: Fingerprint model constructor

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

View source: R/flowFPModel.R

Description

A constructor for objects of type flowFPModel-class.

Usage

1
2
flowFPModel(fcs, name="Default Model", parameters=NULL, nRecursions="auto", 
            dequantize=TRUE, sampleSize=NULL, excludeTime=TRUE)

Arguments

fcs

Training data for model, either a flowFrame or flowSet.

parameters

A vector of parameters to be considered during model construction.

nRecursions

Number of times the FCS training data will be subdivided. Each level generated 2^nRecursions bins. A warning will be generated if the number of expected events in each bin is < 1. (e.g. if your training set had 1000 events, and you specified level=10.)

dequantize

If TRUE, all of the events in the training set will be made unique by adding a tiny value (proportional to the ordinal position of each event) to the data.

sampleSize

Used to specify the per-flowFrame sample size of the data to use in model generation. If NULL, all of the data in x is used. Setting this to a smaller number will speed up processing, at the cost of accuracy.

name

A descriptive name assigned to the model.

excludeTime

If TRUE (default) and no parameters are specified, the model constructor will atempt to exclude the time parameter from consideration when building the model. The time parameter is identified as have the label 'time', matched ignoring case.

Details

This function is used to create a flowFPModel, which can then be used to create a set of fingerprints using flowFP. A model is a representation of the multivariate probability density function for the training set x. This representation is in the form of a set of bins, each of which contains (nearly) the same number of events in the training set. Thus, the model can be regarded as a multivariate histogram of x with fixed bin count and variable bin size. Bins will be smallest in regions of high density, and largest in regions that are sparsely populated.

Bins are constructed by recursively subdividing the multivariate space specified by parameters. At the first level, the entire space is divided in half in the direction of the parameter with the highest variance. At the next level, each of the halves from the first level is itself divided in half, again in the direction of the parameter whose variance (among the events in the parent bin) is the highest. Thus, for each level the number of resulting bins is doubled. The number of bins in the model is thus 2^nRecursions.

A model is of little interest by itself. Its only utility is to provide a sort of basis function for forming fingerprints. It may be interesting in some cases to use the entire set x to build the model, and then to generate fingerprints for each instance in x. For this reason, calling flowFP without a model causes flowFPModel to be invoked silently under the hood in order to create a model of the flowSet provided to flowFP.

Value

An object of type flowFPModel is returned.

Note

If a flowSet is provided as input, it is internally collapsed to a flowFrame for binning.

Author(s)

Herb Holyst <holyst@mail.med.upenn.edu>, Wade Rogers <rogersw@mail.med.upenn.edu>

References

M. Roederer, et. al. (2001) Probability Binning Comparison: A Metric for Quantitating Multivariate Distribution Differences, Cytometry 45, 47-55.

W. Rogers et. al. (2008) Cytometric Fingerprinting: Quantitative Characterization of Multivariate Distributions, Cytometry Part A 73, 430-441.

See Also

flowFP, flowFPModel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
	# load a flowSet to use as an example.
	library(flowFP)
	data(fs1)
	fs1
	model <- flowFPModel(fs1, parameters=c(4,5), nRecursions=6)
	
	fp <- flowFP(fs1, model)
	
	plot(fp)
	

rogerswt/flowFP_abandoned documentation built on Sept. 2, 2020, 12:39 p.m.