Research Article

A Novel Framework Design of Network Intrusion Detection Based on Machine Learning Techniques

Algorithm 2

CART creation process.
Input: training dataset D
Output: CART
N: threshold of the number of samples in node. n: number of samples in the node
G: Gini index threshold for D
Gini (D): Gini index of D
Based on D, starting from the root node, if n < N or Gini (D) < G or no more features, recursively perform the following operations on each node to construct a binary tree
For each feature A, for each of its possible values a, the split will be into D1 and D2 based on whether the test for A = a, and use equation (6) to calculate Gini (D, A)
Among all possible features A and all its possible segmentation points a, the feature with the smallest Gini index and its corresponding segmentation point are selected as the optimal feature and the optimal segmentation point
Generate two subnodes from the current node and assign the training dataset to the two subnodes according to the features
Return CART