theplu::yat::normalizer::qQuantileNormalizer Class Reference

Perform Q-quantile normalization. More...

#include <yat/normalizer/qQuantileNormalizer.h>

List of all members.

Public Member Functions

template<typename ForwardIterator>
 qQuantileNormalizer (ForwardIterator first, ForwardIterator last, unsigned int Q)
 Constructor.
template<typename RandomAccessIterator1, typename RandomAccessIterator2>
void operator() (RandomAccessIterator1 first, RandomAccessIterator1 last, RandomAccessIterator2 result) const
 Perform the Q-quantile normalization.

Classes

class  Partitioner
 Partition a range of data into equal sizes.


Detailed Description

Perform Q-quantile normalization.

Perform a Q-quantile normalization on a source range, after which it will approximately have the same distribution of data as the target range (the Q-quantiles are the same). The rank of an element in the source range is not changed.

The class works also with unweighed ranges, and there is no restriction that weighted source range requires weighted target range or vice versa.

Normalization goes like this:

Since:
New in yat 0.5

Constructor & Destructor Documentation

template<typename ForwardIterator>
theplu::yat::normalizer::qQuantileNormalizer::qQuantileNormalizer ( ForwardIterator  first,
ForwardIterator  last,
unsigned int  Q 
) [inline]

Constructor.

Divides a sorted copy of range [first,last) into Q parts. Parts are divided such that the sum of weights is approximately the same in the different parts. If a relative weight, $ w_i / \sum w_i $, is larger than 1/Q this might be difficult to achieve, in which case a an exception is thrown. In the unweighted case this implies that Q should be smaller (or equal) than number of elements in [first, last).

The range supplied to the constructor sets the target distribution.

As the source range is also divided into Q parts (when operator() is called), it is recommended to keep Q smaller (or equal) than the size of ranges that will be normalized.

Also, Q must not be smaller than 3 due to restrictions in the cubic spline fit utilized in the normalization.

Type Requirements:


Member Function Documentation

template<typename RandomAccessIterator1, typename RandomAccessIterator2>
void theplu::yat::normalizer::qQuantileNormalizer::operator() ( RandomAccessIterator1  first,
RandomAccessIterator1  last,
RandomAccessIterator2  result 
) const [inline]

Perform the Q-quantile normalization.

Elements in [first, last) are normalized as described above and the result is assigned to [result, result + last-first). Input range [first, last) is not modified. If ranges are weighted, the weights are copied from [first, last) to result range.

It is possible to normalize "in place"; it is permissible for first and result to be the same. However, as assignment occurs sequentially, the operation is undefined if result is the same as any in range [first, last).

Type Requirements:

  • RandomAccessIterator1 is a model of Random Access Iterator
  • RandomAccessIterator1 is either a Weighted Iterator or unweighted with value type convertible to double.
  • RandomAccessIterator1's value type is convertible to RandomAccessIterator2's value type
  • RandomAccessIterator2 is a model of Random Access Iterator
  • RandomAccessIterator2 is mutable.


The documentation for this class was generated from the following file:

Generated on Tue Jan 18 02:20:10 2011 for yat by  doxygen 1.5.5