Scientific Programming
160 subscribers
158 photos
30 videos
138 files
446 links
Tutorials and applications from scientific programming

https://github.com/Ziaeemehr
Download Telegram
plt.rc is a Matplotlib function that can be used to modify the runtime configuration (rc) settings of a plot. The rc settings control the defaults of almost every property in Matplotlib, such as figure size and DPI, line width, font size, and color

link
#snippet
Kuramoto order parameter (KOP)
extract phase from given time series using hilbert transform and calculate the KOP.
COMPUTATIONAL PSYCHIATRY COURSE ZURICH
This course is organized by the Translational Neuromodeling Unit (TNU), University of Zurich & ETH Zurich and is designed to provide MSc and PhD students, scientists clinicians and anyone interested in Computational Psychiatry with the necessary toolkit to master challenges in computational psychiatry research.

Pre-requisites: Some background knowledge in neuroscience, neuroimaging, (Bayesian) statistics & probability theory, programming and machine learning is expected. If you lack this background, it is recommended that you prepare for this course.

https://www.translationalneuromodeling.org/cpcourse/

Preparation Resources
Lectures
Lecture Recordings
Tutorials
Reading List
ISLR with applications in Python is out! 🚀🚀🚀

An Introduction to Statistical Learning (ISLR), by Profs James, Witten, Hastie, and Tibshirani, in my opinion, is one of the best introductory books for machine learning ❤️. The book focuses on the foundations of data science and originally was with R examples. Today, the authors, along with Prof. Taylor, released a Python edition for the 2nd version of the book. The book covers topics such as:
Regression and classification
Linear model selection and regularization
Non-linear regression
Tree-based methods
Support vector machines
Deep learning
Unsupervised learning

Both the R and Python versions of the book are available for free

R version
Python version

Have fun learning!👌
args and kwargs
One can put this at the beginning of the notebook to check the packages in active environment.
given "d" is suggested package versions.

Python file
Deep Learning with JAX

Notebooks for the chapters:
1. Intro to JAX
- JAX Speedup
2. Your first program in JAX
- MNIST image classification with MLP in pure JAX
3. Working with tensors
- Image Processing with Tensors
- Working with DeviceArray's
4. Autodiff
- Different ways of getting derivatives
- Working with gradients in TensorFlow, PyTorch, and JAX
- Differentiating in JAX
5. Compiling your code
- JIT compilation and more: JIT, Jaxpr, XLA, AOT
6. Vectorizing your code
- Different ways to vectorize a function, Controlling vmap() behavior, More real-life cases
7. Parallelizing your computations
- Using pmap()
8. Advanced parallelization
- Using xmap()
- Using pjit()
- Tensor sharding
- Multi-host example
9. Random numbers in JAX
- Random augmentations, NumPy and JAX PRNGs
9. Complex structures in JAX/Pytrees
- Pytrees, jax.tree_util functions, custom nodes
11. more to come

Github
How To Build a Neural Network to Recognize
Handwritten Digits with TensorFlow


- measuring loss per epoch
- adding dropout probability
- adding callback function to automatically abort the training based on a condition on changing loss value per epoch.


GitHub notebook
Complete ML Refresher (1).pdf
1.3 MB
Machine Learning refresher.
notebook.pdf
55.1 KB
Subplots in #Matplotlib
Some examples using:
1️⃣ subplot_mosaic
2️⃣ subplot2grid

GitHub
👍1
mastering_python.pdf
177.8 KB
Mastering #Python
Credit: Mousa
👍2
Notion is a popular tool that offers a wide range of features for note-taking, task management, document creation, and knowledge management. It provides a versatile and customizable interface that can be tailored to individual needs and workflows.

It is also available on Web, Mac, Linux, Windows, IOS and Android.

https://www.notion.so/

YouTube
Diffrax is a JAX-based library providing numerical differential equation solvers.

Features include:

1️⃣ ODE/SDE/CDE (ordinary/stochastic/controlled) solvers;
2️⃣ lots of different solvers (including Tsit5, Dopri8, symplectic solvers, implicit solvers);
3️⃣ vmappable everything (including the region of integration);
4️⃣ using a PyTree as the state;
5️⃣ dense solutions;
6️⃣ multiple adjoint methods for backpropagation;
7️⃣support for neural differential equations.

#jax
Documentation