Parameters: |
- axis (0, 1, 's', or 'f') – Apply
key function on row (sort the samples) (0 or ‘s’) or column (sort the features) (1 or ‘f’)
- subset (None, boolean mask,
slice , or int indices, optional) – Sorting using only subset of the data. The subsetting occurs on the opposite of
the specified axis. Default is to use the whole data set.
- key (str or callable) –
If it is a callable, it should be a function accepts 1-D array
of numeric and returns a comparative value (like key in
builtin sorted() . For example, you can use numpy.mean() or
numpy.media() . Alternatively it accepts the
following strings:
- ’log_mean’: sort by the mean of the log;
- ’prevalence’: sort by the prevalence;
- inplace (bool, optional) – False (default) to create a copy. True to modify in place.
- reverse (bool, optional) – True to reverse the order of the sort. Similar to
sorted()
- kwargs (dict) – keyword parameters passed to
key
|