# BiModalClust: Fused Data and Neighborhood Variation for Advanced K-Means Big Data Clustering
## 3 Variable Neighborhood Search
### Basic Variable Neighborhood Search  
Unlike many other metaheuristic frameworks, Variable Neighborhood Search (VNS) and its extensions stand out for their inherent simplicity. They often require minimal or no parameter tuning, making them accessible and straightforward to implement. This simplicity does not come at the expense of performance--VNS frequently delivers high-quality solutions more efficiently than alternative methods. Moreover, its transparent structure offers valuable insights into the mechanisms that drive its effectiveness. These insights can inform the design of more refined and efficient implementations, further advancing its applicability [19].  
The pseudocode for the basic VNS algorithm is provided in Algorithm 5.  
```
1 FunctionBasic_VNS(\(x\), \(k_{\max}\), \(T\), \(\mathcal{N}\), \(N\)): Input :Initial solution \(x\);  Maximum shaking power \(k_{\max}\);  Maximum time \(T\);  Neighborhood structure for shaking \(\mathcal{N}\);  Neighborhood structure for improvement \(N\); Output :Final solution \(x\). repeat \(k\gets 1\); // initially, use the minimal shaking power while\(k\leq k_{\max}\)do \(x^{\prime}\leftarrow\) Shake(\(x,k,\mathcal{N}\)); // get \(k\)-th perturbation of incumbent solution \(x^{\prime\prime}\leftarrow\) Local_search(\(x^{\prime},N\)); // local descent from \(x^{\prime}\) Neighborhood_change(\(x,x^{\prime\prime},k\)); // change neighborhood accordingly  end while until\(\text{{CpuTime}}()>T\); return\(x\)
```  
**Algorithm 5**Basic Variable Neighborhood Search  
Within the basic Variable Neighborhood Search (VNS) framework, the following key components are integral to its operation:  
* \(f(x)\): The real-valued objective function to be minimized or maximized.
* \(k\): The current shaking intensity, which determines the scale of the perturbation applied to the incumbent solution.
* \(k_{\max}\): The maximum shaking intensity, defining the upper limit for neighborhood exploration during the shaking phase.
* \(\mathcal{N}_{k}(x)\): The \(k\)-th neighborhood of the incumbent solution \(x\), representing a set of candidate solutions generated by applying perturbations of intensity \(k\).  
* \(x\): The incumbent solution, representing the best-known solution at a given point in the search.
* \(x^{\prime}\leftarrow\text{Shake}(x,k,\mathcal{N})\): A procedure (detailed in Section 3.2) that generates a candidate solution \(x^{\prime}\) by randomly selecting a solution from the \(k\)-th neighborhood \(\mathcal{N}_{k}(x)\) of the incumbent solution \(x\).
* Neighborhood\(\_\)Change\((x,x^{\prime\prime},k)\): A mechanism (described in Section 3.3) for adapting the neighborhood structure based on the current solution and the search's progress. Usually, either Algorithm 2 or Algorithm 3 can be used for this process.
* \(x^{\prime\prime}\leftarrow\text{Local\_Search}(x^{\prime},N)\): A local search procedure (outlined in Section 3.4) that explores the vicinity of the candidate solution \(x^{\prime}\) to locate a locally optimal solution, \(x^{\prime\prime}\). Usually, Algorithm 4 is used for this purpose.
* \(\text{CpuTime}()\): A function that returns the elapsed time since the algorithm's initiation, ensuring adherence to the predefined time constraints.
* \(T\): A predefined, relatively short time limit for the search, serving as a stopping criterion to prevent excessive computation.