Machine Learning

Pradnya Kedari
Tech Extreme
Published in
9 min readJun 25, 2020

We saw AI,ML and DL difference and also mathematics required to machine learning. If you don't have idea about this things you can go through https://medium.com/tech-extreme/ai-ml-and-dl-lets-make-it-more-clear-aa8f1f9e07ff?source=friends_link&sk=0b337f116c6b7e136e8d31e6beae0f63

And

https://medium.com/tech-extreme/mathematics-for-machine-learning-7175532f0e2b?source=friends_link&sk=542c22bb11304dc446fbe6241c97c5c7

Now let's start with machine learning concepts and algorithms.

Before we start any algorithm or techniques first question comes in our mind is which language we should choose? So here is the answer : You can go with any comfortable language ( Python or R → most recommended ), Personally I’ll suggest for python as it is more comfortable, efficient and it has many pre-builded libraries. Other some languages you can go with are : Python, R, C++, Java, Lisp, Prolog,etc.

Now let’s start with Maching Learning concepts, here you will learn basic concepts, types, algorithms of machine learning and you will get more clear about what machine learning is exactly!

What is Machine Learning?

Machine learning is one of the most common applications of Artificial Intelligence. Machine learning (ML) is the study of computer algorithms that improve automatically through experience. It is seen as a subset of artificial intelligence. Machine learning algorithms build a mathematical model based on sample data, known as “training data”, in order to make predictions or decisions without being explicitly programmed to do so. We can say alexa, siri, google assistant or google translator are simple applications in our day to day life!

Machine Learning have different algorithms and techniques which are used for data analytics. We can say it is the part of artificial intelligence as well as data science!

Types of Machine Learning

If you’re new to machine learning it’s worth starting with the three core types: supervised learning, unsupervised learning, and reinforcement learning.

Supervised Learning:

Supervised learning is when you provide the machine with a lot of training data to perform a specific task.

For example, to teach a kid the color red, you’d show him a bunch of red things like an apple, a red ball, right? After showing the kind of a bunch of red things, you’d then show him a red thing and ask him what color it is to find out if the kid has learned it or not. In supervised learning, you similarly teach the machine. It is the most accessible type of ML to implement, and it’s also the most common one.

In this type of machine learning, we have data of two types : dependent data(variables) and independent data(variables) where the dependent variables are those which we have to predict and independent variables are those on which we have to make prediction. In supervised learning we already have some referenced data or we can say historical data on which we make predictions. Basically it predicts the value of an outcome measure based on a number of input measures. In the training data, you’d feed the machine with a lot of similar examples, and the computer will predict the answer. You would then give feedback to the computer as to whether it made the right prediction or not. This type of machine learning has more evalution methods than unsupervised learning.

Applications of Supervised Learning:

  • Face Recognition — Recognizing faces in images (Facebook and Google Photos)
  • Spam Filter — Identify spam emails by checking their content
  • Image Classification
  • Fraud Detection

Types (algorithms) of supervised machine learning:

  1. Regression : Linear Regression, Multilinear Regression, Logistic Regression
  2. Classification : Naive Bayesian Model, Support Vector Machines (SVM), K-Nearest Neighbor (KNN)
  3. Decision Trees
  4. Random Forest Model

Unsupervised Learning:

As the name suggests, unsupervised learning is the opposite of supervised learning. In this case, you don’t provide the machine with any training data. The machine has to reach conclusions without any labeled data. It’s a little challenging to implement than supervised learning. It is used for clustering data and for finding anomalies.

Following the example we discussed above, suppose you didn’t show the kid different red-colored things in the beginning. Instead, you put a bunch of red-colored and green-colored things in front of him and asked him to separate them. Unsupervised learning is similar to this example.

Another example we can say suppose you have different news articles, and you want them sorted into different categories. You’d give the articles to the machine, and it will detect commonalities between them. It will then divide the articles into different categories according to the data it finds. Now, when you give a new article to the machine, it will categorize it automatically.

Just like other machine learning types, Unsupervised Machine Learning is also quite popular as it is data-driven. In this type of machine learning, machine will learn itself without any kind of referenced or historical data. It has more difficult algorithms and has less evalution methods than unsupervised learning. It is exploratory in nature and identifies the associations and patterns among a set of input measures.

Applications of Unsupervised Learning :

  • Recommendation systems — Recommend products to buyers (such as Amazon)
  • Data categorization — Categorize data for better organization
  • Customer segmentation — Classify customers into different categories according to different qualities
  • Big data visualisation
  • Structure Discovery

Types (algorithms) of Unsupervised Learning :

  • Clustering: k-mean
  • Dimensionality Reduction: Feature Selection, Principal Component Analysis (PCA), Linear Discriminant Analysis (LDA)

Reinforcement Learning:

Reinforcement learning is quite different from other types of machine learning (supervised and unsupervised). The relation between data and machine is quite different from other machine learning types as well. In reinforcement learning, the machine learns by its mistakes. You give the machine a specific environment in which it can perform a given set of actions. Now, it will learn by trial and error.

In the example we discussed above, suppose you show the kid an apple and a banana then ask him which one is red. If the child answers correctly, you give him candy (or chocolate), and if the kid gives a wrong answer, you don’t give him the same. In reinforcement learning, the machine learns similarly.

In this type of machine learning, machine will learn, it will check that output which is getting is a desired output or not? and it will again run if output is wrong.

Applications of Reinforcement Learning:

  • Manufacturing Industry — Streamline the automated manufacturing process
  • Robotics , Robot Navigation — Teach machines on how to avoid mistakes
  • Game AI, Video Games — Better AI for video game characters and NPCs
  • Chess Machine
  • Optimal Control Theory
  • Real time decisions

In short we can say →

Supervised Learning → Train Me!

UnSupervised Learning → I am self sufficient in learning.

Reinforcement Learning → My Life My Rules (Hit and Trial)

Now Let’s see some essential python libraries for machine learning:

  1. NumPy : Short for Numerical Python

This library is the foundational package for scientific computing in python . NumPy adds multi-dimensional array and matrix processing to Python, as well as a large collection of high-level mathematical functions. It is commonly used for scientific computing and hence, one of the most used Python Packages for machine learning. Versatility — other ML libraries like scikit-learn and TensorFlow use NumPy arrays as input; data manipulation packages like Pandas use NumPy under the hood. NumPy is Intuitive, interactive and also simplifies complex mathematical implementations.

2. Pandas :

This is one of the critical ingredients enabling python to be a powerful and productive data analysis environment. Pandas is a Python library for providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language. It has expressive, fast, and flexible data structures. It supports aggregations, concatenations, iteration, re-indexing, and visualizations operations. Very flexible usage in conjunction with other Python libraries. Pandas library has many functions for data importing, manipulation and analysis.

3. Matplotlib :

Matplotlib is the most popular python library for producing plots and other 2D as well as 3D data visualizations. Matplotlib is an interactive, cross-platform library for two-dimensional plotting. It can produce high-quality graphs, charts and plots in several hardcopy formats. Matplotlib is frequently incorporated in other libraries, such as Pandas. This library has flexible usage: supports both Python and IPython shells, Python scripts, Jupyter Notebook, web application servers and many GUI toolkits (GTK+, Tkinter, Qt, and wxPython).

4. Scipy :

Scipy is a collection of numerical algorithms and domain specific toolboxes, including signal processing, optimization, statistics and much more and packages addressing a number of different standard problems. Scipy is a good library for scientific and high performance computation. This library is great for image manipulation, supports signal processing and it provides easy handling of mathematical operations. Scipy Offers efficient numerical routines, including numerical integration and optimization.

5. scikit learn (also called sklearn and stats model) :

This library provides machine learning capabilities in python. scikit is open source free tool for data mining and data analysis. Scikit-Learn, is built on top of the matplotlib, NumPy, and SciPy libraries. This library is simple, easy to use, and effective. It is in rapid development, and constantly being improved. Scikit-Learn is useful in wide range of algorithms, including clustering, factor analysis, principal component analysis, and more. Using this library we can extract data from images and text and also scikit-learn can be used for NLP.

6. TensorFlow :

This library is originally developed by Google. TensorFlow is an open-source library for high-performance numerical computation using data flow graphs. Under the hood, it’s actually a framework for creating and running computations involving tensors. The principal application for TensorFlow is in neural networks, and especially deep learning where it is widely used. That makes it one of the most important Python packages for machine learning.

Advantages:

  • Supports reinforcement learning and other algorithms.
  • Provides computational graph abstraction.
  • Offers a very large community.
  • Provides TensorBoard, which is a tool for visualizing ML models directly in the browser.
  • Production ready.
  • Can be deployed on multiple CPUs and GPUs.

7. Keras :

Keras is a very popular ML for Python, providing a high-level neural network API capable of running on top of TensorFlow, CNTK, or Theano.

Advantages:

  • Great for experimentation and quick prototyping.
  • Portable.
  • Offers easy expression of neural networks.
  • Great for use in modeling and visualization.

8. PyTorch :

PyTorch is a popular ML library for Python based on Torch, which is an ML library implemented in C and wrapped in Lua. It was originally developed by Facebook, but is now used by Twitter, Salesforce, and many other major organizations and businesses. It contains tools and libraries that support Computer Vision, NLP , Deep Learning, and many other ML programs. Using this libtrary developers can perform computations on Tensors with GPU acceleration. PyTorch helps in creating computational graphs. It uses a lot of pre-trained models and modular parts that are easy to combine.

Machine Leaning Applications

  • Retail — Market Basket Analysis
  • Telecommunications — Customer experience analytics
  • Healthcare — Clinical data analysis, Healthcare administration analysis
  • Manufacturing — Supply chain analytics
  • e-Commerce and social media
  • Virtual Personal Assistants
  • Self Driving Cars
  • Dynamic Pricing
  • Online Video Streaming
  • Fraud Detection
  • Face Recognition, Character Recognition, Speech Recognition — This algorithms are also known as pattern recognition.

Application of Machine Learning in Google

  • Google Translate
  • Cloud Machine Learning
  • Computer vision API
  • Speech, language and transalation APIs
  • Google Assistant

Machine Learning Career Paths

Once you have acquired the right ML skills, here are the top five promising Machine Learning career paths that you can aspire for:

1. Machine Learning Engineer

2. Data Scientist

3. NLP Scientist

4. Software Developer/Engineer (AI/ML)

5. Human-Centered Machine Learning Designer

6. Data Analyst

7. Data Architect

8. Cloud Architect

9. Business Intelligence Developer

Here we saw what is machine learning, types of machine learning and its application and career paths. Now in next blog we will see each type of machine learning and it’s algorithms in detail.

Feel free to ask if you have any queries regarding to this article.

Have a great learning!

--

--