Squid Infection Model

From COSSAN Wiki
Jump to: navigation, search
Cossan-X Tutorial

Squid Infection Model

Lucy Murray, Nikola Ondrikova, Hayley Jones, Ben Holmes


Background

Are Octopuses the result of extra-terrestrial life? One paper published in the journal Progress in Biophysics and Molecular Biology thinks so. The researchers specifically propose the idea that extra-terrestrial viruses found within a meteor which crashed to earth and infected a population of squid which resulted in a change of their DNA evolving them into Octopuses. For the full paper, see here: [1] .

Octopussquid.jpg

In developing a model to predict the impact the virus could have on the squid population, there are several factors which need to be considered:

The squid Population,
The probability a squid will come into contact with the Extra-Terrestrial Virus,
The probability that the virus will be absorbed by the squid, and
The probability of the squid surviving the contamination, and thus evolving into an octopus.


Inputs

Parameters

The survival rate, s, is the probability an individual squid will not die from the virus, and thus transform into an octopus. The squid population, n, is self-explanatory.

Suppose the probability of a squid surviving the virus is fixed at 0.5, and there are 1,000,000 squids currently in the world.

Parameter Value
n
1,000,000
\mu
0.5

Random Variables

For an octopus to become a squid through the transmission of the virus, it is necessary that first the octopus comes into contact with the virus, and second that the virus is absorbed by the octopus.

These are both random events, and as such the chance of them happening need distributions.

Suppose the absorption and contact events are denoted by A and C respectively. Then the distributions of these events are given in the table below.

Random Variable Distribution
A
Beta(1.5, 9.0)
C
Normal(0.5,0.05)

As a squid comes into contact with more of the virus, it becomes more likely at least one is absorbed. This results in the two random variables having a high correlation of 0.8.

Input Functions

Suppose we have the total squid population, n, the contact coefficient, C, the absorption probability, A, and finally the survival rate, \mu.

Then the total number of octopi resulting from the virus, O, is given by

O=nC+\mu A^4.

Output Functions

The Cossan software can then be used to find the expected number of octopi, amongst other useful statistics. This can be achieved through the use of either deterministic (which do not include randomness) or stochastic (which include randomness) methods.

Model

Physical Model

Cossan Tutorial

Create a New Project

The first step is always to create a new blank project, to do this follow the steps shown in the following 2 screenshots.

Projectsquid.png
Projectwindow.png



Create Inputs

There are 4 input parameter for this problem, 2 of these are constant parameters (the squid population and survival rate) and 2 are random variables (the absorption probability and the contact coefficient). This section describes how to create these parameters and create a correlation between the random variables.

Constant Parameters

To create a parameter for the initial squid population of 1,000,000 follow these 3 steps. Begin by right-clicking on the 'Parameters' tab.

Addparam.png
Squidpop.png
Squidvalue.png

To create a parameter for the survival rate of the squid follow the same process, the result should be as shown below.

Survival.png

Random Variables

The Absorption Probability and Contact Coefficient are both random variables selected from distributions as specified in the background section. To create these variables begin by adding a new random variable by right-clicking on the 'Random Variables' tab as shown below.

Randvar.png

Give the variable a name and description, the following 2 screenshots show the process for creating the Absorption Probability distribution.

Createvar.png

Select the Beta distribution from the drop-down menu and input the alpha and beta parameters in the boxes which will appear. Saving, then closing and re-opening the window will allow the user to view the graphs of the random variable distribution created.

Absgraph.png

Follow the same process for the Contact Coefficient, selecting the distribution as specified in the problem section of this tutorial. The required output is shown in the next screenshot.

Contact.png


Correlating the Random Variables

There is a correlation between the random variables of 0.8, to incorporate this factor into the Cossan model, a Random Variable Set must first be made.

Set.png

Give the random variable set a name and description.

Setname.png

By clicking the addition symbol button add both the random variables into the set.

Addvar.png

Click on the Correlations tab and input the correlation between the two variables as shown below.

Setcor.png

The Evaluator Function

To calculate the number of octopi created an Evaluator function needs to be added which incorporates the input function into the Cossan model. To begin, a Matlab script needs to be added by right-clicking on the tab underneath the Evaluators section.

Matlabsc.png

Create a new script and give it a name and description.

Newsc.png

By clicking the addition button on the input box add the parameters required to calculate the number of octopi created. These are the 4 variables shown in the following screenshot. Also click the addition button on the output box and enter a name for your output function - 'OctNo' in this case.

Screen1.png

By now clicking on the Script / Function tab instead of Metadata at the bottom of the page, you will see a page in which to enter the matlab function used to calculate the number of octopi produced. This should equate to the function given in the background section as shown in the following screenshot.

Screen2.jpg

Deterministic Analysis

Deterministic analysis creates outputs which are fully determined by the parameter values and initial conditions, without any randomness. This provides an alternative to stochastic risk analysis in which a non-deterministic model is applied to the variables with input and output values known.

1. Again right-click on Physical Models and select Add Physical Model. Add a name (e.g. InfectionModel) and a description of the physical model and press Finish to create your model

Screen3.png


Add an evaluator to the editor that appears in the main window by clicking the “+” button on the right side of the Evaluator box and selecting the corresponding evaluator in the pop-up window. Then, all the related inputs and outputs will automatically appear in the corresponding boxes in the main window.

The entry “uncorrelated_rvs” will appear in the Random Variable Sets window by default. Add a random variable set by pressing the “+” button on the right side of the Random Variable Set box and selecting rvset1.

Save the object.


Screen4.png


4. Next click the green play button in the top-right of the window to start the analysis.

Within the Analysis Selection window which appears, give the analysis a name and description, then select Design of Experiments and press Next.


Screen5.png

In the second window which appears select Deterministic Analysis, then Next once again.

Screen6.png


5. Finally, select Finish in the following window in order to run the analysis.

Screen7.png

Results

In order to view your results go to Design of Experiments in the Analysis folder. Then double click Results and open the alphanumerically labelled folder. Open SimulationData_Deterministic_Analysis and observe the results. As can be seen from the screenshot the result of this simulation is that 3.5714 e4 squid have been infected and turned into octopi.

9.png



Uncertainty Quantification

Uncertainty quantification is the reduction of uncertainties in both computational and real-world applications, it does this by analysing the likelihood of specified outcomes when not all variables of a statistical model are known. The squid infection problem takes into consideration each of the input factors, and using uncertainty quantification allows us to predict the probability of a squid coming into contact with the virus, and how likely they are to turn into octopi. For quantifying the uncertainty in the squid infection model Monte Carlo simulation was used. This allows us to visualise the likelihood of the squid population turning into octopi after coming into contact with the virus given the input data.


In order to perform the uncertainty quantification, again click the green play button in the physical model. In the Analysis Selection window which appears click on the Uncertainty quantification option and select next.

10.png

In the next window choose the monte carlo simulation method. This is a brute force random sampling method using the parameters inputted, this is sufficient for this example where the simulation is fast and no variance reduction techniques are required to find the solution efficiently. In this tutorial example we will use 1000 samples as shown in the next screenshot. Batches are kept to 1 for Monte Carlo.

11.png

Finally click finish.

12.png

Results

The results of the Uncertainty Quantification analysis are available in the Analysis section, within the Uncertainty Quantification folder. The red box in the following screenshot shows where to find the results. A list of the object results will appear, clicking on the object of interest, OctNo, will reveal 1000 results corresponding to the number of samples used.

13.png

If we now view this in histogram view we can clearly see the distribution of the octopus number and therefore can infer the likelihood distribution of the number of squid evolving into octopi.

14.png

Sensitivity Analysis

Sensitivity analysis enables us to learn how much of the uncertainty in the output is derived from the uncertainty of different inputs. There are several uses of performing sensitivity analysis on a model:


1. Increased understanding of the relationships between input and output variables in a system or model.

2. Testing the robustness of the results of a model.

3. Searching for errors in a model.

4. Finding regions in the input factors for which the model output is either maximum or minimum.

5. Uncertainty reduction, through identification of model inputs causing significant uncertainty in the output.

6. Enhancing communication from modellers to decision makers


There are some situations which can be problematic when attempting to perform sensitivity analysis, including:


1. Too many model inputs to analyse.

2. Too many model outputs considered.

3. The model takes too long to run.

4. There is not enough information to build probability distributions for the inputs.


Exercise

In order to compare the number of Squid which have been turned into Octopi from being in contact with the virus, use the parameters provided in the problem description to perform Uncertainty Quantification on the squid infection rate and contact with the virus. As an extension to this the sensitivity analysis of the random variables can be performed using the previous theoretical description for information.

See Also