Skip to content
Snippets Groups Projects
Commit 91d5b061 authored by Joëlle Boecker's avatar Joëlle Boecker
Browse files

software_update3

parent 0f1f745b
No related branches found
No related tags found
No related merge requests found
Pipeline #530114 passed
......@@ -38,21 +38,41 @@ Based on our evaluation, we decided to use k-Nearest Neighbour (kNN), a widely u
*Table 1: Comparison of RMSE values between Linear Regression and k-Nearest Neighbour (Z-score, k=3) across Cyan, Magenta, and Yellow chromoprotein volumes.*
![table 1](https://static.igem.wiki/teams/5146/software/table1.webp)
*Table 1: Comparison of RMSE values between Linear Regression and k-Nearest Neighbour (Z-score, k=3) across Cyan, Magenta, and Yellow chromoprotein volumes.*
| | Linear Regression | kNN (Z-score, k = 3) |
|--------------|-------------------|----------------------|
| RMSE Cyan | 10.901 | 9.558 |
| RMSE Magenta | 13.711 | 11.992 |
| RMSE Yellow | 7.623 | 10.772 |
*Table 2: Correlation coefficients between RGB and CMY colour channels.*
![table 2](https://static.igem.wiki/teams/5146/software/table2.webp)
| | Cyan | Magenta | Yellow |
|-------|--------|---------|--------|
| Red | **-0.831** | 0.553 | 0.263 |
| Green | -0.768 | **0.098** | 0.641 |
| Blue | 0.470 | 0.307 | **-0.903** |
*Table 3: RMSE values for Linear Regression with complementary colour channels versus all colour channels.*
![table 3](https://static.igem.wiki/teams/5146/software/table3.webp)
| | LR Complementary Colour Channels | LR All colour channels |
|--------------|----------------------------------|------------------------|
| RMSE Cyan | 10.901 | 14.082 |
| RMSE Magenta | 13.711 | 23.822 |
| RMSE Yellow | 7.623 | 10.812 |
To ensure that kNN works optimally with our dataset, several parameters needed to be set. One of the most critical parameters is k, which specifies how many neighbours the algorithm considers when making a prediction (Zhang, 2016). If k is set too low, the model risks overfitting, becoming overly sensitive to small variations in the data. On the other hand, if k is too large, the model may oversimplify and lose accuracy. The challenge, therefore, is to find the optimal k value that balances accuracy without overfitting the data (Zhang, 2016). Additionally, scaling the RGB input values was essential to improve the model’s accuracy. Since kNN is sensitive to the scale of input data, we had to standardise the RGB values to ensure that one colour channel, for example Red, does not dominate the predictions. We explored two scaling methods to determine the most suitable one. Z-score normalisation scales the data based on its mean and standard deviation, making it effective when the dataset contains outliers (Andrade, 2021). Min-max normalisation, on the other hand, scales all data points between 0 and 1, which is useful when the dataset has a limited range of values (Lambert et al., 2024).
To determine the best scaling method and k value combination, we used Root Mean Squared Error (RMSE) again as our performance indicator (Ajala et al., 2022). To ensure that this measure is reliable, RMSE must be calculated on unseen data that the model has not been trained on (Ajala et al., 2022). Therefore, we split the dataset into training and testing sets using an 80/20 ratio, where 80% of the data trains the model, and 20% is reserved for testing. This approach helps achieve a balance between overfitting, where the model is too closely tuned to the training data, and underfitting, where it fails to capture important patterns (Rácz et al., 2021). By computing RMSE on the test set, we can assess how well the model generalises to unseen data. Ultimately, the lower the RMSE value, the more accurate the model (Forrest et al., 2021). For our dataset, we compared the RMSE values for different scaling methods and k values and, though the values are quite similar, decided that Z-score normalisation and k=5 gives us the most accurate prediction.
*Table 4: Overview of different scaling methods (Z-score, Min-Max) and k-values (3,5 and 7) for the respective colours cyan, magenta and yellow Scaling Method*
![table 4](https://static.igem.wiki/teams/5146/software/table4.webp)
| **Scaling Method** | **k Value** | **RMSE Cyan** | **RMSE Magenta** | **RMSE Yellow** |
|----------------|---------|-----------|--------------|-------------|
| Z-score | 3 | 9.5581 | 11.9928 | 10.7726 |
| Z-score | 5 | 8.7178 | 13.0554 | 10.4243 |
| Z-score | 7 | 10.0283 | 14.3213 | 10.8326 |
| Min-Max | 3 | 8.8889 | 11.3038 | 10.8012 |
| Min-Max | 5 | 9.0431 | 13.4825 | 10.0443 |
| Min-Max | 7 | 9.8343 | 14.1861 | 10.8588 |
### Software/UI
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment