makePairs: Generates indices of linked and unlinked crime pairs (with weights)
Description
These functions generate a set of crimeIDs for linked and unlinked crime pairs.
Linked pairs are assigned a weight according to how many crimes are in the
crime series. For unlinked pairs, m crimes are selected from each
crime group and pairs them with crimes in other crime groups.
crime series data (generated from makeSeriesData)
with offender ID (offenderID),
crime ID (crimeID), and the event datetime (TIME)
thres
the threshold (in days) of allowable time distance
m
the number of samples from each crime group (for unlinked pairs)
show.pb
(logical) should a progress bar be displayed
Value
matrix of indices of crime pairs with weights. For makePairs,
The last column type indicates if the crime pair is linked or unlinked.
Details
makePairs is a Convenience function that calls makeLinked and
makeUnlinked and combines the results. It is unlikely that the latter
two functions will need to be called directly
For linked crime pairs, the weights are such that each crime
series only gives a total weight of 1. Due to co-offending, the sum of weights
will be smaller than the number of series with at least two crimes.
To form the unlinked crime pairs, crime groups are identifyed
as the maximal connected offender subgraphs. Then m indices are drawn
from each crime group and paired with crimes from other crime groups according
to weights to ensure that large groups don't give the most events.