Changeset 1073


Ignore:
Timestamp:
May 15, 2009, 2:11:37 PM (12 years ago)
Author:
Jari Häkkinen
Message:

Addresses #118. q=max(10,min(100,target_size/10))

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/base2/net.sf.basedb.normalizers/trunk/src/c++/bin/qQN.cc

    r1072 r1073  
    127127  std::transform(data_iterator(m.begin()), data_iterator(m.end()),
    128128                 data_iterator(m.begin()), theplu::yat::utility::Log<double>());
    129   qQuantileNormalizer qqn(target.begin(), target.end(), 100);
     129  // q = min(100,target_size/10) but no smaller than 10
     130  unsigned int q=target.size()/10;
     131  q = q>100 ? 100 : ( q<10 ? 10 : q );
     132  qQuantileNormalizer qqn(target.begin(), target.end(), q);
    130133  ColumnNormalizer<qQuantileNormalizer> cn(qqn);
    131134  MatrixWeighted result(m.rows(),m.columns());
Note: See TracChangeset for help on using the changeset viewer.