## 2 Materials and Methods
### Random Walker Method for Nodule Boundary Extraction  
The random walker method is a semi-supervised learning method that is more suitable for image segmentation. The implementation of random walker for image segmentation has been presented in depth by [PERSON] [27]. In this method, the image is represented as a graph instead of a matrix, and the pixel intensity values are assigned with each node (called seeds). Every node is connected to its adjacent node via an edge. In this technique, two seeds are given to the image in such a way that one seed is on the nodule (subject) and the other is on the rest of the lung area (background) [28]. Each node is associated with either of the two labels as background or foreground, depending on the probability that a random walker leaving the pixel will first arrive at each seed. The solution to this random walker problem can be found by solving an equivalent electrical circuit for the voltages at each node marked at one seed as '0' and the other seed as '1'.  
Let us assume there are two nodes, \(N_{a}\) and \(N_{b}\), and the weight of the edge, \(w_{ab}\), is given by:  
\[w_{ab}=e^{-\beta|Na-Nb|} \tag{1}\]  
where \(\beta\) is the conductance factor and \(w_{ab}\) represents the conductance of the edge. The higher the value, the easier it is to move on that edge.  
After marking the seeds with \"0\" and \"1\", the values of the remaining nodes are calculated using:  
\[N_{a}=\sum_{b}w_{ab} \tag{2}\]  
where \(b\) is the number of nodes directly connected to the Node \(a\). The incident matrix at the edge node is given by:  
\[M_{ab}=\begin{cases}N_{a},&if\ a=b\\ -w_{ab},&if\ Na\ and\ Nb\ are\ adjacent\\ 0,&Otherwise\end{cases}\]  
In general, the matrix, \(M_{ab}\), can be represented by:  
\[M=\begin{bmatrix}M_{m}&B\\ B^{\prime}&M_{u}\end{bmatrix} \tag{3}\]  
where \(M_{m}\) is the entries corresponding to marked nodes, \(B\) is the relation between one marked node and another unmarked node, \(B^{\prime}\) is the relation between an unmarked node to a marked node, and \(M_{u}\) is the relation between all unmarked nodes.  
When the potential of the node is \(Q(N_{i})\), then the critical points at node \(b\) is defined by:  
\[l_{b}^{w}=\begin{cases}1,&if\ Q(N_{b})=w\\ 0,&ifQ(N_{b})\
eq w\end{cases} \tag{4}\]  
Therefore, for the label \(w\), the solution to the conjunctional Dirichlet problem may be found by solving:  
\[M_{u}X=-B^{\prime}L \tag{5}\]  
for one label and:  
\[M_{u}X^{*}=-B^{\prime}L \tag{6}\]for the remaining labels. Therefore, the probability at node '\(b\)' is given by:  
\[p(w/x)=x_{b}^{w} \tag{7}\]  
where \(p(w\,|\,x)\) is the probability that node \(x\) belongs to class \(w\).  
After solving all these equations, one can easily classify the nodes belonging to their respective segments. After segmenting the image, the segmented nodule is used for further analysis. The major advantages of the random walker method are as follows:  
* It can handle complex boundaries.
* As the model assumes the image as a graph where pixels are nodes or vertices, graph theory and popular graph algorithms can also be used.
* It can be easily employed to divide the image into multiple segments based on the number of seed labels provided.