Тёмный
Machine Learning & Simulation
Machine Learning & Simulation
Machine Learning & Simulation
Подписаться
Explaining topics of 🤖 Machine Learning & 🌊 Simulation with intuition, visualization and code.

------

Hey,

welcome to my channel of explanatory videos for Machine Learning & Simulation. I cover topics from Probabilistic Machine Learning, High-Performance Computing, Continuum Mechanics, Numerical Analysis, Computational Fluid Dynamics, Automatic Differentiation and Adjoint Methods. Many videos include hands-on coding parts in Python, Julia, or C++. The videos also showcase the application of the topics in modern libraries like JAX, TensorFlow Probability, NumPy, SciPy, FEniCS, PETSc and many more.

All material is also available on the GitHub Repo of the channel: github.com/Ceyron/machine-learning-and-simulation

Enjoy :) And please leave feedback.

If you liked the videos, feel free to support the channel on Patreon: www.patreon.com/MLsim

If you want to make a one-time donation, you can do so via PayPal: paypal.me/FelixMKoehler
Lorenz Map in NumPy
11:30
28 дней назад
Lorenz Simulator in NumPy
19:21
Месяц назад
Autodiff and Adjoints for Differentiable Physics
1:24:12
3 месяца назад
Unrolled vs. Implicit Autodiff
7:15
5 месяцев назад
Unrolled Autodiff of iterative Algorithms
28:54
5 месяцев назад
UNet Tutorial in JAX
1:05:07
6 месяцев назад
DeepONet Tutorial in JAX
51:38
6 месяцев назад
2D Spectral Derivatives with NumPy.FFT
26:00
8 месяцев назад
Softmax - Pullback/vJp rule
7:38
8 месяцев назад
Softmax - Pushforward/Jvp rule
13:44
9 месяцев назад
Fourier Neural Operators (FNO) in JAX
1:06:55
9 месяцев назад
Upgrade the KS solver in JAX to 2nd order
12:38
11 месяцев назад
Simple KS solver in JAX
23:52
11 месяцев назад
np.fft.rfft for spectral derivatives in Python
2:49
11 месяцев назад
Spectral Derivative with FFT in NumPy
8:58
11 месяцев назад
Комментарии
@mikelmenaba
@mikelmenaba 4 дня назад
mate you are fantastic
@MachineLearningSimulation
@MachineLearningSimulation 22 часа назад
Thanks 😊
@Slowhand4106
@Slowhand4106 5 дней назад
convection term indexing was explained as shit
@bigdickbee2189
@bigdickbee2189 6 дней назад
thats why python is a joke
@dargi_amorim
@dargi_amorim 6 дней назад
Thank you very much for your video ! :)
@MachineLearningSimulation
@MachineLearningSimulation 22 часа назад
You are welcome! 😊
@lidenbrock717
@lidenbrock717 7 дней назад
A code to simulate it, it would be better
@MachineLearningSimulation
@MachineLearningSimulation 22 часа назад
Sure 😃 He is an example using finite differences (btcs scheme) with a PetSc solver: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-oqxPyRZKOu4.html and an example using FEniCs: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-QpA7E4YHbyU.html
@yixincfd
@yixincfd 7 дней назад
Cool, is there an example or code for discrete accompanied CFD shape optimization using automatic differentiation, like SU2, but the instructional version?
@MachineLearningSimulation
@MachineLearningSimulation 22 часа назад
Thanks for the comment 😊 From the back of my head I do not have anything right away, but I remember that SU2 had quite extensive documentation. So there could be educational examples as well. You could also check resources on FEniCs and Openfoam. Best of luck 🤞
@comment8767
@comment8767 8 дней назад
Anaconda does not want to load pyclaw in windows ... seems like only Linux version is available
@MachineLearningSimulation
@MachineLearningSimulation 22 часа назад
Hmmm, I'm sorry. I know (py-)claw can be tricky to install. If you can isolate the problem, maybe open an issue on their GitHub page?
@fuat7775
@fuat7775 13 дней назад
Very well explained, thanks!
@MachineLearningSimulation
@MachineLearningSimulation 22 часа назад
Thanks 🙏
@tuo9433
@tuo9433 13 дней назад
Hi. I am having a question regarding the use of Leibniz rule. When you formulate the problem as a constrained optimization with ODE constraint, you take the total derivative of the Lagrangian with respect to the parameter \theta. By the Leibniz rule, you brought the derivative d/d\theta inside the integral, but when you brought it inside, it should become a partial derivative wrt \theta, is it not?
@satviksrivastava5236
@satviksrivastava5236 15 дней назад
Great video ❤
@MachineLearningSimulation
@MachineLearningSimulation 22 часа назад
Glad you liked it!!😊
@qilejiang8697
@qilejiang8697 17 дней назад
brilliant
@MachineLearningSimulation
@MachineLearningSimulation 22 часа назад
Thanks 🙏
@h.e.a311
@h.e.a311 18 дней назад
ihanaa
@MachineLearningSimulation
@MachineLearningSimulation 22 часа назад
Hope you liked it 😊
@particularlypythonic
@particularlypythonic 18 дней назад
I think it is worth drawing a distinction between vectorization and parallelization in jax computation. Vectorization takes SISD(Single Instruction Single Data) to SIMD(Single Instruction Multiple Data) while Parallelization takes it to MIMD( Multiple Instruction Multiple Data). To do parallelization in jax you would need to use sharded parallel or for simpler cases pmaps. This is a good showcase of how vmaps and vectorization in jax works.
@MachineLearningSimulation
@MachineLearningSimulation 22 часа назад
Thanks a lot for the kind comment 😊 I'm glad you liked the showcase. I would agree partially. There are multiple flavors of parallelization available within JAX, vectorization (via jax.vmap) is one of them. Parallelization just means that multiple calculations are executed simultaneously (en.m.wikipedia.org/wiki/Parallel_computing).
@gitfted_by_AI
@gitfted_by_AI 18 дней назад
Jax is awesome, i prefer Jax ecosystem to Pytorch ecosystem. Even if Jax is more complex to understand compared to Pytorch, it is highly rewarding. In particularly, in Reinforcement Learning when the envs are mainly into the CPU while your NN is into the GPU.
@MachineLearningSimulation
@MachineLearningSimulation 22 часа назад
JAX is amazing 👍 I'm still constantly amazed that all its components work so flawlessly.
@gitfted_by_AI
@gitfted_by_AI 19 часов назад
@@MachineLearningSimulation i fall in love with Jax even i am still learning (just three weeks ago i began ). It is more complex i expected but you have the feeling to have superpower.
@THEKHURRAM100
@THEKHURRAM100 18 дней назад
Lovely ❤
@MachineLearningSimulation
@MachineLearningSimulation 22 часа назад
Thanks 🙏
@THEKHURRAM100
@THEKHURRAM100 18 дней назад
Lovely
@Alukard55
@Alukard55 20 дней назад
You provided a very comprehensive introduction and hands-on experience with LBM. The level of clarity and neatness is awesome! Great job! It was a real pleasure to watch content with this level of quality. In this particular case, 'LBM' should be read as 'Lovely-Baked Manual'!
@MachineLearningSimulation
@MachineLearningSimulation 21 час назад
Thank you ❤️ That's such amazing, positive feedback 😊. I'm very glad you enjoyed the video. 🙏
@electric_sand
@electric_sand 21 день назад
Hey! Thanks for the videos. Just wondering if you could do a short career talk on the SciML skills needed to get into a place like Pasteur labs ;) . I would like to get specific at something. Cheers!
@mehdizahedi2810
@mehdizahedi2810 21 день назад
AWESOME, best tutorial on Lux.jl, please add more tutorial on deep learning with Julia.
@dargi_amorim
@dargi_amorim 25 дней назад
Nice ! Thank you for your videos, your work here on youtube is incredible and surely helps a looot of people
@kjtdimlak
@kjtdimlak 27 дней назад
A fantastic explanation! Thank you
@MachineLearningSimulation
@MachineLearningSimulation 21 час назад
You're welcome 🤗
@srisaisubramanyamdavanam9912
@srisaisubramanyamdavanam9912 27 дней назад
I was trying to implement prediction function for multinomial naive bayes and luckily your video helped me. Thanks :)
@wanikhawar
@wanikhawar 28 дней назад
Great video Felix! Could you also make a video on how to compute the lyapunov exponents from time series data? I am currently using the Eckmann algorithm in nolds package, but I dont really have a good conceptual understanding of what's going on under the hood.
@atharvnaik
@atharvnaik Месяц назад
Hello! Shouldn't the u advection term for u-momentum equation be udu/dx = 0.5(d(u^2)/dx) and not d(u^2)/dx? (Or if you modify the terms using continuity equation the other term will turn into d(uv)/dx?).
@velcro8299
@velcro8299 Месяц назад
I do not know much about programming in python, But I have a lot of questions.
@daddy_myers
@daddy_myers Месяц назад
Great content as always! Although, I wonder if you plan on making FEniCSx content anytime soon? YT is practically devoid of a simple guide on the library and I cannot figure it out for the life of me.
@MattMatt-y2o
@MattMatt-y2o Месяц назад
Tutorial: How to make a fluid sim "Tell AI to make you a fluid sim" Might as well :)
@GordenMax-t3y
@GordenMax-t3y Месяц назад
Thank you very much for the nice video. Could you recommend some textbooks for adjoint methods for sensitivity analysis?
@idreeskhan-zp5ey
@idreeskhan-zp5ey Месяц назад
Thanks for the effort. I am planning to convert my Fortran code for LBM DHIT to python. For one GPU parallelization JAX or Lettuce is preferable?
@Tferdz
@Tferdz Месяц назад
Please use type-hints! Non-typed code is difficult to read and full of invisible errors. Also easier to read like this.
@MachineLearningSimulation
@MachineLearningSimulation Месяц назад
Thanks for the suggestion :). For production-code I agree, for educational code it can be cluttering.
@Tferdz
@Tferdz Месяц назад
@@MachineLearningSimulation let's tell the typescript community and educators to go back to JS too. Sounds like a good plan ☺
@AshishPatel-yq4xc
@AshishPatel-yq4xc Месяц назад
Are there any introduction books on Variational Inference you can recommend so then I can build models ?
Месяц назад
Amazing. A simple solution for a complex problem. Thanks!
@MachineLearningSimulation
@MachineLearningSimulation Месяц назад
Thanks 😊
@mehdizahedi2810
@mehdizahedi2810 Месяц назад
As usual, awesome video, will you please create Julia implementation too.
@MachineLearningSimulation
@MachineLearningSimulation Месяц назад
Thanks a lot <3 I have the Julia videos a bit on hold at the moment, but I plan for a series on fundamental finite difference simulation of PDEs, which will be Julia-Python side-by-side.
@ahmedsuliman9067
@ahmedsuliman9067 Месяц назад
Thanks
@MachineLearningSimulation
@MachineLearningSimulation 21 час назад
You're welcome 🤗
@wanikhawar
@wanikhawar Месяц назад
Great video as always Felix. For some reason, I never thought of using classes and would implement the functions directly.
@MachineLearningSimulation
@MachineLearningSimulation Месяц назад
Thanks :) Yeah, the functional approach is the most straightforward. I would also probably use it for a quick implementation, but the class-based approach will turn out beneficial in the next videos. Just in terms of the interface, it shows how close the MLP emulator will be to the RK4 simulator.
@gokuldasnellenat4298
@gokuldasnellenat4298 Месяц назад
The best explanation of Multivriate Normal distribution
@MachineLearningSimulation
@MachineLearningSimulation 21 час назад
Thank you 🤗
@ariffatahillah2081
@ariffatahillah2081 Месяц назад
Hello, thank you for your tutorial video what if the pipe wall is elastic, like a blood vessel?
@MachineLearningSimulation
@MachineLearningSimulation Месяц назад
Hi, thanks for the great question and for the kind feedback. 😊 Unfortunately, I don't have experience with modeling blood vessels. My first guess would be to decide how the fluid and the wall interact. If it is only the wall deforming, one could apply the movement as a respective Dirichlet boundary condition on the flow field. However, since the domain changes, it might require remeshing (and as such unstructured meshes) if no immersed boundary method is used. Either way, I guess that this might be beyond this simple method I presented in the video.
@imtryingmybes7
@imtryingmybes7 Месяц назад
this goes hard
@MachineLearningSimulation
@MachineLearningSimulation Месяц назад
I hope that's a good thing 😉
@hardikbhardava9721
@hardikbhardava9721 Месяц назад
Thank for the great explanation. However I am wondering why didn’t you add initial value condition in the lagrange function? Only lambda^T * ode has added.
@sattamjr
@sattamjr Месяц назад
Very Nice, can I know the software that you use in this video,please? I am using Jupyter notebook.
@MachineLearningSimulation
@MachineLearningSimulation Месяц назад
Thanks for the kind comment 😊 This is VS code with the python extension and a dark theme. For this video, I didn't use a notebook, just a plain python file.
@soyagricola7526
@soyagricola7526 Месяц назад
What carrer or master should i have to be an meghanics of fluids investigator
@MachineLearningSimulation
@MachineLearningSimulation Месяц назад
That's a great question but I am probably not the best person to answer this since I currently do a PhD in a rather theoretical topic. There might be good resources you can find elsewhere on the internet. My first thoughts are that you need a good understanding of both fluid mechanics and numerical methods (for which I also present the fundamentals on this channel). Beyond that, it is necessary that you understand at least one of the big CAE softwares (either Ansys fluent, siemens starccm+, or openfoam) since most companies don't use their own solver codes. For this, it is also important that you completed projects and gained experience how the entire simulation pipeline (preprocessing, solving, Postprocessing, and interpretation) works. And, unfortunately, there is also some luck involved since these positions are (afaik) in a position of more supply than demand. Hence, it helps to build a publically visible portfolio and a social media/online presence that could help you get noticed. Good luck 🤞
@yongmrchen
@yongmrchen Месяц назад
Thanks.
@MachineLearningSimulation
@MachineLearningSimulation Месяц назад
You're welcome 🤗
@sm34923
@sm34923 2 месяца назад
I didn't understood shouldn't u_tent [0, :] be top boundary? Row indexing starting from upper row? 13:21
@raayandhar6195
@raayandhar6195 2 месяца назад
man your videos are so good and clear 👍
@MachineLearningSimulation
@MachineLearningSimulation Месяц назад
Appreciate it, thanks 🙏
@kumargaurav9824
@kumargaurav9824 2 месяца назад
How Can I add obstacles in smoke plume simulation? Can the environment layout be changed in the code?
@MachineLearningSimulation
@MachineLearningSimulation Месяц назад
As far as I am aware, PhiFlow should support the addition of obstacles within the domain and also supports rectangular domains. Check out its GitHub page with many cool examples: github.com/tum-pbs/PhiFlow This particular example could get you started: tum-pbs.github.io/PhiFlow/examples/grids/Batched_Smoke.html Since the phiflow 3.0 release, there is support for unstructured meshes but I haven't used it yet myself. You could check this example: tum-pbs.github.io/PhiFlow/examples/mesh/Build_Mesh.html
@kumargaurav9824
@kumargaurav9824 Месяц назад
@@MachineLearningSimulation Thanks for the response. It was really helpful. I am trying to simulate a smoke plume in 2D field with obstacles. I want it to be without buoyancy. Is it possible to do so?
@YT-yt-yt-3
@YT-yt-yt-3 2 месяца назад
but how does box muller method output normal distribution? i think that's important to understand.
@HydronauticaCFD
@HydronauticaCFD 2 месяца назад
Thank you for the video. I have a question regarding saving historical states. With the jax.vmap, it essentially predicting the full domain in one command, is that correct? I would like to be able to store historical states and then use the historical states in the prediction, but I am not sure how to do it in this configuration. I assume it will consist of performing the operator prediction sequentially, saving the historical state, and then repeating until the end of the domain. Thank you
@HydronauticaCFD
@HydronauticaCFD 2 месяца назад
def loss_fn(model,length, epoch): predictions_list = [] historical_states = jnp.zeros((151, 5)) for i in range(length): trunk_input = jnp.hstack((historical_states[i, :], trunk_inputs_train[i, :])).reshape(1, -1) predictions = jax.vmap(model)(branch_inputs_train[epoch,:].reshape(1, -1),branch_IC_inputs_train[epoch,:].reshape(1, -1), trunk_input) predictions_list.append(predictions) # Update the historical state buffer for the next timestep if i < length - 1: # Ensure we don't update beyond the last index # Shift the historical states left and add the new prediction historical_states = historical_states.at[i + 1, 1:].set(historical_states[i, :-1]) historical_states = historical_states.at[i + 1, 0].set(predictions[0]) predictions_list.append(predictions) predictions_array = jnp.vstack(predictions_list) mse = jnp.mean(jnp.square(predictions_array - outputs_train[epoch, :length])) return mse Something like this, but with no loops, of course.
@ekremgulsevincler5324
@ekremgulsevincler5324 2 месяца назад
ffmpeg prompt is not working PS C:\Users\deniz\julia first> ffmpeg -f image2 -framerate 24 -i kolmogorov_%05d.png kolmogorov_animation.gif ffmpeg : The term 'ffmpeg' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + ffmpeg -f image2 -framerate 24 -i kolmogorov_%05d.png kolmogorov_anim ... + ~~~~~~ + CategoryInfo : ObjectNotFound: (ffmpeg:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
@MachineLearningSimulation
@MachineLearningSimulation Месяц назад
I think you have to install ffmpeg and expose the command in your Powershell. You can probably find more information on the ffmpeg website.
@user-kn4wt
@user-kn4wt 2 месяца назад
awesome! :) quick q @MachineLearningSimulation, what do you think of keras 3 using jax backend? or is jax + equinox stack still the nicest?
2 месяца назад
Nice!
@MachineLearningSimulation
@MachineLearningSimulation Месяц назад
Thank you! Cheers! 😊