k_order_union: Intersection of top k sets

Description Usage Arguments Details Value

Description

k_order_union takes a list of sets of items where the order of the list implies rank. It returns a single set corresponding to the union of the first k sets, meaning the sets with the 1st to kth highest rankings.

Usage

1
2
3
k_order_union(set_list, k)

match_sets(list_1, list_2, k)

Arguments

set_list

a list of arrays, and it is assumed the ordering of the list corresponds to ranking (eg first item on the list has the highest rank.)

k

the order of the union, i.e. 'find the union of the first k items in the list'

set_1

first list

set_2

second list

Details

match_sets takes two lists of sets, and first finds the union set of the top k sets of the first list. Then it finds a union set of the second list such that the two union sets are matched in length. First, it iteratively increases the union set of the second list until the second union set is the same size as the first. If on the jth iteration the size of the second union set is smaller than the first, then the algorithm iterates and the union of the first j + 1 sets is found. If on the jth iteration the second union set is larger than the first, then the second union set is truncated to be the same size as the first set in a way that emphasizes the difference between the two union sets. If the second union set is smaller and there is no j + 1 set in the second list, then the first union set is truncated to the same size as the second, again in a way that emphasizes their differences.

Value

an array of list items


robertness/signalgraph documentation built on May 27, 2019, 10:33 a.m.