Commit 25637d1f authored by SOLIMAN Sylvain's avatar SOLIMAN Sylvain
Browse files

Titles

parent fa60c634
%% Cell type:markdown id: tags:
# Let us start by looking again at the Prey-Predator model
# Prey-Predator
Let us start by looking again at the Prey-Predator model
%% Cell type:code id: tags:
```
load(library:examples/lotka_volterra/LVi.bc).
list_model.
```
%% Cell type:markdown id: tags:
### SSA means Stochastic Simulation Algorithm (from Gillespie)
%% Cell type:code id: tags:
```
numerical_simulation(method: ssa).
plot.
```
%% Cell type:markdown id: tags:
### SPN is a Stochastic Petri Net, i.e., SSA without time
%% Cell type:code id: tags:
```
numerical_simulation(method: spn).
plot.
```
%% Cell type:markdown id: tags:
### SBN is a Stochastic Boolean Net, i.e., a stochastic boolean simulation
%% Cell type:code id: tags:
```
numerical_simulation(method: sbn).
plot.
```
%% Cell type:markdown id: tags:
---
Now let us look at different ways to approach PAC learning for this model.
First, the biocham command: `pac_learning(Model, #Initial_states, Time_horizon)`
it will read the file `Model` and generate `#Initial_states` random initial states from which it will run simulations for `Time_horizon`.
You can add options for the simulation, notably: `boolean_simulation: yes` to go from default `ssa` to `sbn` method,
and `cnf_clause_size: 2` to change the size of the clauses considered from the default `3`.
%% Cell type:markdown id: tags:
## Question 1
Compare the results of trying to learn a model from traces of the above `library:examples/lotka_volterra/LVi.bc` model in the 3 following conditions:
1. A single boolean simulation of length 50
2. 25 boolean simulations of length 2
3. 50 stochastic simulations of length 1
Explain what you observe
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:markdown id: tags:
## Question 2
In the output, the `h` corresponds to Valiant's precision parameter. What we know (see François' slides) is that with $L(h, s)$ samples we have probability higher than $1 - h^{-1}$ to find our approximation, and its total amount of false negatives has measure $< h^{-1}$
How did we turn this into an estimate of the number of samples needed for a given $h$?
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:markdown id: tags:
## Question 3
Why do we have to provide a `cnf_clause_size` to learn CNF formulae of size less than `K`?
What does it represent "biologically"? Where can you see that in the model?
Could we have used the DNF learning algorithm here? why?
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:markdown id: tags:
---
# Circadian Clock
Let us now look at a slightly bigger model of the Circadian Clock by J.-P. Comet and G. Bernot
%% Cell type:code id: tags:
```
load(library:examples/circadian_cycle/bernot_comet.bc).
list_model.
```
%% Cell type:markdown id: tags:
## Question 4
Using Biocham commands of your choice, what do you observe as the behavior of this model?
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:markdown id: tags:
## Question 5
Now try PAC learning on that model, choosing yourself the number of initial states and simulation lenght, so that you are satisfied with the result.
What happens if you impose `cnf_clause_size: 1`? How would you expect that to be reflected in the behavior of the model?
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:markdown id: tags:
---
# Th cells
Let us now consider an even bigger model coming from L. Mendoza (Biosystems 2006), and made Boolean by the same author with Remy et al. (Dynamical Roles and Functionality of Feedback Circuits, Springer 2006).
![Th Lymphocite differentiation](RemyEtAl06.png)
The model is about the control and differentiation of Th (lymphocite) cells.
Before "learning" it, we will try to understand it a bit…
%% Cell type:code id: tags:
```
load(library:examples/Th_lymphocytes/lympho.bc).
list_model.
```
%% Cell type:code id: tags:
```
draw_influences.
```
%% Cell type:markdown id: tags:
Basically Th0 cells differentiate either into
Th1 cells (marked by the activity of the TBet transcription factor) under the effect of IFNγ
or
Th2 cells under the effect of IL4 that binds to its receptor to activate STAT6 and GATA3…
%% Cell type:code id: tags:
```
list_stable_states.
```
%% Cell type:markdown id: tags:
## Question 6
Why do we have 6 stable states instead of 3?
Hint: the picture of the graph might help…
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:markdown id: tags:
## Question 7
If one hopes for traces that would present all events with equal probability, what would be the approximate total number of samples needed to learn our 12-species model for $h = 0.1$?
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:markdown id: tags:
For time reasons, we will only use 10000 samples total.
## Question 8
Compare the three following models, and especially the last two ones:
- the model learnt with a single (stochastic) simulation of length 10000
- the model learnt with 10000 simulations of length 1 (with random initial states)
- the original model
What do you observe? Can you explain why?
If there are inconsistencies, can you propose a possible solution?
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:markdown id: tags:
## Question 9
Keeping the total number of samples at 10000, can you find a threshold after which models learnt are of better quality?
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:markdown id: tags:
## Question 8
Could we have used the DNF learning algorithm? Why?
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:markdown id: tags:
## Question 10
In order to reduce the number of samples needed for a given $h$, one solution is to use some prior knowledge.
Say we provide to the PAC learning algorithm the influence graph obtained by `draw_influences`.
How and why would that reduce the number of samples?
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
%% Cell type:code id: tags:
```
```
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment