Machine Learning

Machine Learning
Professional Certificate Program in Machine Learning & Artificial Intelligence

Wednesday, April 1, 2020

Machine Learning Walk Through 1


Training a Convolutional Neural Network (CNN) to Classify using Virtual Machine 
(Paper presented during the October, 2019 MFNERC Circle of Knowledge and Practices Conference)


 Introduction

Our world is changing in many ways and one of the things which is going to have a huge impact on our future is artificial intelligence – AI.  Computers are already replacing manual labor.

Can it also replace mental labor?

Siri the digital assistant to Apple device is a pseudo intelligent digital personal assistant. Siri has the ability to listen to how we talk, how we ask for things, what we ask for and more and then tailor her results and actions to better fit our needs even if we speak to her in another language. 

Alexa on the other hand, is an AI device of a different nature. This is a device meant to help us in all aspects of our home life. Much like most phone assistants all we have to do to get Alexa to do something is talk to her, however her range is what makes Alexa so valuable. 

Background of the Study

How does a computers learn to recognize objects?  How do we teach machines to see just like we do and thus be able to name objects, identifying people, inferring 3D geometry of things and ultimately understanding relations, emotions, actions and intentions?

Developing neural networks, one of the ways towards teaching machines to learn, results in  an interconnected networks of digital processors that accept inputs, process measurements of the aforementioned inputs towards generating a calculated output. The system learns to identify what kind of output would result from the initial inputs. After which, the machine develops the ability to respond on its own. 


Much like how our brain works.





The brain works with the help of the brain cells which are called neurons. Each neuron communicates by forming networks 
with other neurons among other cells. These neurons are called dendrites and receives signals from other neurons. Dendrites around the cell body receives all signals, adds them all up and forward these signals to axons. The axons will then fire these signals to the next neurons. Information from one neuron flows to another neuron across a small gap at the end of a neuron called a synapse.

http://www.mplsvpn.info/2017/11/what-is-neuron-and-artificial-neuron-in.html

Modified National Institute of Standards and Technology (MNIST)

The MNIST database (Modified National Institute of Standards) is a large database of handwritten digits that is commonly used for training various image processing systems. The database is also widely used for training and testing in the field of machine learning.



Deep learning 101: A Walkthrough Image Classification with TensorFlow Using Google Colaboratory

1. https://www.youtube.com/watch?v=_1pyxSR7dMk
    Note: You Tube Video on how to run the program in Google Colab

2. https://colab.research.google.com/drive/1zZFslX-eXhZ4iBnMoaNnmoBWpJgAdBbf
    Note: This link explain MNIST identifying handwritten numbers.


Read about the documentation for our libraries of interest at these links:

1

#Import libraries of interest
#Tensorflow (with keras), numpy, matplotlib, pandas and other common libraries
#come pre-installed
import tensorflow as tf
from tensorflow import keras
import numpy as np
import matplotlib.pyplot as plt

print(tf.__version__)


2
#Load dataset
fashion_mnist = keras.datasets.fashion_mnist
(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data()


(Run/Download data from https…)

Load the Data Sheet
Fashion MNIST is similar to MNIST (has 10 output categories) but will instead use images of clothing and shoes. It has a total of 70,000 images with of size 28 x 28. Each image is mapped to a single label based on the type of clothing/footwear present in it. The labels are 0, 1, 2 ..., 9. 60,000 images are used for training while 10,000 images are used for testing.
They correspond to 'T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat', 'Sandal', 'Shirt', 'Sneaker', 'Bag' and 'Ankle boot' respectively.
One can directly load and import the dataset from the list of datasets keras offers. It is split into training images and labels, and test images and labels for convenience.

3
#Class names are included to conveniently view them, in addition to the output labels from 0-9
class_names = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat', 'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']

4
#Sanity check to see shape of train_images
train_images.shape

Run/(60000, 28, 28)

The output suggests that there are 60,000 images, each of shape 28 x 28. Since the images are all grayscale, the number of channels for the image does not show. This would be different if we were using color images. (For example, it would be 28 x 28 x 28 for RGB images)
5
#Verify if we have the correct number of labels corresponding to train images
len(train_labels)

Run/6000

6
#View what the labels are for our train images
#Notice that these are numbers and not the names of clothing
train_labels

Run/array([9, 0, 0, ..., 3, 0, 5], dtype=uint8)


https://www.youtube.com/watch?v=aircAruvnKk


<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3258874375499028"
     crossorigin="anonymous"></script>



Sunday, March 22, 2020

Reflections

FRIDAY, FEBRUARY 27, 2009


Reflections

Philosophy

1. Noncoercive Discipline (William Glasser): William Glasser says noncoercive discipline is the best way. This means that teachers should discipline not in a threatening way, but in a way that lets students see why they behaved the way they did. I think this is an important thing for students to realize. They should understand that they are responsible for their behavior and that they can control it. They shouldn’t be punished for it but informed of what they have done wrong, and they should be given time to see what they can do to fix the problem so it doesn’t happen again.
2. Positive Discipline (Jane Nelsen): Positive discipline is done by accepting responsibility and respecting others. Students are not to feel humiliated when they make mistakes but instead should learn from them. Nelsen says that it is important for students to learn these things in order to develop good relationships both in- and outside of school. I feel this is important because this approach teaches life skills that are important for all students to learn. If it can be demonstrated in the classroom, then it will make a major impact on the students’ lives in the future.
3. Positive Classroom (Fred Jones): Having a positive classroom can influence good behavior. Jones believes that both verbal and nonverbal cues, classroom arrangement, and the teacher can all help to create a positive classroom. By doing these things, the students are able to manage behavior and are rewarded for it. I think this is important for students because they should be rewarded for the good things they do. If they are shown proper behavior, then they will continue it. Starting this process early will allow for smooth years both now and in the future.
4. Inner Discipline (Barbara Coloroso): Inner discipline is to use discipline instead of punishment. By using discipline, students can see what they have done wrong instead of just getting in trouble for what was done. Barbara Coloroso believes that students should take responsibility for their decisions. By doing this, they can create an inner discipline to solve their problems. I think this is important because it allows students to see what exactly they have done and what they can do to fix it. It gives them the opportunity to fix the problem themselves instead of having the teacher or someone else solve it for them.
5. Honor Level System (Budd Churchward): Budd Churchward believes in using honor levels for discipline. These levels are 1-no infractions, 2-one-two infractions, 3-three or more infractions, and 4-frequent behavior issues. The students strive to reach the first level, and they keep track of their behavior themselves. After 14 days, the written warnings they receive for their behavior are erased, and they start over with a clean slate. I think this is important for students because it helps those students who constantly misbehave have a second chance in doing the right thing. It helps them to not have that “misbehaving student” label placed on them. I have seen something similar to this done in a classroom, and it has worked out very well. As a future teacher, I can see using the honor level system for my students as a way to get them to start doing the right thing.
6. Cooperative Discipline (Linda Albert): There are four categories of consequences that Linda Albert came up with. These consequences are to be implemented after any discipline problem. The students are to lose a privilege, lose a freedom of interaction, replace or repair a damaged item or help students that have been offended, and relearn appropriate behavior. No matter what the behavior is that occurred, one of these four consequences can be done. I feel as though these are all appropriate, and any student can do them. All students should do these things anyway, but the only way to get them to do it is to push them.
7. Synergetic Discipline (C.M. Charles): In order to maintain a good classroom, Charles believes that these nine things must be present at all times: trust, ethics, charisma, communication, interest, class agreements, coopetition, human relations, and problem resolution. If one of these is missing, then a classroom can not function properly. I completely agree with this idea. All of the things that Charles looks for in a classroom are things that every teacher should look for. These are basic things that can turn into major life skills for students to learn. This idea helps the students to gain respect for one another, and that in itself stops misbehavior. I will definitely be using this idea in my classroom.
8. Positive Discipline (Jane Nelsen): Class meetings are meetings held by the teacher and the class. The teacher starts the meeting, but the students run it. The point is to show the students that they are cared for by everyone, and the meetings help to erase barriers that could hinder good relationships. Class meetings can be very beneficial in a classroom, and I can see myself using them. I think that these meetings will help to ease fears that the students have about class itself or how other students are feeling. As long as the students are able to be open about their feelings, then I think this will help to decrease the behavior problems and the lack of respect for one another in my room.
9. Raising Responsibility (Marvin Marshall): I feel that it is important for students to be responsible for their own behavior. Marvin Marshall identified four levels of social behavior that the students can assess themselves on. These levels are: A-anarchy, B-bullying, C-cooperation, and D-democracy. In level A, the students are noisy or out of control, and in B, the students are breaking the classroom rules. These two levels are considered to be unacceptable. In level C, the students are cooperative and do what is expected of them. In D, they develop self-discipline and are kind to others. These two levels are what the students should always be doing. I can see myself using this in my room to help give my students a self-check on where they are at on the hierarchy for the day. I think that these levels will help them to realize when they are and aren’t displaying appropriate behavior.
10. Positive Classroom (Fred Jones): Classroom rules, according to Fred Jones, can make or break a classroom. He suggests that general rules be broad while specific rules are more for procedures. These need to be practiced at the beginning of the school year and demonstrated by the teacher. I feel as though I will use this strategy in my classroom because I have seen it work in many other classrooms. The students are able to grasp what is expected of them right away, and that will last for the rest of the school year. Using classroom rules will help to manage the classroom as the teacher does not have to constantly remind the students what is expected of them after they have learned the rules themselves.

Reggio Emelia 1 (U of M)

Lessons learned from Reggio Emilia

Youth, as quoted from a very popular phrase is wasted on the young. A remark made in the context entirely from an adult sphere of experience. To be able to see the world again, through the eyes of a child, to be able to make sense of the entirety of human experience through a prism of innocence, what adult will deny himself such an option. A drop of water from the fountain of youth, quenching man’s quest for immortality.

When the world was a swirl of fun and games, when Mickey Mouse and fairies were both real and imagined playmates. When dreams were of French fries and McDonalds, when a day was always a series of moments and unknown expectations; one of joy, one of wonder one of real and imagined fears. An endless array of feelings and sensations lost and diminished on a child, before age and responsibility will finally take over.

A useful lesson of the Reggio Emilia approach is that there is no reason to believe that teachers must choose between encouraging realistic or imaginative visual expression as two mutually exclusive alternatives.

A teacher, to be able to have a grasp of flows and ebbs of a child thoughts must have on his/her disposable not just the patience but also the materials of the visual graphic utilized as a medium of a child languages For so many years, I have thought and practice the idea of kids doing graphic and visual works as nothing more than a cognitive and psychomotor exercises. I would-more often than not- make an assessment on the quality of work based on aesthetics. Appreciation of colors, some gained expertise on the use of materials associated with arts work but never as a tool for reading the child’s thoughts and his perception of the world around him/her. This might not be a novel idea on the approaches made so far by the teachers of Reggio Emilia, but it is to me.

Today’s child is perceived as a rare and precious object.

The child might end up as the president of his country, a priest of his church, a pilot of his plane, a teacher to her student, a father to his son or a mentor to his ward. His presence eventually causing great influences both to his life and to the people close to him. With this in mind, Reggio Emilia’s approach towards the raising of the child was not only fitting but would be the most appropriate.

Mainstream practice of teaching a child mainly relies on the expertise of the teacher and the quality of the curriculum that encompasses the teaching learning continuum. The early years of parents’ participation in the Reggio Emilia’s ‘experience’ was mainly influenced by the ideologies and ideals of the past. Nowadays, the people involve in this approach recognizes that these influences had changed and parents participation are now governed by opportunities for personal growth. The very thought of the system recognizing such change of influences on the part of the parents’ participation in the triad gave it more resilience and thus, identifies its’ strength in terms of the approach of the ‘project’s’ enthusiasm and sustainability.

The parents role in this triad is and was never considered as an intrusion, rather it was taken as a positive contribution to the thesis that ‘ the kinds of participation and cooperation that gives the best results are those that accommodate and welcome many different personal contributions’.


atmansilla08
university of manitoba

The Emerging Curriculum: A Reflection

SUNDAY, MARCH 8, 2009

The Emerging Curriculum: A Reflection

The Emerging Curriculum: A Reflection
Curriculum... is not a concept; it is a cultural construction. That is, it is not an abstract concept which has some existence outside and prior to human experience. Rather, it is a way of organizing a set of human educational practices (Grundy 1987). For so many years that I have been involved in the teaching profession this has been my concept of what a curriculum is. It is alive, it is evolving, but only in a sense that changes is injected to it on a regular basis based on what is current in terms of technology and whatever teaching techniques and method is new on the educational scene. Specialist, meaning curriculum specialist and consultant, subjects and technical experts and teachers were involved in the design, upgrade or in enriching a curriculum. It is plan and it is intentional. Ideas were pre-conceived and pre-determined. A blue print for activities.
A curriculum involves formal intentions, that is, intentions deliberately chosen to promote learning. A curriculum articulates the relationships among its different elements (objectives, content, evaluation, etc.), integrating them into a unified and coherent whole
(David Pratt 1980).

A seminar-workshop would initially be set up to answer a need to enrich a curriculum, participants will be identified, all of them professional educators in one way or another. Consultation, a lot of readings, some revisions, and eventually we have a newly designed or an enriched curriculum. Of which, lesson plans will be based. A cut-and-dried plan.

Contrast this to how a Reggio Emilia inspired curriculum would normally evolve;

• A teacher taking note, valuing an identified interest as an opportunity to understand more about the children.

• Establishment of community of small group whose primary aim is to open up and assess the children’s knowledge and interest. Collaboration between adults-parents, teachers, atelierista and pedagogoista.The purpose; discussions of various possibilities, hypothesis and potential directions that an identified project might take.


• The teacher organizing and galvanizing each child to participate and to grow, within the context of a group investigation. The child is a part, an essential part, but only a part. Encouraging discussion among the children by asking a series of open-ended questions that the parents had help formulate.

• Documenting the discussions and succeeding activities. Taking note of the cognitive taking place. Assessing if genuine interest is present for a deeper sense of inquiry to sustain continued interest the activity. Having in mind-during this phase of assessing, not the child’s acquired knowledge but his construction of knowledge and knowing all too well that the involvement of a adult legitimizes the child’s knowledge and curiosity.


• Posing a challenge to the children. ‘Would the children want to do it?’ ‘Could they do it? Measuring the degree of motivation on the part of the children. Assessing the children’s individual capacity to react to a challenge in an effort to the cognitive learning process in the group.

• The teacher actively guiding and shaping, but not controlling the discussion and flow of how the project is going into. Taking note of the depth of inquiry the children had gone into to meet the posed challenge.

• The re-reading of the experience and the transfer of the children’s acquired knowledge. The exercise, clarifying and consolidating the knowledge gain from their work.


For so many years I have worked with students whose sense of achievement was invariably twined to the idea of competition. A concept made possible by the cut and dried plans and intentions identified in the design of a linear and rigid curriculum. A child’s presence in the classroom is perceived to serve two singular purpose, that of competing and succeeding while gaining knowledge.

In my talk with a number of individuals who had been – in one way or another- exposed to the current character of student’s present on the aboriginal reserve I have been made to understand that motivation to acquire knowledge is a bit below the national average and knowledge construction and depth of knowledge acquisition is quite marginalized. I have also, just recently come to a realization that my two decades of classroom instruction is not enough to overcome the aforementioned challenges. And that I would need an approach that would require me to explore and go a bit deeper into a child’s psyche to be able to reach out, to be able to motivate if not to provoke or cause encouragement to do an inquiry and go into an exploration of a subject that is of interest to him/her.

What type of provocation would I pose? How would the type of medium (language) affect the quality a child’s response to a provocation. How would I pose the provocation. What kind of inquiry would tickle or provoke the minds of children who were made to lead a life that is next to hopelessness and who had very little idea of what prosperity means.

The idea of having to design an emerging and working curriculum through observation talk and discussion and collaboration with children, parents, and other community stakeholder to overcome the challenges that had beguiled me had intrigued me to no end.

atmansilla
university of manitoba



Developing Critical Consciousness


Sunday, April 12, 2009

“So, “said one of my grade 7 kid “you’re not a Christian anymore?”. He said that when I told him to go the lake, take a swim and not come back. The kid can't read, he had a very thick incident report starting when he was still in grade one and he was suspended for a week the year before I came. The very same week he was supposed to go to Red River to present his Science Fair Project. It was my own Carol Collins 'aha'.I thought I was prepared for any kind of teaching I have 22 years of teaching adolescent kids in the Philippines, an undergraduate degree, a graduate degree, and post graduate courses. And I have handled all type of students, rich, poor, very poor, brilliant, not so brilliant, fast learners, slow learners. I was found wrong. I was not prepared for these kids raised on the reserve.

My early thoughts were that these kids were just irresponsible kids who should have known better. They just need a figure of authority, a father figure since almost 75 % of them were leaving with poster parents or were being raised by a single Mom. Again I was found wrong. Unfortunately they have a very poor response to authority.

There are three stages to critical consciousness, said Freire as quoted by Collins; the semi intransitive, which is purely survival and 'magical acceptance', the transitive stage, the naive transitivity where problems were simplified and a wish for 'what it was solution' was highly regarded and proffered, and the critically transitive consciousness, Whereby one's 'findings' were tested and by openness to revision. By refusing to transfer responsibility and by rejecting passive positions. Which is one way of saying changing things that I can change and accepting those things that I cannot. Which is not really saying surrendering and/or joining. And the critical thread that connects these three and thereby making these three levels of consciousness a stage and not three separate level, the praxis, a cycle of action-reflection – action, which is central to Freire's concept of conscientization.

The first time the whole class was so unruly, when everybody is talking at the same time cursing and swearing and laughing I yelled at them. I was so disappointed, so depressed and so distraught. Three months later I’m not yelling at them anymore, I am merely raising my voice to get their attention and they were not laughing anymore, just a little smile but the cursing and the swearing had marginally decreased. Its either they change or my perception of them had change. I did know something for sure, I changed. I would look at them and see my 20 year old girl when she was 14 and I would listen to them and minus the swearing and cursing I am hearing my nine year old boy. It’s the praxis working on me, I think, action-reflection-action.

How would this affect the changes on my logic model? It would, I believe focus on my total attitude towards the design of the program. The program would be touching the lives of those who will be implementing it and those who will be its recipients. It’s not a static kind of thing wherein every input necessarily translates to an output. The interplay and interactions would be dynamic and in the design of the program the play of all the stakeholders would have to be taken into account.