Project Goals
Project Goals
This project aims to help students better understand how machine learning systems work. The model will demonstrate the general way that data flows through a machine learning system. Systems using Supervised Learning, Unsupervised Learning and Reinforcement Learning will be considered for modeling, and the final project will aim to show a variety of complexity levels.
The model will be usable by students and educators to help show how machine learning might apply to small sample data sets. The visualization will work with provided "sample" data sets for educational purposes to show how the data's storage and organization change how the machine learning models interpret it. The Wolfram language is going to be used to create the visualizations and run the models all in one location, in real time.
This is an innovative project, as the use of machine learning to teach machine learning is not widely adopted as an educational practice at this time. The models used would be fertile ground for future pedagogical study. The model will be usable by educators and students to help demonstrate the way that machine learning models can be used and manipulated. It would be designed to help them better understand the ethical implications of the design and data modeling choices made in creating machine learning applications.
The model will be usable by students and educators to help show how machine learning might apply to small sample data sets. The visualization will work with provided "sample" data sets for educational purposes to show how the data's storage and organization change how the machine learning models interpret it. The Wolfram language is going to be used to create the visualizations and run the models all in one location, in real time.
This is an innovative project, as the use of machine learning to teach machine learning is not widely adopted as an educational practice at this time. The models used would be fertile ground for future pedagogical study. The model will be usable by educators and students to help demonstrate the way that machine learning models can be used and manipulated. It would be designed to help them better understand the ethical implications of the design and data modeling choices made in creating machine learning applications.
Covered Subject Matters
Covered Subject Matters
The notebooks covers a description of what a neural networks is, how a neuron works, what activation functions are, bias and complexity in neural networks, and the Artificial Neural Network vs. Recurrent Neural Network vs. Convolutional Neural Network. In addition to the descriptions and static diagrams, there are animated and manipulated diagrams and working code examples to illustrate the theoretical concepts.
Examples of Diagrams/Interactive Elements
Examples of Diagrams/Interactive Elements
This input creates a graph with five layers that is designed to visualize how data flows through the CNN.
In[]:=
layerCounts={3,5,5,5,1};graph=GraphUnion@@ MapThread[ IndexGraph,{CompleteGraph/@Partition[layerCounts,2,1], FoldList[Plus,0,layerCounts[[;;-3]]]}];vstyle=Catenate[ Thread/@ Thread[ TakeList[VertexList[graph],layerCounts] ColorData[97]/@Range@Length[layerCounts]]]graph=Graph[ graph, GraphLayout{"MultipartiteEmbedding", "VertexPartition"layerCounts}, GraphStyle"BasicBlack", VertexSize0.5, VertexStylevstyle ]Show[SetProperty[graph,VertexLabels"Nam"],PlotRangeAll]Show[%33,PlotLabelHoldForm[ANN],LabelStyle{FontFamily"Beirut",GrayLevel[0]}]
Out[]=
{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18}
Out[]=
The use of the Animate makes the above diagram to show how data might flow through the CNN.
In[]:=
Animate[HighlightGraph[graph=Graph[graph,GraphLayout{"MultipartiteEmbedding","VertexPartition"layerCounts},GraphStyle"BasicBlack",VertexSize0.5,VertexStylevstyle],{vertex}],{vertex,2,19,3},SaveDefinitionsTrue]
Out[]=
The below in an example of a manipulate function inside of a logistic regression, this is part of a larger description of a logistic regression.
In[]:=
Manipulate[Plot[LogisticSigmoid[x],{x,-4,4},EpilogStyle[Point[{xval,LogisticSigmoid[xval]}],PointSize[Large],Red]],{xval,-4,4},SaveDefinitionsTrue]
Out[]=
The Examples
The Examples
Single Neuron Processing
Single Neuron Processing
This is a n example of a single neuron processing of a normal distribution of numbers between 1,1 and 1-,-1.
centerm1=RandomVariate[NormalDistribution[-1,.25],{10,2}]Out[272]={{-1.1522,-0.73027},{-1.26595,-1.10676},{-1.12496,\-0.876369},{-1.02539,-1.17563},{-0.701867,-0.937443},{-1.01081,\-1.54199},{-1.04634,-0.651635},{-1.47926,-0.829612},{-1.40688,\-0.987403},{-0.970053,-1.01685}}(*Centeredaround(1,1)*)centerp1=RandomVariate[NormalDistribution[1,.25],{10,2}]Out[271]={{0.973252,0.821487},{1.27658,1.47721},{0.597287,1.03868},{0.600453,0.795413},{1.01418,0.987807},{1.37085,0.864169},{0.848844,0.704206},{1.30355,0.778923},{1.01636,0.749378},{1.17738,0.876021}}
Out[]=
{{-1.1522,-0.73027},{-1.26595,-1.10676},{-1.12496,-0.876369},{-1.02539,-1.17563},{-0.701867,-0.937443},{-1.01081,-1.54199},{-1.04634,-0.651635},{-1.47926,-0.829612},{-1.40688,-0.987403},{-0.970053,-1.01685}}
Out[]=
{{0.973252,0.821487},{1.27658,1.47721},{0.597287,1.03868},{0.600453,0.795413},{1.01418,0.987807},{1.37085,0.864169},{0.848844,0.704206},{1.30355,0.778923},{1.01636,0.749378},{1.17738,0.876021}}
Logistic Regression
Logistic Regression
The code below is an example of how a neural network uses the classify function (Logistic Regression) to classify what is a day image sand what is a night image in the Wolfram language.
daynight=Classify
"Night",
"Day",
"Night",
"Night",
"Day",
"Night",
"Day",
"Day",
"Night",
"Night",
"Day",
"Night",
"Night",
"Day",
"Night",
"Night",
"Day",
"Day",
"Day",
"Day",
"Night",
"Night",
"Day",
"Night",
"Night",
"Day",
"Day",
"Day",
"Night",
"Day"daynight
,
,
,
,
,
Basic Recurrence
Basic Recurrence
This is an example of a simple recurrence example, that has a simple recurrent layer with a demonstration of how the layers interact.
Basic Convolution Example
Basic Convolution Example
This is an example of a simple example of a convolution applied to an image. The image is blurred according to the Gaussian Matrix.
Try Understanding The Code for Yourself
Try Understanding The Code for Yourself
View the example below and try to understand what is going on in the code. How does this system work? What is it trying to achieve and how well does it achieve it? Below the code we will discuss it, in case you need some help.
Notes on the Code Above
Notes on the Code Above
As you have likely guessed by now, this system is designed to create a classification of points, blue one and red one. In the initial sections of the code the points are being defined and visualized. After that we use one neuron to free the points and visualize the created points. Finally, In third we take a look at why and how train the neuron.
Now this network is not very good at creating its outpu yet. This is primarily because it has not been trained As the neuron has been randomly initialized it is not as optimized as it should be. We can fix that with the following code.
Now this network is not very good at creating its outpu yet. This is primarily because it has not been trained As the neuron has been randomly initialized it is not as optimized as it should be. We can fix that with the following code.
The Trained Neuron and Your Next Steps
The Trained Neuron and Your Next Steps
With the training, we can see a substantial improvement in the output of the neuron.
Now, its time for you to give it a try, and do your own machine learning. Explore the documentation for creating machine learning in the Wolfram language ( found at https://reference.wolfram.com/language/guide/MachineLearning.html) and design a project of your own to try applying the machine learning tools.
Now, its time for you to give it a try, and do your own machine learning. Explore the documentation for creating machine learning in the Wolfram language ( found at https://reference.wolfram.com/language/guide/MachineLearning.html) and design a project of your own to try applying the machine learning tools.
Concluding Remarks
Concluding Remarks
This pedagogical tool is the first step for future pedagogical research. The aim of the research will be to evaluate the effectiveness of the pedagogical tool in the learning of machine language applications for second year non-computer science students.
Keywords
Keywords
◼
Pedagogy
◼
Machine Learning
◼
Teaching and Learning Tools
Acknowledgment
Acknowledgment
Special thanks to Paul Abbott and Yves Papegay on the education track for their support, perspective and advice as well as to all of the wonderful and wise Teaching Assistants for the summer school program.
References
References
◼
Alessandrini, G. (n.d.). Convolutional Neural Nets in Mathematica. Front End Vision . http://www.frontendvision.net/2018/wp-content/uploads/2018/11/Convolutional-Neural-Nets-in-Mathematica-MMA11.pdf.
◼
Aravind PaiAravind is a sports fanatic. His passion lies in developing data-driven products for the sports domain. He strongly believes that analytics in sports can be a game-changer. (2020, October 19). ANN vs CNN vs RNN: Types of Neural Networks. Analytics Vidhya. https://www.analyticsvidhya.com/blog/2020/02/cnn-vs-rnn-vs-mlp-analyzing-3-types-of-neural-networks-in-deep-learning/.
◼
Grunspan, D. Z., *Address correspondence to: Daniel Z. Grunspan (E-mail Address: dgrunspan@asu.edu).Center for Evolution and Medicine, Kline, M. A., Psychology, D. of, Brownell, S. E., Medicine, C. for E. and, Anderson, Andrews, Auchincloss, Austin, Bedard, Bourdieu, Box, Boyer, Bradforth, Brownell, Cadez, Carroll, Cavalli-Sforza, … Clemmons, A. W. (2018, June 28). The Lecture Machine: A Cultural Evolutionary Model of Pedagogy in Higher Education. CBE-Life Sciences Education. https://www.lifescied.org/doi/full/10.1187/cbe.17-12-0287.
◼
Machine Learning-Wolfram Language Documentation. (n.d.). https://reference.wolfram.com/language/guide/MachineLearning.html.
◼
Machine Learning: The Wolfram Approach. Wolfram. (n.d.). https://www.wolfram.com/featureset/machine-learning/.
◼
A pedagogy of data and Artificial Intelligence for student subjectification. Taylor & Francis. (n.d.). https://www.tandfonline.com/doi/abs/10.1080/13562517.2020.1748593.
◼
The role of bias in Neural Networks. Pico. (n.d.). https://www.pico.net/kb/the-role-of-bias-in-neural-networks.
◼
Tch, A. (2017, August 4). The mostly complete chart of Neural Networks, explained. Medium. https://towardsdatascience.com/the-mostly-complete-chart-of-neural-networks-explained-3fb6f2367464.

