Machine Learning Foundations

Machine learning uses two types of techniques: one is supervised learning which trains a model on known input and output data so that it can predict future outputs. The second called unsupervised learning finds hidden patterns or intrinsic structures in input data. In this course, you will learn some of the most popular supervised learning algorithms such as KNN and Naive Bayes.


What is supervised learning?


What is the difference between supervised and unsupervised learning algorithms?

1 Like

What is supervision in machine learning?

What is regression in supervised learning?

In supervised learning, we try to infer function from training data. There are three steps to build a supervised model. Build model, train model and test model.

Let me give you my analogy of supervised learning. Suppose you are a student and want to learn a subject called machine learning. You have joined a tuition class for machine learning.

1 - In this case you are a model.

2 - Now your teacher will teach you machine learning. During teaching, your teacher may use some resource. In machine learning terminology, this is the training process. Where we train our model with past/current data. Training process varies according to learning algorithm. In short what we do is, we try to find out patterns in data.

3 - At the end of the course your teacher may test your knowledge to check how well you have done. Your teacher will test your knowledge and based on that he/she will take some actions to improve it. One situation to note here is that during teaching your teacher might have used some examples, so obviously he will not ask that one in the test. If he asks that example then you can solve it easily since you have learned it already. Your teacher takes test to ensure that you have learned the concept and you can perform well on new examples as well. In machine learning terminology, since we have trained our model on training data it will perform well (most of the time) on the training data. In order to check it’s actual power of prediction or accuracy we have to test it on unseen data (test data). Usually we divide whole data set in 70:30 manner to form training and testing data respectively.

Practical example, say you are trying to build a model which can detect fraud transaction of credit cards. What you can do is, try to gather as much data as you can from past incidents. Say, you have 500 data about fraud transactions and 500 data about normal transactions. Now you can use any supervised learning algorithm which will try to find patterns in data when it is fraud transaction as well when it is normal transaction. So now your model knows when xyz pattern exists in the data then there is some probability that it is a fraud transaction.


So basically you see that Supervised and Unsupervised learning, both works over datasets but one of the key difference is that in supervised learning the datasets are labelled, meaning there are features(Parameters) given about the data that means we can predict some more features based on some earlier given features(experience) whereas, in unsupervised learning, the data given is not labelled, means we can not predict new features with it.

Supervised Learning:-
This is a type of machine learning where there is a labelled data set is given with different features in it. For instance, we have a dataset of 1 million students with two features marks scored and study time. So based on the given study time of an average student, we need to predict the marks scored by a student.

Unsupervised Learning:-
Here in unsupervised learning, the dataset is not labelled, there are no features or parameters are given. So with these types of datasets, we can only find the difference between the given data rather than predicting. It clusters the data together and shows the structure of the data. Unsupervised learning is used in the astronomical field where we can group different galaxies. Also, it is used at many other places like social media, traffic controls, etc.


Dragos is right in that regression is not technically a subject within machine learning, but pertains to other subjects as well. But generally, regression refers to a model trying to predict a real valued target (0.4, 0.291, -10), as opposed to classification, where the model needs to predict discrete variables, representing classes (‘cat’, ‘dog’, ‘lizard’)

1 Like

Machine Learning is mainly 3 kinds of algorithms - Supervised, Unsupervised and Reinforcement learning. In supervised learning, the training data set has certain input column and one of more output columns. Both the input and output columns ‘supervise’ the training of the model.

The way they ‘supervises’ is by determining the prediction error which is the difference between what the current state of the model outputs vs. what the actual output should be.

This way you try to improve the model in multiple iterations by minimizing the error, and the actual value of the output (and weights assigned to the inputs) ‘supervising’ the direction of the model in each iterations. If there were no output values (like in clustering, which is unsupervised learning) then you will never know how good your model is predicting and you will not be able to supervise it for better accuracy.

While the above approach is how most ML algorithms work, some ML algorithms are closed form in nature (meaning they have a ready made Math formula). Both simple and multi-variate regression are examples for these. If you do regression using the closed form formula you plug in the inputs and outputs at the same time into the equation and out comes the weights. This is still supervised learning as both inputs and outputs determine the final state of your model.

1 Like

What is linear regression analysis?

What are the algorithms that a machine learning aspirant must know?

What are some common ML Interview Questions?

Regression is a technique that predicts the value of variable ‘y’ based on the values of variable ‘x’. In simple terms, Regression helps to find the relation between two things.

Linear regression is used to understand the relation between two variables. Linear regression is a type of supervised algorithm, it is sed for finding a linear relationship between the independent and dependent variable and finds the relationship between two or more continuous variable.

1 Like

The 3 main types of Machine Learning Algorithms are-

  1. Supervised Learning
    How it works: This algorithm consists of a target/outcome variable (or dependent variable) which is to be predicted from a given set of predictors (independent variables). Using these set of variables, we generate a function that map inputs to desired outputs. The training process continues until the model achieves a desired level of accuracy on the training data. Examples of Supervised Learning: Regression, Decision Tree, Random Forest, KNN, Logistic Regression etc.

  2. Unsupervised Learning
    How it works: In this algorithm, we do not have any target or outcome variable to predict / estimate. It is used for clustering population in different groups, which is widely used for segmenting customers in different groups for specific intervention. Examples of Unsupervised Learning: Apriori algorithm, K-means.

  3. Reinforcement Learning:
    How it works: Using this algorithm, the machine is trained to make specific decisions. It works this way: the machine is exposed to an environment where it trains itself continually using trial and error. This machine learns from past experience and tries to capture the best possible knowledge to make accurate business decisions.

Example of Reinforcement Learning:
Markov Decision Process
List of commonly used machine learning algorithms.
Linear Regression
Logistic Regression
Decision Tree
Naive Bayes
Random Forest
Dimensionality Reduction Algorithms

A Machine Learning interview calls for a rigorous interview process where the candidates are judged on various aspects such as technical and programming skills, knowledge of methods and clarity of basic concepts. If you aspire to apply for machine learning jobs, it is crucial to know what kind of interview questions generally recruiters and hiring managers may ask. Here are some of them:

  1. What are the different types of Learning/ Training models in ML?
  2. What is the difference between deep learning and machine learning?
  3. How do you select important variables while working on a data set?
  4. How are covariance and correlation different from one another?
  5. When does regularization come into play in Machine Learning?

Prerequisites to start learning ML?

I would say it is mandatory to learn a programming language, preferably Python, along with the required analytical and mathematical knowledge.
Here are some mathematical areas that you need to brush up before jumping into solving Machine Learning problems:

Linear algebra for data analysis: Scalars, Vectors, Matrices, and Tensors
Mathematical Analysis: Derivatives and Gradients
Probability theory and statistics
Multivariate Calculus
Algorithms and Complex Optimizations

What exactly does a Machine Learning Engineer do?

What is regularization in machine learning?

Machine Learning engineers work on a lot of interdisciplinary tasks including data science, analytics, business communication and much more. Here is what an ML Engineer would do on a day to day basis:

Checking active models
Connecting with their team for updates
Supervising task management platforms for the day
Analysis of company codebase (using Scikit learn) to look for bugs
Coding with PyCharm to implement models
Meeting stakeholders to ensure products are updated with new features
Optimisation of products
Creating plans and processes for products
Researching on the latest trends in the domain to benefit their company

1 Like