Euler's Method in Python: Predator-Prey Example

  Рет қаралды 1,674

Mike Saint-Antoine

Mike Saint-Antoine

Жыл бұрын

Hi everyone! This video is about how to implement Euler's method for numerical ODE solving in Python, using the Lotka-Volterra Predator-Prey model as an example.
All the code from my videos is available on my Github:
github.com/mikesaint-antoine/...
Thanks for watching and let me know if you have any questions!

Пікірлер: 10
@MikeSaintAntoine
@MikeSaintAntoine Жыл бұрын
Hi everyone, thanks for watching! Here's the link to the code on my Github in case you want to try it for yourself (also feel free to add me as a friend on Github if you want 🙂) : github.com/mikesaint-antoine/Comp_Bio_Tutorials/blob/main/numerical_methods/eulers_method_predator_prey.py
@shabihah
@shabihah 6 ай бұрын
Thank you for your explanation. It really helps me to understand my uni module!
@MikeSaintAntoine
@MikeSaintAntoine 6 ай бұрын
Thanks for watching! 🙂
@achrafBadiry
@achrafBadiry 4 ай бұрын
I had problems understanding the Euler numerical approx. for a "prey-predator" uni. programming project. but you explained perfectly for this matter. thank you !
@MikeSaintAntoine
@MikeSaintAntoine 4 ай бұрын
Thanks for watching! 🙂
@anikamittal6721
@anikamittal6721 5 ай бұрын
Hi Mike, I have no experience coding, but I wanted to calculate the parameters to create a Prey-Predator model for data I have collected. Is there any simple way to do so using python?
@MikeSaintAntoine
@MikeSaintAntoine 5 ай бұрын
Hi Anika, I think that will be a bit difficult with no experience coding, but maybe I can try to help. Can you email me at mikest@udel.edu and tell me about what you're trying to do, and attach the dataset? Then I'll see if there's an easy way to do it. Thanks!
@cameronl1434
@cameronl1434 5 ай бұрын
Hi mike, I am running the simulation with the same variables as you, with a slightly modified code, but I am unable to figure out why when I plot the results, the prey population immediately dumps to 0 rather than increases? here is my code below, any pointers would be greatly appreciated # model 1 - exponential prey growth with type I functional response while x > 0 and y > 0 and t < tmax: dx = expo_growth(alpha, x) - f_type1(beta, x, y) dy = pred_growth_t1(delta, x, y) - pred_death(gamma, y) #update values x += dx * dt y += dy * dt t += dt # append values to lists prey_pop_m1.append(x) pred_pop_m1.append(y) t_m1.append(t)
@MikeSaintAntoine
@MikeSaintAntoine 5 ай бұрын
Hi Cameron, yeah I can try to help with that! Could you email me your full code at mikest@udel.edu? Then I'll try to run it and take a look. It's hard to tell based on the short code snippet because the problem might be in one of the functions that you're using for the different ODE terms.
@cameronl1434
@cameronl1434 5 ай бұрын
Thank you so much, I've popped over an email
Calculating Entropy and Mutual Information in Python
37:44
Mike Saint-Antoine
Рет қаралды 1,5 М.
Python Code for Predator-Prey Model
16:10
Mike Saint-Antoine
Рет қаралды 14 М.
1❤️#thankyou #shorts
00:21
あみか部
Рет қаралды 88 МЛН
IB MAI HL - 12.05.1 Predator - Prey Model - Euler's Method - DE
17:22
IBvodcasting ibvodcasting
Рет қаралды 4,4 М.
Euler's Method
7:03
Physics With Nero
Рет қаралды 4,6 М.
Coding a Fourth-Order Runge-Kutta Integrator in Python and Matlab
36:52
Predator-Prey Model (Lotka-Volterra) Overview and Steady States
7:41
Mike Saint-Antoine
Рет қаралды 31 М.
Python Hash Sets Explained & Demonstrated - Computerphile
18:39
Computerphile
Рет қаралды 109 М.
Logistic Growth Model
6:48
Mike Saint-Antoine
Рет қаралды 178
Predator-Prey Population Models || Lotka-Volterra Equations
9:30
Exploring Maths
Рет қаралды 27 М.
Samsung Galaxy 🔥 #shorts  #trending #youtubeshorts  #shortvideo ujjawal4u
0:10
Ujjawal4u. 120k Views . 4 hours ago
Рет қаралды 10 МЛН
iPhone 12 socket cleaning #fixit
0:30
Tamar DB (mt)
Рет қаралды 51 МЛН
Will the battery emit smoke if it rotates rapidly?
0:11
Meaningful Cartoons 183
Рет қаралды 31 МЛН
WWDC 2024 Recap: Is Apple Intelligence Legit?
18:23
Marques Brownlee
Рет қаралды 6 МЛН
Игровой Комп с Авито за 4500р
1:00
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 240 М.