Research Article

Network Host Cardinality Estimation Based on Artificial Neural Network

Algorithm 2

Generate training data.
(i)Input: SIP,LEA, g//The length of LE
(ii)H1//hash function used in LE, used to map a host to a bit in LE
(iii)Output: Train data set: trainX, predY′
(1) For each {sip, RC, OIP} in SIP
(2)  LEset = {le1, le2,…,} ← Locate LE related to sip in LEA;
(3)  ULE ← Unionize every LE in LEset by bitwise “AND” operation;
(4)  For each bip in OIP
(5)   i ← H1(bip)
(6)   Set the ith bit in ULE to 1
(7)  Endfor
(8)  EC ← calculate the estimating cardinality of aip’ according to ULE
(9)  Insert [EC, ULE] into trainX
(10)  Insert (RC-EC) into predY′
(11) Endfor
(12) Return {trainX, predY}