rank.by.comparison: Rank a Given Data Set based on a Comparator Function

Description Usage Arguments Value

Description

Rank the elements in the set data based on binary comparisons via a comparator function. The function comparator accepts two parameters, a and b, which will be two elements from data. The function then returns a negative if the first element (a) should receive a lower rank than the second element (b). It returns a positive value if b should be ranked smaller than a. It in all other cases (i.e., if 0 or NaN are returned), neither element is preferred.

Usage

1
rank.by.comparison(data, comparator)

Arguments

data

the data set, a list or vector of data elements

comparator

a binary comparator function

Value

a vector of ranks


thomasWeise/learnerSelectoR documentation built on May 16, 2019, 7:47 a.m.