fromSalesDays: Generate pairwise similarities given binary vector of sales...

Description Usage Arguments Value

Description

Given sales columns generated by 'infoFromFeedback()', produce three pairwise variables: 1. Hamming distance between the sales columns (number of days where one account has sales but the other doesn't), 2. fraction of overlapping sales days: number of days where both accounts have sales / union of sales days, and 3. the number of sales days for account1 + number of sales days for account2

Usage

1
fromSalesDays(pairsOfInterest, salesCols)

Arguments

pairsOfInterest

dataframe with columns 'hash1', 'hash2' referring to vendor hashes for the comparison

salesCols

dataframe containing the columns representing binary variables for whether account has sales or not (exclude vendor hashes from this dataframe)

Value

dataframe with three columns: diffSalesDates, salesOverlap, totalSalesDays, as described above


xhtai/heisenbrgr documentation built on June 8, 2019, 9:30 a.m.