Michael Retchin edited Tumor Generation.tex  over 9 years ago

Commit id: 1cb7c5453163fd826b23c025cda8b50cc506a45e

deletions | additions      

       

In this case, $ω_b ∈ {\Bbb Z}^2$, $ω_0=x$, $|ω_b − ω_{b−1}| = 1$, $b = 1, 2, . . . , n$, $ω_a \neq ω_b$ for $a \neq b$, and $0 ≤ a < b ≤ n$. In other words, no new step (each of which is a length of $1$ in a discrete direction in the real plane) can occur such that the path coincides with itself in two distinct events. Put in context, this means that two tumorous cells cannot occupy the same space.  A The program was constructed where a  pseudorandom integer was calculated generated  for which  the ratio of minimum and maximimum were 100 and 9,000, respectively. A SAP was then continuously generated until  the volume generated number of cells  of the SAP, square lattice were filled with tumor. Tumors were therefore generated to have both a random size and shape.  This algorithm is  expressed in the following pseudocode: \begin{lstlisting}[language=python]  tumor_length = randint(int(0.1 * matrix.area), int(0.9 * matrix.area))  coord = [randint(1, matrix.m), randint(1, matrix.n)] 

coord[0] -= 1  elif direction == RIGHT:  coord[0] += 1  \end{lstlisting}The equation defines at which position the path will lie after $n$ number of steps.  \hspace{2000 mm} To model the distribution of $S_{n}$ we need to set it to $x$ and set the number of steps to the right and left by $r$ and $l$, respectively. Given this, $x = r - l$ and $n$, the total number of steps actually executed, $= r + l$. By simply solving for $r$ and $l$ we deduce that $r = (1/2)(x+n)$ and $l = (1/2)(n-x)$.  Given this, there are now ${n \choose l}$ ways that $l$ given steps can occur in a total of n steps. This also denotes the number of ways of arriving at point $x$ (the end point), with each way having a probabilty of p^{r}q^{l}. One thing that must be noted is that $x$ and $n$ must be either odd or even.  This is the general description of random walk itself. But the calculations to determine effectiveness of a shot falls under a statical analysis of binary classification called F_{1} score. It utilizes two terms - precision and recall. In terms of our mathematical model, precision is the number of tumor cells covered in the shot divided by the total number of cells covered by the shot. Recall, in context, is the number of cancer cells covered in a shot divided by the total number of cancer cells. The F_{1} score in our problem was calculated with this equation:  \begin{equation}   F_{1}=2\frac{(\text{Precision})(\text{Recall})}{(\text{Precision} + \text{Recall})}  \end{equation}  So essentially what we did was implement these two concepts in terms of Python-written code that generated a 100x100 brain "grid" and a. generated a tumor b. implemented shots of 4, 8, 14, and 18 size radius for the necessary amount of times to achieve the highest F_{1} score. Additionally, we simulated our algorithm multiple times to see indeed which shot number will result with the greatest F_{1} score.