Workshop on Machine Learning with Python

A workshop on Machine Learning was organized by the Department of ISE, CMRIT, in our campus on 25th February, 2017. The main objective of the Workshop was to spread knowledge on Machine learning and how we can implement it to solve problems that are of a higher complexity in our lives.

The program was conducted by Jnaapti, a startup that works towards spreading knowledge and awareness to the people about technology and also other qualities like ethics and professionalism. Mrs. Megha Sharma, Asst. Professor, ISE-CMRIT invited Mr. Abraar Syed, an alumni of the college, on the 18th February, 2017. The agenda was to conduct a talk for the students which would give them an insight of the life in the Software Industry and the path toward one’s goal as a successful software engineer.

He spoke to the students of 4th Semester, ISE, gave inputs and his insight on the industry and what the higher-ups in the industry expect from freshers who are bound for jobs in their companies. He then went on to talk about Jnaapti and how this team helps out students and other such members learn and give them knowledge that is required in the industry today. The talk briefed about what Jnaapti does, what principles it works on and about the workshop in general. The Students were very enthused and showed keen interest in the workshop. This in turn gave birth to an opportunity to conduct the workshop.

About The Workshop:

The Workshop was attended by a number of students, mostly belonging to the ISE and CSE department and a few from other departments as well, who were interested in the event. The workshop started off with the team talking to the students about their organization and giving an insight on how these workshops have helped students as well as professionals achieve their goals. They motivated students every moment, to develop passion for learning.

  • Gautham says ‘Be a kid’ always, as kids are curious to know and question everything without any hesitation.
  • Gautham says when you want to learn swimming there are two ways, one is sitting in classroom studying how to swim and writing a test on it. Another way is just jump into the pool and learn, this is where you come out of comfort zone. So, if want you want to learn something you should come out of comfort zone.

IMG-20170419-WA0004

They then moved on ahead with a brief introduction on programming and few concepts that will be helpful in understanding the main concept at hand. As the session progressed, students were given a hands on interactive session with python programming, from basic coding to data structures and more complex coding like classes and objects., etc.

Basic constructs: These are used to control the order in which statements are executed.

PROGRAMMING PARADIGMS:

Programming paradigms are a way to classify programming languages according to the style of computer programming.

Common programming paradigms include:

  • Object Oriented
  • Functional
  • Aspect Oriented
  • Imperative
  • Declarative
  • Logic and Symbolic

what are the differences between Static Typing and Dynamic Typing?

STATIC TYPING VS DYNAMIC TYPING:

Static Typing                       Dynamic Typing
o   Statically-typed languages perform type checking at compile time.

o   Statically-typed languages require to declare the datatypes of variables before using them.

o   C, C++, Java are statically-typed languages.

 

o   Dynamically-typed languages perform type checking at run time.

o   Dynamically-typed languages do not need declaration of variable datatypes before using them.

o   Python is a dynamically-typed language.

INTRODUCTION TO PYTHON:

Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed to be highly readable. It uses English keywords frequently where as other languages use punctuation, and it has fewer syntactical constructions than other languages.

  • Python is Interpreted
  • Python is Interactive
  • Python is Object-Oriented
  • Python is Beginner’s Language

BASIC SYNTAX:

Basically, data type represents the type of value and determines how the value can be used in a python program. Since all the data values are encapsulated in relevant object classes.

# Python Data Types – Example Program

i=10

print(type(i))

f=324.423

print(type(f))

b=True

print(type(b))

str=”Python Data Types”

print(type(str))

 

#sample output of above program

<type ‘int’>

<type ‘float’>

<type ‘bool’>

<type ‘str’>

LOOPING: Loops in Python are used to control your program. Loops are basically used to execute a block of code several number of times accordingly.

Python decision making – example program:

def fib(n):

if(n==0):

return 0

elif(n==1):

return 1

else:

return fib(n-1) + fib(n-2)

Lists:

For lists: l = [ ]

i/p: l.append(10)

i/p: l.append(20)

o/p: [10,20]

 

Python loop -example program:

Write a program that prints the numbers from 1 to 100. But for multiples of three print Fast instead of the number and for the multiples of seven print Car. For numbers, which are multiples of both three and seven print FastCar.

def FastCar():

       for i in range(1,101):

              if(i%3==0 and i%7==0):

                     print’FastCar’

elif(i%3==0):

                     print’Fast’

              elif(i%7==0):

print’Car’

              else:

print i

FastCar()

IMG-20170419-WA0002

IMG-20170419-WA0003

The students later on given a demonstration on how to install the software required to work on python and machine learning, and were given the necessary lines of code to install it. Assistance was given to the students in installing the software by the volunteers of the event.

IMG-20170419-WA0006

Then after lunch, the session continued, and now a gist of what machine learning is, was given to the students and few examples were given, in real world, to show how it is implemented to solve problems in which large data and real time analysis is required. At the end, a few demonstrations were given on machine learning programs and artificial intelligence. Throughout the event, students were asked a lot of questions, tasks were given to them and problems to solve, both individually and as a group.

  1. Artificial intelligence and Automation:

Artificial intelligence is intelligence exhibited by machines. One of the best examples of this is Apple’s framework for home automation called HomeKit. It controls, lighting, Locks, Sensors, Switches and Shades using smart accessories. Smart accessories communicate with each other via voice commands given to it by Siri.

Siri is an intelligent assistant, which works by processing the voice commands, which includes phrases like “turn off the lights” or “set the temperature to 68 degrees F”. If you set up homes, rooms, zones, or scenes (more on that later), you can use commands like “movie time”

If you don’t want to use Siri voice commands all the time, you can set up your accessories to respond to other triggers, such as your location, the time, or other accessory. So, for location, you can set your garage door to open when you pull up. With time, you can have your coffee pot come on at 6 am IST, and with the accessory, you could use a motion sensor to detect when you walk into a dark hallway and turn on the lights.

  1. Pattern recognition:Pattern recognition focuses on regularities in data. The algorithm aims to provide a reasonable answer for all possible inputs, and gives us the “most likely” match with pre-existing patterns. It basically takes a lot of inputs at the development stage to teach itself the patterns and output is given according to the nearest attach found. These algorithms go wrong if enough data is not fed to the system or if all the features of the patterns are not included.

Example: The weight of Watermelon is generally between 1200g-1700g and they are green inside and the weight of Papaya is generally between 800g-1150g and they are green in color and so on for other fruits. If these data are fed to the system and the output for (1300, Green) is Watermelon. This is how the Face recognition works. The features of the Face are stored in a Matrix and enough number of faces are provided to differentiate between the faces by noticing minute features.

  1. YouTube recommendations:

3.1 In the first neural network the user’s watch history is given as input to the system and using collaborative filtering it selects the video in the range of hundreds. This model uses the implicit feedback of video watches by user to train the model. Explicit feedback such as a thumbs up or a thumbs down of a video are in general are given less preference as compared to implicit feedbacks. To accelerate the training, newly uploaded videos, the age of each training example and even the most watched videos are fed.

3.2 The second neural network is used in Ranking the few hundreds of videos in order. This is simple as the information about each one video and its relationship with the user is already available in the database. The system uses logistic regression to rank each video. The metric used here is expected watch time, which increases the number of advertisements. The system uses weighted variance of logistics regression to watch them, for every watch which is greater than the watch time a positive interaction a unit weight is added and similarly a unit weight is removed from the opposite.

 

Overall, the students enjoyed the event, and very happy that they were able to learn something new, get to work with it and were given guidance to work on the foundation that they established at the event.

IMG-20170419-WA0008

 

 

 

 

 

Leave a comment