Data Science, Machine Learning and the musings.
By: Ruhi Tyagi
Tags: Deep Learning, Artificial Intelligence, Python, Data Science, Machine Learning

When it comes to career selection and following its pursuit, one seldom makes head or tail of it. The following articles consists a brief discussion of several questions regarding data science and machine learning which are residing in minds of many who are about embark a new career in it or are just curious about it. Let’s clear the air, and see how they are the “Sexiest jobs of 21st century” .

1. Why one should learn Data Science and Machine Learning?

As per sources, about a whopping 2.5 Quintilian (2,500,000,000,000,000,000) bytes of data is produced every day, which if stacked, can be equal to 4 Eiffel Towers. Every organization in the world, uses various strategies, tools, and professionals to make sense of this huge amount of data — Big data, but there are not enough sources to convert data into useful insights nor there are skilled professionals for it.

Now, when it comes to pursuing a career in data science there are various positives to this like the pay, as per Glassdoor, a data scientist earns $ 171,345/year which is approximately 163% more than the national average salary. Additionally, there is no restriction on educational background i.e. apart from computer engineers, and statisticians, professionals from mechanical, electronic, electric, and even management realms can find a job in data science. However, the data scientist role requires a lot of skill, and experience for a lucrative wage, not everyone can get it in one go. But, other positions like data analyst, business analyst, business intelligence analyst, data architect, data engineer, and many more have been here which in the future can lead up to a data scientist position.

Apart from the skills required and years of experience, recruiters are now looking onto some qualities in a person like, how curious one is? how judgmental one is? how good story-teller one is?. Many leading professionals have confessed that if a candidate is curious, judgmental, and a story-teller with less coding experience, they will still select that candidate over the one having great coding skills but no interest in data. Therefore, the doors are open for people even if they posses less polished skills.

As discussed before, data scientist uses ‘TOOLS’ to sieve information from the humongous data,so what are those tools? That is when Machine Learning comes into the picture. In old days, people stored data as a tally or tick marks, and an abacus was invented to analyze the same, however, this cannot be applied to the current scenario. The machine learning realm has various algorithms that extract data, collect data, and glean insights from data as well as prepare models which once created can be used for a longer time to perform the above functions. Therefore, the process is automatized. Furthermore, prospective Data Scientists can specialize in Machine Learning and become more desirable for employers. The average salary of a Machine Learning engineer in the US is $ 114,961/year as well as requires command over Math, Algebra, and Statistics (not a PhD in Maths or Statistics) with comprehensive machine learning basics.

With the increment in data, the demand for data specialists has augmented. Amidst that, a 2011 McKinsey research on Big data illustrates that “the United States alone face a shortage of 140,000–190,000 people with analytical expertise”, which conveys a great opportunity to students and other professionals to follow this field. Moreover, both occupations have widespread applications in almost every field viz. healthcare organizations use data to monitor patient health charts, military forces employ them to monitor the defense army, store managers utilize the customer data to tailor discounts and many more.

To conclude, data rules the future world, and learning these skills can make the world a better place collectively, and individually as they do not necessarily require expertise to enter the field. Also, using the untapped opportunities can help build a better career prospect with a high living standard.

2. Is it possible for non-technical candidates to enter into the field of Data Science & Machine Learning? If YES, how and NO, why?

Parents spend a significant amount of money in technical education, expecting a bright future of their child. To be honest, it is hard to grab a good job and survive in it for employees from non-technical backgrounds and cannot use their talent in technical field. Although the stereotypes are set by the recruiters around the globe, things have taken a turn nowadays. So, YES! a non-technical person can pursue a successful career in either data science or machine learning. Even there are success stories of a plethora of IT startups owned and created by people from a non-technical background. So, we can say Sky is not the limit. How? Let’s unravel!

With overwhelming information on the internet and advice from co-workers, the turmoil is guaranteed and the mind surely hits the wall. Anyway, there are numerous ways one can make it into this industry. Firstly, the MOOCs (Massive Open Online Courses) have seen significant growth since 2012 and during the pandemic, it has boosted exponentially. Many esteemed universities like Harvard, Stanford have partnered with these MOOCs, presenting state-of-the-art course modules, hands-on labs, and assignments. On top of it, many courses do not even require technical backgrounds, therefore taking online courses can help boost confidence and skills to fill the gaps. One of the best online sites to learn are Coursera, Udacity, Udemy, Swayam to name a few.

Secondly and most popularly renowned source, YouTube. Although technical videos are scarce on YouTube, the trend has seen rapid growth over the last few years and the best part is they are free! Most of the online courses are paid or require fees to generate certifications but YouTube is the best source to learn at no cost. Adding to it, there are countless YouTube channels to learn about data science and machine learning like Kaggle, Data School, Crash Course, Tensorflow, and many more.

Furthermore, there is one of the oldest and impeccable source to learn skills from, i.e. books. There are lots of books for absolute beginners or “dummies” viz. “Machine Learning for Dummies” by John Paul Mueller and Luca Massaron, “Introduction to Computation and Programming using Python” by John V. Guttag, “Data Science from Scratch: First principle with Python” by Joel Grus, “Algorithm in a nutshell” by George T. Heineman, Gary Police and Stanley Selkow which are available in paperback as well as e-book versions.

Apart from these, applying knowledge practically is the best way to expertise in a field. One can take part in various online competitions hosted by websites: CodeChef, Google, GeeksforGeeks, and others. Taking part in such contest is an ideal attempt to figure out one’s weakness and strength which helps channel energy and focus in the right direction saving from burnout and loss of motivation.

Ultimately, be part of coding communities. The bitter truth of being a technician is that learning never ends, so have to keep a learn-it-all attitude instead of know-it-all. These communities help beginners upgrade their skill set, host various technical events, help solve technical errors, increase networking and awareness about the technology. Some of the well-known ones are StackOverflow, GitHub, Reddit, Quora, and Hacker News. Even there are certain communities specifically created for women in technology.

3. What are applications of Data Science and Machine Learning in businesses?

Almost every section of business: marketing, sales, feedback, service care, employ data science and machine learning to elevate business sales and opportunities.

To initiate with data science, in a multitude of ways data science aids to make better decisions employing business intelligence. Formerly, business intelligence was static but data science made it more dynamic. With big data available to multi-national companies, they take the help of data scientists to analyze the data and gain knowledge for needed strategies. The gist of the process can be explained as follows:

Business understanding — Understand the context and nature of the problem from the stakeholders which guides the further process. Analytic approach — Based on the type of issue stated, a descriptive, diagnostic, predictive, or prescriptive approach is followed. Data understanding & collection — The data is collected from various sources, prepared, transformed, and visualized to understand it more. Building models — The data and algorithm selected are then trained, scored, and evaluated through several iterations and finally deployed to the stakeholders.

The above process is analogous for machine learning too.

Many business firms use the analyzed data for understanding customer shopping patterns and easy handling during peak hours. For instance, data science assists Walmart in interpreting customer behavior that helps them to stock products in demand along with the ones for the future. Walmart has also tailored checkouts based on each stores, that is either a self-checkout or facilitated checkout. Moreover, based on shopping cart analysis, they curate discounts and offers, organize shelves and recommend products to enhance shopping experience.

Due to globalization, there are customers from several parts of the globe, and handling queries and feedback of naive level disrupts the overall experience for consumers as well as service provides. Therefore, with the help of machine learning, chatbots are integrated into the systems which can handle first wave questions aiding in customer support allowing the company to solve serious problems requiring immediate attention.

One of the classical machine learning applications in the commercial sector is anomaly detection that is diagnosing fraudulent transactions. This strategy is widely applied in manufacturing to intensify productivity and efficiency, reduce costs, and optimize downtime. The procedure of collecting and analyzing data is followed by installing sensors into the system. Machine learning models process this information to find anomalous entities and analyze them to prevent further issues and damage to the system environment. Similarly, these models aid in credit card fraud, medical diagnosis, cyber-security, and many others.

One of the typical utilization of machine learning and data science which is now ubiquitous on websites is recommending engines. To be more precise, while browsing through Netflix, it is hard not to notice how it has designed its home page where one can see strips of shows that are in the top 10 and recommended shows based on the watching history of the user. One might wonder, how are Netflix shows always a blockbuster? Well, analyzing the data helps them sniff the success of every show even before it is released.

There are diverse practices of data science and machine learning residing in almost every step of business which over time has built a stronger understanding of the market, stock prices, customer behavior, and potential threats to the same.

4. What is Deep Learning? Elucidate its sub-categories.

For many years, Artificial Intelligence stirred excitement but experienced AI winter even after Machine Learning arrived. Surprisingly, Deep Learning neural networks made a breakthrough and powered through the whole AI field bringing AI spring.

Deep learning is the subset of machine learning which is a part of artificial intelligence based on artificial neural networks with representational learning. In simple words, a deep learning neural network mimics the working of the human mind but not exactly. To mention a difference, an artificial neural network is static and symbolic while a biological brain in dynamic and analog.

Around the 1950s, the concept of machine learning was coined by Alan Turing, a British mathematician and computer scientist, when he predicted the human brain like supercomputers will be invented and later in the mid-1960s the idea was realized when Soviet mathematicians Ivakhnenko-Lapa created compact functional neural networks. Since then a lot of discoveries have been made and deep learning networks have found a place in various fields.

Remember, all deep learning algorithms are machine learning algorithms but not all machine learning algorithms are deep learning algorithms. Deep learning models are trained using considerable labeled data for high complexity problems requiring high computational power, producing accurate results. On the downside, the trained data is hard to explain and they are expensive.

In deep learning, algorithms are prepared which perform classification tasks on images, texts, and sound. Deep learning is the backbone of self-driving cars, enabling them to differentiate a person and lamp-post or recognize the stop sign. Furthermore, in devices like phones, tablets, TVs, and speakers neural networks support voice command and control.

The adjective “deep” signifies the use of multiple hidden layers in the network where there is an input layer, several hidden layers, and an output layer. A conventional neural network has 3–5 hidden layers but a deep network has as many as 150. Using the labeled data, they extract features without manual intervention. One of the most popular neural networks is Convolution Neural Network (CNN) which is suitable for processing 2D data such as images.

Deep learning is sub-categorized based on architectures which are emphasized in the following text:

Generative — They focus on pre-training a layer using an unsupervised learning approach, which is later included in the model for further training and fine-tuning. This eliminates the difficulty of training lower level architectures.

Discriminative — They process and stack the output of each layer with original information.

Hybrid deep learning — Hybrid deep learning models combine the working of both generative and discriminative.

Additionally, deep learning tools have become an adjunct tool in the automatic medical diagnosis of several diseases like the detection of arrhythmia, breast cancer, pneumonia, and the classification of skin cancers and brain diseases. Similarly, deep learning models have aided in learning large DNA/RNA sequences and fast-track diagnosis of COVID-19 form X-rays images with the help of a special COVIDX-Net Model comprising seven CNN models. In conclusion, deep learning has generated accurate and high complexity results exceeding human thinking and has been making avant-garde revelations from the aggregated data over time.

5. What is Object Oriented Programming in Python? Described with illustrations.

Object-Oriented Programming (OOP) is a programming paradigm which organizes software design around objects rather than logic or function. in general, object-oriented programming consists of objects consisting of corresponding data structures and the required procedures, thus following a bottom-up problem-solving approach. It is mainly focused on data, not procedures.

An object has two characteristics:

Attributes

Behavior

For illustration, suppose human as an object then,

attributes — name, age, gender, weight

behavior — walking, crying, running

Python is a multi-purpose programming language that focuses on the DRY (Don’t Repeat Yourself) concept thus producing reusable code. Python follows certain object-oriented programming principles mentioned as follows:

Class

In general, class is a blueprint for the object which is used to make user-defined functions. For example, a class is a sketch of human with labels on it. Class creates a method, containing the behavior and properties which object created from the class can perform with its data.

Let’s define a Human as a class:

#Note: Always capitalize the first letter of class name.

class Human:

pass

Here,by using the keyword “class” we prepared an empty class, “Human”. The keyword “pass” is a placeholder indicating where the rest of the code will be placed and this python code runs without any error. The class is used make instances, which is an object containing real data such as name, age or breed.

Object

An object is created by instantiation of class and memory is allocated to it. To instantiate an object write the name of class “human” followed by opening and closing parentheses ().

Human()

One can create two objects with same name but they are not equal as they represent different memory locations.

Creating a class and object in python:

class Human:



#class attributes

species = "homo sapiens" #instance attributes

def __init__(self, name, age):

self.name = name

self.age = age #instantiating Human class

monica = Human("Monica", 25)

rachel = Human("Rachel", 27) #access class attributes

print("Monica is a human / {}.".format(monica.__class__.species)

print("Rachel is a human / {}.".format(rachel.__class__.species) #access instance attributes

print("{} is {} year(s) old.".format(monica.name, monica.age)

print("{} is {} year(s) old.".format(rachel.name, rachel.age)

Output:

Monica is a human / homo sapiens.

Rachel is a human / homo sapiens.

Monica is 25 year(s) old.

Rachel is 25 year(s) old.

In the above program, a class is created called, “Human” with its attribute “species”.

Next, attributes are defined inside the “init” method of that class.

Then, instances of “Human” class are created and “monica” and “rachel” are the value/references to our new objects.

To access class attributes type, __class__species. Class instances are same for all the objects of the class. In the same way, to access instance attributes type, monica.name and monica.age. However, instance attributes are specific to each instance/object of the class.

Methods

Methods are the functions defined inside the body of the class representing the behavior of an object. Now, unlike Java, Python can have function outside the class.

Define a function:

def eat(self, food):

return food

Creating methods in Python:

class Human:



#class attributes

species = "homo sapiens" #instance attributes

def __init__(self, name, age):

self.name = name

self.age = age #instance methods

def eat(self, food):

return "{} loves {}.".format(self.name, food) def live(self, city):

return "{} lives in {}.".format(self.name, city) #instantiating Human class

monica = Human("Monica", 25)

rachel = Human("Rachel", 27) #calling instance methods

print(monica.eat("Lasagna")

print(rachel.eat("Pizza")

print(monica.live("New York")

print(rachel.live("Newark")

Output:

Monica loves Lasagna.

Rachel loves Pizza.

Monica lives in New York.

Rachel lives in Newark.

In the above program, two instance methods are defined: eat() and live(). They are called instance methods as they are called on the instances of the class.

Inheritance

Inheritance allows a new class to use propertied of existing class without manipulating them. Thus, the new class is called derived or child class while the existing one is called base or parent class.

Illustration of inheritance in python:

#Base or Parent Class

class Human:



def __init__(self):

print("I am Human")

def species(self):

print("Homo Sapiens")

def exc(self):

print("Exercises daily!") #Derived or Child Class

class Monica(Human):



def __init__(self):

#call super() function

super().__init__()

print("I am Monica")

def species(self):

print("Human Being")

def cook(self):

print("Cooks lovely!") monica = Monica()

monica.species()

monica.exc()

monica.cook()

Output:

I am Human

I am Monica

Human Being

Exercises daily!

Cooks lovely!

In the above program, two classes are created: Human and Monica, where (Monica) child inherits functions of (Human)parent class. This is demonstrated from exc().

Again, child class modified behavior of parent in species() method which is known as Overriding. While, child class extended parent by creating a new cook() method.

Finally, super() function is used inside the __init__() method to allow the running of the parent class inside the child class.

Encapsulation

Employing OOP in python, the access to methods and variables can be restricted, preventing data from direct modification. This is known as encapsulation. In python, we denote private attributes using underscore as the prefix.( ‘_’ or ‘__’)

Illustrating encapsulation in Python:

class Food: def __init__(self):

self.__cost = 10

def cuisine(self):

print(" Tropical -> {}".format(self.__cost)

def setNewCost(self,price):

self.__cost = price f = Food()

f.cuisine() #change the cost

f.__cost = 20

f.cuisine() #using setter function

f.setNewCost(20)

f.cuisine()

Output:

Tropical -> 10

Tropical -> 10

Tropical -> 20

In the above program, a Food class is defined and __init__() method is used to store cost of food.

Even after trying to modify the cost, it did not change in 2nd line of output because python treats __cost as a private attribute.

Therefore, to change the value, setter function, setNewCost() is used, taking price as parameter.

Polymorphism

“Poly” means many. Polymorphism allows to use a common interface for multiple data types. Suppose we need to color a shape and there are various shapes (square, circle, rectangle). Same method can be used to color all shapes via polymorphism.

Illustrating polymorphism in Python:

class square:



def corner(self):

print("Square has 4 corners") class circle: def corner(self):

print("Circle has no corners") #common interface

def corner_test(shape):

shape.corner() #instantiate objects

s = square()

c = circle() #passing the objects

corner_test(s)

corner_test(c)

Output:

Square has 4 corners

Circle has no corners

In the above program, two classes are defined : Square and Circle, each having common corner() method. But they act as different functions.

To use polymorphism, a common interface corner_test() is created that takes any object and calls the object’s corner() method. Thus, passed c and s in corner_test() function, which ran effectively.