Opened 5 years ago

Closed 5 years ago

#875 closed enhancement (fixed)

speed up weighted qQuantileNormalizer::normalizer

Reported by: Peter Owned by: Peter
Priority: minor Milestone: yat 0.15
Component: normalizer Version:
Keywords: Cc:

Description

related to tickets #535 and #536

There is a code block in weighted version of normalize that was added to fix bug #535. With the new versions of sort_index (available since yat 0.13) this is no longer needed. Instead, the line

utility::sort_index(utility::data_iterator(first),
                    utility::data_iterator(last), 
                    sorted_index);

could be replaced with something like

utility::sort_index(utility::data_iterator(first),
                    utility::data_iterator(last), 
                    sorted_index, less_nan());

This will avoid copying the data before running sort_index. It will change behaviour in some odd cases (like input with NaN and finite weight), but not in any sensible cases, AFAICS.

Change History (1)

comment:1 Changed 5 years ago by Peter

Resolution: fixed
Status: newclosed

(In [3571]) closes #875

With new version of sort_index (since yat 0.13) allows sorting ranges of DataWeight?, which behaves as desired, use that function rather than copying input range.

Note: See TracTickets for help on using tickets.