The file `shap_summary_rf_s4_nopchip_cv.txt` reports mean absolute
Shapley Additive Explanation (SHAP) values for the random forest model
`rf_s4_nopchip_cv`.

The model predicts three metrics for the fourth user:

* `max_q_4` – maximum Q-factor
* `min_ber_4` – minimum bit error rate
* `rec_power_4` – received optical power

In the supplied Wavelength Division Multiplexing (WDM) dataset each user
corresponds to an optical channel. These metrics therefore describe the
quality and power of the **fourth wavelength** in the link. `max_q_4` and
`min_ber_4` capture the best signal quality and lowest error rate observed on
that channel, while `rec_power_4` measures the photodetected power.

SHAP values were computed with `shap.TreeExplainer` on the cross‑validated
model using the held‑out test set for each scenario label. We take the mean
absolute value over all samples to summarise the global contribution of each
input feature.

Each "Label" section isolates the test samples for one scenario category
(`LF_SISO`, `MF_SISO`, `HF_SISO`, `LF_MIMO`, `MF_MIMO`, `HF_MIMO`). Under each
target, the report lists the average absolute SHAP value for every feature the
model considered. Larger values indicate greater influence on that target's
prediction. These labels encode turbulence level (low/medium/high frequency)
and whether the system operates in single-input single-output (SISO) or
multiple-input multiple-output (MIMO) mode—typical configurations for WDM FSO
experiments.

Across all labels and targets, only the `range` feature (distance between
transmitter and receiver in kilometres) exhibits non‑zero importance. The
remaining recorded signals (`rec_power_1`‑`rec_power_4`, `max_q_1`‑`max_q_3`,
`min_ber_1`‑`min_ber_3`, and the categorical `label`) contribute negligibly,
indicating that path distance is the dominant driver of predictions for this
model configuration. In the context of WDM communication, this suggests that
inter‑channel effects and scenario labels have little bearing on the fourth
channel’s quality metrics within the measured range. For manuscript discussion,
the SHAP analysis highlights that propagation distance dominates performance
variations, so mitigation efforts may focus on range extension rather than
cross‑channel interference management.

### Numerical overview

The mean absolute SHAP values for the `range` feature vary with the turbulence
regime but remain identical between SISO and MIMO modes. Values below are the
average contribution of `range` to each predicted metric:

| Label     | `max_q_4` | `rec_power_4` | `min_ber_4` |
|-----------|-----------|---------------|-------------|
| LF_SISO/MIMO | 0.188 | 0.244 | 2.07e-14 |
| MF_SISO/MIMO | 0.036 | 0.046 | 7.27e-15 |
| HF_SISO/MIMO | 0.121 | 0.158 | 1.02e-14 |

Large numbers indicate a stronger influence of range on that metric. For both
low‑ and high‑frequency turbulence the model is most sensitive to range when
predicting received power (`rec_power_4`), followed by the Q‑factor
(`max_q_4`). The bit‑error rate target (`min_ber_4`) receives effectively zero
contribution from any feature, implying that the trained model does not capture
range effects on this metric. The identical SISO and MIMO results show that the
current dataset and model do not distinguish between single‑ and multi‑aperture
setups for channel four.

SHAP values are unitless and comparable across features within the same
target. Reporting mean absolute SHAP values follows common practice for global
explanations and can be cited directly in research manuscripts.

To reproduce the report, run:

```bash
fso_predictor shap-summary rf_s4_nopchip_cv.joblib Full_data.csv \
  --out shap_summary_rf_s4_nopchip_cv.txt
```
