## 4 Results
### The ANALYSISIS Module  
The ANALYSISIS module examines sensor data to determine trends and detect faults by fitting linear regression models to each variable and using a kNN classifier for real-time fault diagnosis. It standardizes numeric data, visualizes predictions with a confusion matrix to assess model performance and indicates defects based on their incidence. The proposed approach leverages kNN's simplicity and effectiveness of kNN on small, well-separated datasets, making it suitable for real-time fault diagnosis in maritime installations. To validate the results of the algorithm, 12 functional states on the tested installation, 12 functional states were taken as a reference. Following the specific analysis, for the targeted installation, a malfunction matrix (Fault Array) was created for 12 existing functional states, 11 functional states with deviations from optimal parameters and 1 operating state with nominal parameters (and in this situation, some fluctuations of parameter values were identified). The functional states are as follows:  
* F1--seawater chest malfunction;
* F2--seawater pump malfunction;
* F3--clogging main seawater cooler;
* F4--clogging main freshwater cooler;
* F5--low-efficiency main freshwater cooler;
* F6--clogging secondary seawater cooler;
* F7--clogging secondary freshwater cooler;
* F8--low-efficiency secondary freshwater cooler;
* F9--seawater pump failure and clogging main sea water cooler;
* F10--seawater pump failure and low-efficiency main freshwater cooler;
* F11--clogging main seawater cooler and low-efficiency main freshwater cooler;
* F12--operation with minimal deficiencies.  
In the proposed algorithm, fault types were structured as arrays corresponding to 12 functional states, each containing 41 functional parameters defined above. The algorithm was tested, validated and updated using test files from onboard installations, either online or offline, during or after trips. Using kNN, new data points are classified by analyzing and voting on the classes of the k closest points from the initial dataset, with predictions visualized in a confusion matrix to compare performance across classes, ultimately indicating defects in order of incidence and descending highlighting possible failure modes (Figure 5).  
Furthermore, incorporation of these techniques--noise filtering, outlier detection, robust ML models and redundancy--the approach can indeed operate under interference and disturbances. However, the success of this approach will depend on how well the system is designed to detect and mitigate interference while maintaining accuracy in predictions and fault diagnosis. Regular calibration, monitoring and validation against real-world scenarios enhance system reliability in the face of interference.  
Instead of relying on fixed thresholds for detecting anomalies or faults, the implementing Dynamic Thresholds can adapt based on historical data and the current state of the system and accommodate variations in sensor readings due to environmental factors. Also, Self-Learning Mechanisms can adapt over time by learning from new data, thus improving the algorithm's robustness against changes in data patterns due to disturbances.  
The algorithm indicates the defects in the order of their incidence, as is depicted in Figure 6.  
Figure 5: KNN classification in the ANALYSIS module.  
Figure 6: Fault hierarchy in the ANALYSIS module.