Changeset 1718


Ignore:
Timestamp:
Jan 14, 2009, 4:42:57 PM (12 years ago)
Author:
Jari Häkkinen
Message:

Addresses #425. Improved docs. Fixed a bug in the normalization.

Location:
trunk/yat/normalizer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/normalizer/qQuantileNormalizer.cc

    r1716 r1718  
    8282    : target_(Partitioner(target,Q))
    8383  {
     84    assert(Q>2); // required by cspline fit
    8485  }
    8586
     
    110111      for (size_t row=start; row<end; ++row) {
    111112        size_t srow=sorted_index[column][row];
    112         result(srow,column) = matrix(srow,column) + diff(0);
     113        result(srow,column) = matrix(srow,column) - diff(0);
    113114      }
    114115
     
    119120      for (size_t row=start; row<=end; ++row) {
    120121        size_t srow=sorted_index[column][row];
    121         result(srow,column) = matrix(srow,column) + cspline.evaluate(row) ;
     122        result(srow,column) = matrix(srow,column) - cspline.evaluate(row) ;
    122123      }
    123124
     
    128129      for (size_t row=start; row<end; ++row) {
    129130        size_t srow=sorted_index[column][row];
    130         result(srow,column) = matrix(srow,column) + diff(diff.size()-1);
     131        result(srow,column) = matrix(srow,column) - diff(diff.size()-1);
    131132      }
    132133    }
  • trunk/yat/normalizer/qQuantileNormalizer.h

    r1716 r1718  
    4343     The normalization goes like this
    4444     - Data is not assumed to be sorted.
    45      - Partition the target data in N parts.
     45     - Partition the target data in N parts. N must be 3 larger
     46       because of requirements from the underlying cspline fit
    4647     - Calculate the arithmetic mean for each part, the mean is
    4748       assigned to the mid point of each part.
     
    6768       \brief Documentation please.
    6869
    69        \a Q is the number of parts and must be within \f$ [2,N] \f$
     70       \a Q is the number of parts and must be within \f$ [3,N] \f$
    7071       where \f$ N \f$ is the total number of data points in the
    7172       target. However, if \f$ N \f$ is larger than the number of points
     
    7374       undefined. Keep \f$ N \f$ equal to or less than the smallest
    7475       number of data points in the target or each data set to be
    75        normalized against a ginven target.
     76       normalized against a ginven target. The lower bound of three is
     77       due to restrictions in the cspline fit utilized in the
     78       normalization.
    7679    */
    7780    qQuantileNormalizer(const utility::VectorBase& target, unsigned int Q);
Note: See TracChangeset for help on using the changeset viewer.