In this post, I explore if ideas of deliberate practise can be applied to teaching coding for Artificial Intelligence / Machine Learning
I am exploring these ideas in a free coding workshop/ meetups in London.
There is already a waiting list.
We may hold more workshops next year depending on how these go.
But in this post, I outline the rationale of the learning strategy used
I have been involved in teaching Data Science for a few years now (Oxford University - Data Science for Internet of Things and also online). Over the years, I have tried to improve my teaching .. and adopt ideas from other domains into my teaching
One such technique is Deliberate practice a technique which probably originated in the former Soviet Union to train world class athletes. Deliberate practise is also used in learning complex skills like playing the violin – which require mastering many small steps and then putting the steps together in a complex whole (like a violin concert)
James Clear (whose writings I recommend) says of Deliberate practice
Deliberate practice always follows the same pattern: break the overall process down into parts, identify your weaknesses, test new strategies for each section, and then integrate your learning into the overall process.
And provides examples like
Cooking: Jiro Ono, the subject of the documentary Jiro Dreams of Sushi, is a chef and owner of an award-winning sushi restaurant in Tokyo. Jiro has dedicated his life to perfecting the art of making sushi and he expects the same of his apprentices. Each apprentice must master one tiny part of the sushi-making process at a time—how to wring a towel, how to use a knife, how to cut the fish, and so on. One apprentice trained under Jiro for ten years before being allowed to cook the eggs. Each step of the process is taught with the utmost care.
There are essentially six steps to Deliberate practise
1. Get motivated
2. Set specific, realistic goals
3. Break out of your comfort zone
4. Be consistent and persistent
5. Seek feedback
6. Take time to recover
So, the question is: Can we apply deliberate practise to learning coding for AI?
To try this, we work in small sections of code which you should master bit by bit
We divide the code into four sections
1) Pandas, NumPy and MathPlotLib
2) Data manipulation and feature engineering
3) Machine Learning models and validation·
4) Deep learning
Each of these topics is divided into detail (subtopics) as below
(note the code itself is taken from the public domain and from existing books under Apache v2 license)
Pandas, NumPy and MathPlotLib
· initializing NumPy array
· Creating NumPy array
· NumPy datatypes
· Field access
· Basic slicing
· Advanced indexing
· Array math: Sum function, Transpose function
· Broadcasting
· Creating a pandas series
· Creating a pandas dataframe
· Reading / writing data from csv, text, Excel
· Basic statistics on dataframe
· Creating covariance on dataframe
· Creating correlation matrix on dataframe
· Concat or append operation, Merge, join dataframes
· Grouping operation, Pivot tables on Dataframe
· Plots, Bar charts, Pie charts etc for DataFrames
Data manipulation and feature engineering
· Converting categorical variable to numerical
· Normalization and scaling
· Univariate analysis
· Pandas dataframe visualization
· Multivariate analysis
· Correlation matrix
· Pair plot
· Scatter plots
· Find outliers
· Load data
· Normalize data
· Split data into train and test
Machine Learning models and validation·
Linear regression
· Linear regression model accuracy matrices
· Polynomial regression
· Regularization
· Nonlinear regression
· Logistic regression
· Confusion matrix
· Area Under the Curve
· Under-fitting, right-fitting, and over-fitting
· Logistic regression model training and evaluation
· Generalized Linear Model
· Decision tree model
· Support vector machine (SVM) model
· Plotting SVM decision boundaries
· k Nearest Neighbors model
· k-means clustering
Deep Learning·
sklearn perceptron code
· loading MNIST data for training MLP classifier
· sklearn MLP classifier
· Bernoulli RBM with classifier
· grid search with RBM + logistic regression
· Keras MLP
· Compile model
· Train model and evaluate
· dimension reduction using autoencoder
· de-noising using autoencoder
· Keras LSTM
·
Comments welcome
Does this approach make sense? i.e. would we be able to use the ideas of Deliberate practise in learning coding for AI and Machine Learning
Image source: Vanessa Mae – Violin prodigy/ player
Comment
I started DL not with TF/Keras/Pytorch but by directly coding all the arithmetic in Python, starting with this book:
https://makeyourownneuralnetwork.blogspot.com/
It really helped me understand the basics. I took his code, did some variations like an autoencoder, and had a lot of fun learning how all the gears mesh when I turn the crank on an MLP.
Doing TF/Keras/Pytorch is fine when you already have a grasp on what it has to do to follow your high-level instructions. I started programming in machine language, then assembly, then C, sooooo... I prefer a bottom-up approach.
@chris - maths .. not really. its fine to start with coding. if you connect with me on linkedin etc .. shall share as we develop. thanks for your comment
@milton - I shall keep you posted. I am working on it in a group (in London) and then we see how it goes. thanks for your comment
@salil - many thanks
Ajit - your article inspired me to create a GitHub repo where I'll endeavor to research each topic area and develop the code in both R/tidyverse and Python/Pandas.
very interesting, I have many experiences of having died in the attempt, because of lack of time to practice or because I reach a level that I feel is complex. Sometimes I think that applying for a PhD related to Data Science would help me to demand to complete the learning finally, but at the same time I think it is a higher risk of failure. I'm going to apply this method to see how it works.
Very nice article and I have applied the same approach with teaching/tutoring mathematics and other topics and it has always worked extremely well. I am currently new to the field and disciplines within AI and apply this exact approach and so far, I have been learning very quickly and more importantly, developing an understanding.
The positive is the material learning and recall however, it is time consuming however, focusing on areas that are unfamiliar help focus the topics instead of spending time on topics I am familiar with therefore improving time efficiency.
I do have one question for all the "experts" how do you track all of the different algorithms and syntax while working on projects? My question is, will all of the code, syntax, steps, and different libraries become embedded in memory (my memory) or do you keep the common information referenced via a document/notebook/etc?
All that said, I believe being proficient in the fundamentals (including the mathematics) is essential to building upon the knowledge within the field of AI. In other words, as someone new to AI, my advice to others I have spoken with is to learn the math and understand it and also insure that the fundamentals are well understood as they work through data science, machine learning, and into the more advanced topics.
Lastly, actually coding and practicing is paramount, simply reading or following examples is not going to aid in actually learning and applying so, directly related to this article, I tend to target data sets and work through the modeling to achieve the result so that I can prove the modeling is accurate and then work on improving it.
(perspectives from someone entering the field yet, I have extensive experience in other fields which have helped).
Thank you for the article and I look forward to replies on how everyone retains all of the details.
© 2020 Data Science Central ® Powered by
Badges | Report an Issue | Privacy Policy | Terms of Service
Most Popular Content on DSC
To not miss this type of content in the future, subscribe to our newsletter.
Other popular resources
Archives: 2008-2014 | 2015-2016 | 2017-2019 | Book 1 | Book 2 | More
Most popular articles
You need to be a member of Data Science Central to add comments!
Join Data Science Central