Research Article

AppFA: A Novel Approach to Detect Malicious Android Applications on the Network

Algorithm 2

Constrained flow clustering algorithm.
  Input: Data set ; cluster number ; must-link constraints
; cannot-link constraints
  Output: Flow clusters
(1) Let be the initial cluster centers
(2) for each flow in do
(3) select the closest cluster
(4) for each do
(5) if then
(6) goto step
(7) end if
(8) end for
(9) for each do
(10) if then
(11) goto step
(12) end if
(13) end for
(14) assign to the cluster
(15) end for
(16) for each cluster do
(17) update its center by averaging all of the flows that
have been assigned to it
(18) end for
(19) iterate between step and step until convergence
(20) return