Working with Neural Nets
Can you Dance?
Introduction
One of our aims with Creative Coding is to of course make things interactive. Here we will apply the ml5.js
library in p5.js
to use an ML/DL algorithm called Classification to detect human poses in front of the camera. The code can then create unique experiences based on pose-detection with ML, and the subsequent code that responds to the user.
We will be following the ideas from here:
Adavu Detection
Mudra Detection
Bhava Detection
But Wait! How does Classification Work?
Ah, peasants. Isn’t it enough that you can dance?
So, we can perform Classification based on Machine Learning (ML) structured and algorithms such as:
Random Forests. Also see Google Decision Forests. We will try to get an intuition into
bootstrapping
of variables in data, creating decisiontrees
, and making random selections of variables from a dataset to createrandom forests
.-
And there are Deep Learning (DL) structured and algorithms that allow us to do the same things, perhaps in a more “black-box” manner. We will peep into:
- The Perceptron
- The Multilayer Perceptron
- Backpropagation
- Gradient Descent
-
Convolutional Neural Nets(in a later course)
Here, we will also try to build an intuitive sense of some of the technical terminology involved: convolution
, regression
, activation
, weighting
…and such terms that generally elude peasants.
Wait, But Why?
Understanding the underlying math inside of Neural Nets can help us appreciate better how to apply them design with them, and even keep them as simple as needed.
How to Train your Dragon Neural Network
References
- Colah’s Blog.(Apr 6, 2014). Neural Networks, Manifolds, and Topology. https://colah.github.io/posts/2014-03-NN-Manifolds-Topology/. Very simple and readable article.
- Machine Learning Tokyo: Interactive Tools for ML/DL, and Math. https://github.com/Machine-Learning-Tokyo/Interactive_Tool
- https://developers.google.com/machine-learning.https://developers.google.com/machine-learning
- The Neural Network Zoo - The Asimov Institute. http://www.asimovinstitute.org/neural-network-zoo/
- It’s just a linear model: neural networks edition. https://lucy.shinyapps.io/neural-net-linear/
Convolutional Neural Networks
- Digit Recognition with CNNs. Interactive! https://transcranial.github.io/keras-js/#/mnist-cnn
- CNN Convoluter. https://pwwang.github.io/cnn-convoluter/
- CNN Explainer: Learn Convolutional Neural Network (CNN) in your browser!. https://poloclub.github.io/cnn-explainer/
- Deep Lizard. Understanding Convolution Operations in Neural Networks. https://deeplizard.com/resource/pavq7noze2
- Andrej Karpathy. ConvNetJS: Deep Learning in your browser.https://cs.stanford.edu/people/karpathy/convnetjs/
- Adit Deshpande. A Beginner’s Guide to CNNs. https://adeshpande3.github.io/A-Beginner%27s-Guide-To-Understanding-Convolutional-Neural-Networks/
- Anyone Can Learn AI Using This Blog. https://colab.research.google.com/drive/1g5fj7W6QMER4-03jtou7k1t7zMVE9TVt#scrollTo=V8Vq_6Q3zivl
- Practical Deep Learning for Coders: An Online Free Course.https://course.fast.ai
- Neural Networks Visual with vcubingx
LLMs
- Brendan Bycroft.Visualizing LLMs. https://bbycroft.net/llm
- Rohit Patel (20 Oct 2024). Understanding LLMs from Scratch Using Middle School Math: A self-contained, full explanation to inner workings of an LLM. https://towardsdatascience.com/understanding-llms-from-scratch-using-middle-school-math-e602d27ec876
- AI-powered reporting and annotation for radiology. https://www.md.ai
Using R for DL
-
torch
for R: An open source machine learning framework based onPyTorch
. https://torch.mlverse.org - Torch Interactive Tutorial. https://mlverse.shinyapps.io/torch-tour
- Geeks for Geeks. Convolutional Neural Nets in R. https://www.geeksforgeeks.org/convolutional-neural-networks-cnns-in-r/
- David Selby (9 January 2018). Tea and Stats Blog. Building a neural network from scratch in R. https://selbydavid.com/2018/01/09/neural-network/
- Akshaj Verma. (2020-07-24). Building A Neural Net from Scratch Using R - Part 1 and Part 2. https://rviews.rstudio.com/2020/07/20/shallow-neural-net-from-scratch-using-r-part-1/ and https://rviews.rstudio.com/2020/07/24/building-a-neural-net-from-scratch-using-r-part-2/
- Ander Fernandez Jauregui. https://anderfernandez.com/en/blog/how-to-create-neural-networks-with-torch-in-r/
- https://f0nzie.github.io/rtorch-minimal-book/
Textbooks
- Michael Nielsen. Neural Networks and Deep Learning. Available Online
- The Little Book of Deep Learning. Available Online
- Simone Scardapane. Alice’s Adventures in Diffferentiable WonderLand: A Primer on Designing Neural Networks. https://www.sscardapane.it/alice-book/
- Parr and Howard (2018). The Matrix Calculus You Need for Deep Learning.https://arxiv.org/abs/1802.01528
- Zhang, Lipton, Li, Smola. Dive into Deep Learning. https://www.d2l.ai/
- Sigrid Keydana. Deep Learning and Scientific Computing with R torch https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/
R Package Citations
Citation
@online{2024,
author = {},
title = {\textless Iconify-Icon Icon=“lucide:person-Standing”
Width=“1.2em”
Height=“1.2em”\textgreater\textless/Iconify-Icon\textgreater{}
\textless Iconify-Icon Icon=“mdi:human-Female-Dance” Width=“1.2em”
Height=“1.2em”\textgreater\textless/Iconify-Icon\textgreater{}
{Working} with {Neural} {Nets}},
date = {2024-12-03},
url = {https://av-quarto.netlify.app/content/courses/MathModelsDesign/Modules/100-AI/10-NeuralNets/},
langid = {en}
}