# How Machine Learning is Solving Real-Life Problems

*-This article is a part of the first assignment in the AITS Machine Learning Engineer Internship.*

Instead of boring scenarios, Let's start it in a fun way:

Here’s a simple maths question for you,

if

X=0thenY=-1, ifX=1thenY=1, ifX=2thenY=3

Then what if X=3..?

Yeah !! You guessed it right, that’s Y=5

Now just think if you pc solves every problem in learns from itself from millions of data, Now let's go further, and deal with our real topic of concern i.e Solving Real-Life Problems :

D**eep learning** a part of **Machine Learning** is currently in a great trend in this amazing tech world just usage of this word ignites a developer or a geek explorer. This has mushroomed its popularity over the last few years and almost every new startup wants to deploy these techniques to rage its traditional markets and its benefits. Adding the word AI to a startup pitch can greatly improve the odds of getting funding and has become a modern innovation that has helped man enhance not only many industrial and professional processes but also advances everyday living. The intelligent systems built on machine learning algorithms have the capability to learn from past experience or historical data.

Lots of research is going on today in this field which is trying to solve and simplify the real-life problems to a great extent.

Let’s start with an attention seeker that’s the

Netflix,anytime when you open you have your best-chosen video ride in front of your desk have you figured out why I also how doAmazonprovides you with yourbestitem. In the business is new machinery models are in great demand. To make your business and grow exponentially very fast, there are a lot of other problems in the world that need the scale and touch of these technologies. There are models that can classify whether a person has Cancer or not by taking just skin cells. With just the recording of multiple persons in a room, one can completely extract the voice of any person present in that room isn’t that so cool, there can be trillions of examples on machine learning like detecting spam, medical diagnosis, data entry.

As once he said,

“Computers are able to see, hear and learn. Welcome to the future.”~Dave Waters

Now we can recognize the words spoken in an audio clip or file, and then subsequently convert the audio into a text file. The measurement in this application can be a set of numbers that represent the speech signal. It can also be used in the prediction systems. Considering the **Credit card** example, to compute the probability of a fault, the system will need to classify the available data in groups. It is defined by a set of rules prescribed by the analysts. Making predictions has been one of the best machine learning applications. Lots of fraud transactions have been stopped with this upcoming new field that’s Machine Learning.

Some common usages are :

- Speech Detection
- Fraud Detection
- Detecting Spam
- Product recommendation
- Medical Diagnosis
- Customer segmentation and Lifetime value prediction
- Financial analysis
- Predictive maintenance
- Image recognition

W**ow!! **Finally, if you here then let us go now for a mission, You must have remembered my last question,…? Yeah ! that one which you opted correct answer. We will be building now this.

Let's head over to a simple implementation, to begin or start with so-called Machine learning!!

Let get into a bit deeper and try to explore and perform a small Linear regression model concept in a fun way:

if

X=0thenY=-1, ifX=1thenY=1, ifX=2thenY=3

Then what if X=3..?

Answer: Y=2X-1,Lets now pc think of this without hardcoding

Linear regression is a statistical approach for modeling the relationship between a dependent variable with a given set of independent variables.

It works simply like this:

The linear regression model can be represented by the following equation

It basically works something on this hypothesis:

Y:Predicted value

θ₀: bias term.

θ₁,…,θₙ: model parameters

x₁,x₂,…,xₙ: feature values.

Here’s a sample code for you:

import tensorflow as tfimport numpy as npmodel=tf.keras.Sequential([tf.keras.layers.Dense(units=1,input_shape=[1])])model.compile(optimizer='sgd',loss='mean_squared_error')xs=np.array([-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0],dtype=float)ys=np.array([-3.0,-1.0,1.0,3.0,5.0,7.0,9.0,11.0,13.0],dtype=float)model.fit(xs,ys,epochs=10)print(model.predict([10.0]))

You will get the answer at approximately 18.96.

We have created a one-dimensional array for X and Y with all such values using numpy a very common python library, and a single layer model.

Stochastic Gradient Descent (**SGD**) is a simple yet very efficient approach to discriminative **learning** of linear classifiers under convex loss functions such as (linear) Support Vector **Machines** and Logistic Regression.

An **epoch** is one complete presentation of the data set to be erudite to a **learning machine**. **Learning machines** like feed-forward neural nets that utilize iterative algorithms often need many **epochs** during their **learning** phase.

In a nutshell, we can say that machine learning is an incredible breakthrough in the field of artificial intelligence. And while machine learning has some frightening implications, these machine learning applications are one of the ways through which technology can improve our lives.

By: