Classification assigns each medicine to a High Risk or Low Risk class. Here, interaction keywords define the target, while medicine descriptions and side effects provide text inputs. A major constraint is data coverage: those fields are present for only 7,488 of 253,973 records. section 4.6.3 section 4.6.3
The pipeline tokenizes and pads text to 180 integers, then passes it through an embedding layer, spatial dropout, a GRU, and a sigmoid output. This explains the model’s architecture, not whether its predictions are safe for real-world decisions. section 4.6.6
Listing 4.7 The classes distribution
Class distribution:
High_Risk
0 4848
1 2640
Name: count, dtype: int64
High_Risk
0 0.647436
1 0.352564
Name: proportion, dtype: float64
class_weight: {0: 0.7723053120165033, 1: 1.418087121212121}
The class counts and weights expose the label distribution used for training. section 4.6.3
Validate the risk classifier
A generated notebook is run as-is, with training behavior and a confusion matrix inspected; the requested classification report focuses on precision and recall for the High-Risk class. section 4.6.3 section 4.6.3

