Function create_negative_table
Source pub fn create_negative_table(
vocab_size: usize,
walks: &[Vec<u32>],
neg_table_size: usize,
seed: usize,
) -> Arc<Vec<usize>>
Expand description
Create negative sampling table
§Params
vocab_size - Number of unique nodes
walks - The walks to compute node frequencies from
neg_table_size - Size of negative sampling table
seed - Random seed for shuffling the negative sampling table.
§Returns
Negative sampling table as Arc<Vec>