Research Article

Hybrid Modified -Means with C4.5 for Intrusion Detection Systems in Multiagent Systems

Pseudocode 2

Pseudocode of the modified -means algorithm.
Input: Dataset
Output: Clusters, Centroids
() Set , = First instance
() For every instance   Dataset and Do
 () If , Then
 () ,
() Assign every instance   Dataset to the closest centroid to make clusters
() Calculate cluster centroids ,
() For every instance   Dataset Do
 () Reassign to closest cluster centroid; is moved from to
          If , .
 () Recalculate centroids for clusters and .
() If cluster instances are stabilized then stop, Else go to Step ().