4. Precision Medicine Data
All patients are different – and therefore require different
methods of treatment.
Before treatment, we may want to use data and math
modeling to understand the dynamics of the disease we’re
treating or what our treatment’s effects may be
http://biobydesign.com/blog/role-synthetic-biology-personalised-medicine/
5. Forward Problems for differential equations
Consider the differential equa-
tion,
dx
dt
= kx
where x denotes the number of
cancer cells in a patient, k is
the growth rate. This has so-
lution
x(t) = x0ekt
0 2 4 6 8 10
t
0
5
10
15
20
25
30
x
Exponential DE solutions
k = -1
k = -.1
k = .1
k = 1
Forward problem: Given the initial condition x0 and growth rate
k, we can calculate x(t)
6. Inverse Problems for differential equations
0 2 4 6 8 10
t
10
10.5
11
11.5
12
12.5
13
13.5
x
Noisy data
Patient data
If the tumor’s growth is gov-
erned by the exponential equa-
tion, how can we determine the
growth rate, k?
Inverse problem: Given experimental data, can we extract the
governing parameters?
8. Least Squares Fitting: intuition
k = 0.0025 has large discrepancies from the data, k = 0.3 has
much smaller values (i.e., is a better estimate)
9. Least Squares Fitting: intuition
k = 0.0025 has large discrepancies from the data, k = 0.3 has
much smaller values (i.e., is a better estimate)
10. Least Squares Fitting: definitions
At times
t1, t2, ..., tN
Our data have values
yi = y(ti )
For a given k, Our model has the
form x(t; k)
Then we define the least
squares cost function, J(k),
J(k) =
N
i=1
(yi − x(ti ; k))2
Why square the error?
11. Plot of J(k)
0 0.01 0.02 0.03 0.04 0.05
k
0
5
10
15
20
25
30
35
40
45J(k)
cost function
12. Plot of J(k)
0 0.01 0.02 0.03 0.04 0.05
k
0
5
10
15
20
25
30
35
40
45
J(k)
cost function
ˆk = the value of k that minimizes J(k)
13. Optimization question
ˆk is the value of k that minimizes J(k) = n
i=1 (yi − x(ti ; k))2
ˆk =argmin
k
N
i=1
(yi − x0ekt
)2
But how do we minimize J(k)?
18. Option 2: Numerical Optimization
Linear regression is not perfect, especially when the model is more
complicated.
Fortunately, R has built-in optimization functions!
19. R Optimization Package
We can optimize with the nelder-mead algorithm:
optim_nm(fun, k = 1, start,tol=0.00001)
fun: function to be minimized
k: # params to be estimated
start: Guess of value to begin with
20. Results: Nelder Mead
0 2 4 6 8 10
t
9
9.5
10
10.5
11
11.5
12
12.5
13
13.5
14
x
k = .002532
Data
model
25. Mathematical Inference
Given a data set, {yi }N
i=1 and mathmatical model f (t; θ),
We can estimate θ as
ˆθ = arg min
θ
N
i=1
(yi − f (ti ; θ))2
and estimate data variance as
ˆσ2
=
1
N − 1
N
i=1
(yi − f (ti ; ˆθ))2
28. Conclusions
Experimental data can often be interpreted with the aid of
mathematical models
Applicable to personalized medicine, where each patient may
have different parameters (or even equations!)
Questions?
jtnardin@ncsu.edu jnard98