Introduction to Scientific Computing#
https://oist.github.io/iSciComp/
Kenji Doya
August 2023 in Paris
Aim of this Book#
This book aims to provide students from non-computational backgrounds with the basic knowledge and practical skills of computing that are required in almost all fields of science today.
It also tries help students’ intuitive understanding of basic mathematical concepts like eigenvalues and stability through computation and visualization.
Python is used as the standard programming language, but the concepts covered can be helpful also in using other computing tools for data analysis and simulation.
Jupyter Book#
This book is made by Jupyter Book (https://jupyterbook.org). An important feature is that you can download the source codes as Jupyter Notebook by the Download icon on the top right corner of each chapter.
Rather than just reading the html or pdf text, please run the codes, change parameters, apply your own data, and modify the codes to see how the algorithms really work (or fails).
Book Contents#
Chapter |
Topic |
Items covered |
---|---|---|
1 |
Introduction to Python |
python, jupyter; data types, for loop |
2 |
Visualization |
matplotlib |
3 |
Vectors and matrices |
numpy; eigenvalue/vector |
4 |
Functions and classes |
name space, object oriented programming |
5 |
Iterative computation |
Newton method, discrete-time dynamics |
6 |
Ordinary differential equation |
scipy; Euler method, stability |
7 |
Partial differential equation |
finite-difference method |
8 |
Optimization |
gradient descent, Gauss-Newton method |
9 |
Sampling methods |
Monte Carlo methods, evolutionary algorithms |
10 |
Software management |
version control system, GitHub |
Why Computation?#
Theoretical analysis often requires simplifying assumptions.
Thought experiment is limited/biased by the experimenter’s thinking.
Huge data set is impossible to comprehend withtout numerical processing.
…
Which Tools to Use#
There are a bunch to programming languages and tools to choose from.
General programming languages#
Fortran
C
C++
Java
MATLAB
Python
Special purpose tools#
Statistics: SPSS, S, R,…
Genomics: BLAST,…
MRI: SPM, VBM,…
Neuroscience: NEURON, NEST,…
How to select?#
Satifsy your present need?
Future usability
User community
How to Learn?#
Textbooks
Online documents
Online courses
Read experts’ codes!
Modify for your needs
Try coding from scratch
…
References#
Python#
[Foundation", 2023] Python Tutorial https://docs.python.org/3/tutorial
[Varoquaux et al., 2023] Scientific Python Lectures https://lectures.scientific-python.org
Scientific Computing#
[Linge and Langtangen, 2016] Linge S, Langtangen HP (2016). Programming for Computations – Python. Springer. https://link.springer.com/book/10.1007/978-3-319-32428-9
[Wilson et al., 2017] Wilson G, Bryan J, Cranston K, Kitzes J, Nederbragt L, Teal TK (2017). Good enough practices in scientific computing. PLoS Comput Biol, 13, e1005510. https://doi.org/10.1371/journal.pcbi.1005510
Math#
[Deisenroth et al., 2020] Deisenroth MP, Faisal AA, Ong CS (2020). Mathematics for Machine Learning. Cambridge University Press. https://mml-book.com
[Strogatz, 2024] Strogatz SH (2024). Nonlinear Dynamics And Chaos: With Applications to Physics, Biology, Chemistry, and Engineering. CRC Press. https://doi.org/10.1201/9780429398490