## 3 Methodology
### Loss Function  
The classification loss (LCCE) of the 3-TierDCFNet model was calculated using categorical cross-entropy loss (CCE) [72]. Mathematically, CCE loss is calculated using Equation (2):  
\[\hat{\mathrm{L}}_{\mathrm{CCE}}=-\sum_{i=1}^{N}x_{i}.\log\ y_{i} \tag{2}\]  
Here, \(N\) represents the total number of model output,\(x_{i}\) indicates the ground truth of the healthy or anemic image, and \(y_{i}\) represents the \(i^{\mathrm{th}}\) output of the model. The minus sign guarantees that the loss becomes lesser when the distributions become closer to each other. The LCCE of 3-TierDCFNet is measured at each tier, and feedback is given to the network for optimal feature selection. The LCCE is measured consistently unless the network has a value greater than the predefined threshold value. As the network attained the expected LCCE value, the training of the ith tier was stopped, and output was given to the next tier for further processing with an updated threshold value.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Cell Type** & **Healthy** & \multicolumn{2}{c}{**Mild Stage**} & \multicolumn{2}{c}{**Chronic Stage**} \\ \hline Parameter & Original Diameter & After magnification & Original diameter & After magnification & Original diameter & After magnification \\ \hline RBC size & 7.5 μm & 1.2 cm & \begin{tabular}{c} \textless{}6–4 μm \\ Or \\ \textgreater{}9-11 μm \\ \end{tabular} & \begin{tabular}{c} \textless{}0.96–0.66 cm Or \\ \textgreater{}1.44-1.76 cm \\ \end{tabular} & \
\begin{tabular}{c} \textless{}4μm \\ Or \\ \textgreater{}11 μm \\ \end{tabular} &
\begin{tabular}{c} \textless{}0.66 cm \\ Or \\ \textgreater{}1.76 cm \\ \end{tabular} \\ \hline RBC Shape & Rounded & \multicolumn{2}{c}{25–50\% change in roundness} & \textgreater{}50\% change in roundness \\ \hline Central white & \multirow{3}{*}{1.87 μm} & \multirow{3}{*}{0.3 cm} & \textless{}3–2 μm & \textless{}0.48-0.33 cm Or & \textless{}2.92 μm & \textless{}0.33 cm \\ \cline{1-1} \cline{5-5} pallor size & & & \textgreater{}4.5–5.5 μm & \textgreater{}0.72–0.88 cm & Or & Or \\ \hline \hline \end{tabular}
\end{table}
Table 3: Score range for the determination of anemia severity stages, i.e., Mild and Chronic. Column heading “Original diameter” represents the RBC size before magnification, while the column heading “After magnification” represents the size of RBC after magnification.  
```
Start
RBC images will be loaded that are classified as anemic during Module-I classification Load Image:  Var Size of cell (S)  Var Roundness of cell (R)  Var Central pallor size of cell (CP)  Var Size Ratio (SR)  Var Roundness Ratio (RR)  Var Central pallor Ratio (CPR)  Calculate:  If Cell Size < 0.96 and Cell Size > 0.66  S = 1 - abs(0.8 - Cell Size) \(\times\) SR  Else  S = 1 - abs(1.6 - Cell Size) \(\times\) SR  R = 1 - abs(38.5\(\%\) - Cell Roundness) \(\times\) RR  CP = 1 - abs(0.405 - Cell Paller) \(\times\) CPR
Morphological parameters checking for predicting disease severity level  Mild = S + R +CP  If (Mild > 50\(\%\))  Image = \"Mild\"  Else  Image = \"Chronic\"  End  End Start  The above algorithm is a detailed description of the severity detection technique. Initially, the images are loaded that are classified as anemic by 3-TierDCFNet.
```  
**Algorithm 1** Pseudocode representation of anemia Severity Detection algorithm