Skip to main content

A quick introduction to AI and ML


Artificial intelligence (AI) is a branch of computer science. Its main goal is to create smart machines that can learn on their own and are capable of thinking like humans.

The term 'artificial intelligence' commonly applies to devices or applications capable of carrying out specific tasks in human ways, by mimicking cognitive functions such as:
learning
reasoning
problem-solving
visual perception
language-understanding

There are two main types of AI:

  • Applied AI - is more common and includes systems designed to intelligently carry out a single task, example: move a driverless vehicle. This category is also known as 'weak' or 'narrow' AI.
  • Generalized AI - is less common and includes systems or devices that can theoretically handle any task, as they carry enough intelligence to find solutions to unfamiliar problems. Generalized AI is also known as 'strong' AI. Examples of true strong AI don't currently exist, as these technologies are still in very early stages of development.


Machine learning (ML)
Most modern AI applications are enabled through a discipline known as 'machine learning'.  ML is a core part of AI. It is based around the idea that machines can detect patterns in data and adjust their program actions according to these patterns.
For example, ML applications can:
read a text and decide if the author is making a complaint or a purchase order
listen to a piece of music and find other tunes to match the mood
recognize images and classify them according to the elements they contain
translate large volumes of text in real time
accurately recognize faces, speech and objects

In the most basic terms, ML enables computers to learn without being explicitly programmed.



The goal of Machine Learning
The goal of ML is  to make guesses that are good enough to be useful. Machine Learning builds heavily on statistics.  When we train machine to learn, we have to give it a significant random sample as training data. If the training set is not random, we run the risk of the machine learning patterns that aren’t actually there. And if the training set is too small , we won’t learn enough and may even reach inaccurate conclusions.
  • Supervised machine learning: The program is “trained” on a pre-defined set of “training examples”, which then facilitate its ability to reach an 'accurate' conclusion when given new data.
  • Unsupervised machine learning: The program is given a bunch of data and must find patterns and relationships.
  • Reinforcement learning is an important type of Machine Learning where an agent learn how to behave in a environment by performing actions and seeing the results.
Now let us look at some of the Machine learning Algorithms:
  • Linear Regression
  • Logistic Regression
  • Support Vector Machines
  • Random Forest
  • etc.
Now let us look at how are AI and machine learning used in business.  Over the years, AI research has enabled many technological advances, including:
  • Virtual agents and Chatbots
  • Suggestive web searches
  • Targeted advertising
  • Pattern recognition
  • Predictive analytics
  • Voice and speech recognition
  • Face recognition
  • Machine translation
  • Autonomous driving
  • Automatic scheduling
  • Finance
Many of these are now commonplace and provide solutions to a great number of business challenges and complex, real-world problems.


Problem identification in Machine learning

Classification - predict a discrete number of values. A classification problem is when the output variable is a category, such as “red” or “blue” or “disease” and “no disease”. A classification model attempts to draw some conclusion from observed values.  Example: Predicting whether monsoon will be normal next year?

Binary classification — when there is only two classes to predict, usually 1 or 0 values.
Multi-Class Classification — When there are more than two class labels to predict we call multi-classification task. E.g. predicting 3 types of iris species, image classification problems where there are more than thousands classes(cat, dog, fish, car,…).
Algorithms for classification
  • Decision Trees
  • Logistic Regression
  • Naive Bayes
  • K Nearest Neighbors
  • Linear SVC (Support vector Classifier)

Regression -predict continuous valued output  . Example: Given a size of the house predict the price, Predicting the gender of a person by his/her handwriting style
Regression Algorithms

  • Linear Regression
  • Regression Trees(e.g. Random Forest)
  • Support Vector Regression (SVR)
Linear Regression is the simplest form of machine learning.  linear regression is a linear approach to modelling the relationship between a dependent variable and one or more independent variables. In the case of one independent variable it is called simple linear regression. For more than one independent variable, the process is called multiple linear regression.

# Linear Regression

import numpy as np
import matplotlib.pyplot as plt  # To visualize
import pandas as pd  # To read data
from sklearn.linear_model import LinearRegression

data = pd.read_csv('ml2_data.csv')  # load data set
X = data.iloc[:, 0].values.reshape(-1, 1)  # values converts it into a numpy array
Y = data.iloc[:, 1].values.reshape(-1, 1)  # -1 means that calculate the dimension of rows, but have 1 column
linear_regressor = LinearRegression()  # create object for the class
linear_regressor.fit(X, Y)  # perform linear regression
Y_pred = linear_regressor.predict(X)  # make predictions

plt.scatter(X, Y)
plt.plot(X, Y_pred, color='red')
plt.show()

Data

32.50234527 31.70700585
53.42680403 68.77759598
61.53035803 62.5623823
47.47563963 71.54663223
59.81320787 87.23092513
55.14218841 78.21151827
52.21179669 79.64197305
39.29956669 59.17148932
48.10504169 75.3312423
52.55001444 71.30087989
45.41973014 55.16567715
54.35163488 82.47884676
44.1640495 62.00892325
58.16847072 75.39287043
56.72720806 81.43619216

Let X be the independent variable and Y be the dependent variable. We will define a linear relationship between these two variables as follows:










XGBoost is one of the most popular machine learning algorithm.  XGBoost  ( eXtreme Gradient Boosting) is an open source library that provides gradient boosting for Python. The primary reasons you’d use this algorithm are its accuracy, efficiency, and feasibility. It’s a linear model and a tree learning algorithm that does parallel computations on a single machine. XGBoost makes it easy to scale any form of data due to its vey complex algorithms.  It has become the "state-of-the-art” machine learning algorithm to deal with structured data.



Deep Learning (DL)
DL is a branch of Machine learning that deploys algorithms for Data Processing.  In Deep Learning, Information is passed through each layer, and the output of the previous layer acts as the input for the next layer. The first layer in a network is referred as the Input layer, while the last is the Output layer the middle layers are referred to as Hidden layers where each layer is a simple, uniform algorithm consisting of one kind of activation function.  Hence to run deep learning algorithms, much more powerful   machines are required compared to ML.  Deep learning is still in the growth phase and in constant need of creative ideas to evolve further.

Let us look at ways to Improve ERP with Machine Learning:

  • Connect with   suppliers and customers while integrating with legacy ERP  to aggregate and analyze Data.
  • Contextual guidance and direction (using virtual agents)  to complex tasks. 
  • Capitalize on the massive data stream from IoT devices to provide Data to AI and machine learning apps continually will bridge the intelligence gap 
  • Plant maintenance - provide insights into how Overall Equipment Effectiveness (OEE) 
  • Increasing Asset utilization by analyzing machine-level data to determine when a given part needs to be replaced. 
  • Improve product quality by having machine learning algorithms aggregate, analyze and continually learn from inspection, quality control, Return Material Authorization and product failure data.  
  • Implementing self-learning algorithms that use production incident reports to predict production problems on assembly lines
  • Track-and-trace to predict which lots from which suppliers are most likely to be of the highest or lowest quality. 
  • Help close the configuration gap that exists between PLM, CAD, ERP and CRM systems 
  • Improving demand forecasting accuracy 


AI and Python
Python, one of the most widely used languages in Artificial Intelligence.  It is an interpreted programming language based on OOPS(Object-Oriented Programming).  Python contains several AI libraries.  These dedicated libraries save the time of the AI developers.


.


Popular posts from this blog

AI in Banking and Financial institutions

Hari Nair WeChat is a Chinese social media and mobile payment app, released during the year 2011 - China’s billion-user messaging app ClearBank , an innovative clearing bank in the UK based entirely on the cloud and offering an open-standards connection API, are showing the way to a future of distributed, hyper-efficient core banking services - Banking as a service!. AI will make intelligent automation   to do away with competition from FinTech players.  AI will enable banks to leverage  Machine Learning  optimally to drive operational and cost efficiencies.  By adapting AI, Banking sector have already taken actions, unlocking significant opportunities . Cognitive technology with Artificial Intelligence (AI) brings the advantage of Digitization to Banks.   SBI launched SIA, an AI-powered chat assistant that addresses customer enquiries  with everyday banking tasks.  Eva (Electronic Virtual Assistant) has addressed over 2...

AI and the Insurance Industry

  Hari Nair Needing insurance is like needing a parachute. If it isn't there the first time, chances are you won't be needing it again. --Author unknown Building customer relationships and managing risks are key for Insurance companies. Insurance companies are making extensive use of AI  are reaping the benefits of increased customer satisfaction adding to their bottom line.  AI has the potential to transform the insurance experience for customers from frustrating and bureaucratic to something fast, on-demand, and more affordable. Tailor-made insurance products will attract more customers at fairer prices. If insurers apply AI tech to the mountain of data at their disposal, we will soon start to see more flexible insurance such as on-demand pay-as-you-go insurance, and premiums that automatically adjust in response to accidents, customer health, etc.   Insurers have yet to unlock the full potential of AI. Machine learning use cases in Insu...