# A UML Activity Flow Graph-Based Regression Testing Approach
## 2 Our Testing Approach
### Normalizing Original Data  
It is important to note that the original data used in a given analysis may exhibit varying scales. For example, in a banking dataset, the input variables \"Staff\" and \"Deposit\" may be denoted in different scales, such as \"Person\" and \"Dollars\", respectively. In such cases, it is prudent to consider that results obtained from the proposed approaches may not be deemed acceptable from a managerial and economic standpoint.  
In order to mitigate these issues, it is recommended that the users first normalize the original data using an appropriate normalization technique, before using the normalized data in their proposed approaches to obtain results corresponding to the normalized data. Subsequently, these results should be converted back to the original data scale in order to make them meaningful and interpretable to end-users.  
Normalization is a process of transforming the original data into a common scale so that it can be analyzed and compared accurately. The normalization process typically involves scaling the data to have zero mean and unit variance, or to be within a specific range (e.g., 0 to 1). Here's a general overview of how to normalize data for UML-based regression testing, and then convert the results back to the original data:  
1. Determine the normalization method: Choose a normalization method that is appropriate for your data and analysis. Some common normalization methods include Min-Max scaling, Z-score scaling, and Robust scaling.
2. Normalize the data: Apply the chosen normalization method to the original data. This can typically be conducted using a library in your programming language of choice. For example, in Python, you can use the MinMaxScaler class from the sklearn. preprocessing module to scale the data to the range [0, 1].
3. Generate test cases based on the normalized data: Use the normalized data to generate test cases for the UML regression testing approach described in the following sections.
4. Execute the test cases on the normalized data: Use the generated test cases to perform UML-based regression testing on the normalized data. This involves running the test cases on the UML model to ensure that it still behaves as expected.
5. Convert the results back to the original data scale: After performing the regression testing on the normalized data, we must convert the results back to the original data scale to make them meaningful to the end-users. To do this, use the inverse of the normalization method applied earlier. For example, if we had used Min-Max scaling, we would multiply the results by the range of the original data and add the minimum.  
We provide here a Python pseudocode example of how to normalize the data, generate test cases based on the normalized data, perform regression testing on the normalized data, and convert the results back to the original data:1# Step 1: Normalize the data
2 from sklearn.preprocessingimportMinMaxScaler
3
4# Create a MinMaxScaler object
5 scaler = MinMaxScaler()
6
7# Fit and transform the data to the range [0, 1]
8 normalized_data = scaler.fit_transform(original_data)
9
10# Step 2: Generate test cases based on the normalized data
11# Use the normalized data to execute test cases for the LMM-based regression testing
12
13# Step 3: Perform regression testing on the normalized data
14# Use the generated test cases to perform LMM-based regression testing on the normalized data
15
16# Step 4: Convert the results back to the original data scale
17# Inverse transform the predicted values
18 predicted_values_normalized = regression_model.predict(normalized_data)
19 predicted_values = scaler.inverse_transform(predicted_values_normalized) ```
Note that this is just a pseudocode and may need to be modified to fit the specific requirements of your UML designs.