top of page
Search
  • nithyav2k16

Introduction to Machine Learning.

Updated: Feb 11, 2020

In this post, we will have a brief introduction to machine learning .We will learn some general concepts about machine learning. After going through this post, you'll be able to tell what machine learning is and what it isn't. You'll be able to solve some basic machine learning problems and be able to think particularly about your data and your results.


Description of Machine Learning
What is Machine Learning

First things first, what on earth is machine learning? At a very basic level, machine learning explores the construction and usage of algorithms that can learn from data, but when does the machine actually learn? We can say that the machine has the ability to learn if it is able to improve its performance when it receives more information. This experience typically comes in the form of observations on how particular instances of a problem was solved before. Lets discuss using an example.


Why is Machine Learning in demand?
Why Machine Learning?

A possible task for our computer is to to be able to label squares with the color based on the square size and the square edge. Initially the computer has no idea how to do this. However, suppose that the number of squares were labeled earlier by humans. For example, a small dotted square was labeled green. A big stripe square will be labeled yellow. The medium sized square with a normal edge was labeled green as well, and lastly, a small striped one was labeled yellow.





A machine learning algorithm can use these observations or instances to do an informed guess about how to label an unseen square. An example could be a medium strength square. The computer can be right or wrong. In doing so, this specific example is also a classification problem. There are many types of machine learning problems, some are related and others are pretty exotic.

A concept that keeps popping up is the presence of input, knowledge or simply data. In our example, it was a set of human labels. In other examples, it can be something totally different. Typically this data is a dataset containing a number observations that each have a well defined number of variables, often called features. Each square and its corresponding color is an observation. The features in this case are the size and the edge. The color is the label of the square.



As you're well aware, in R, the dataset is typically represented by a data frame .Have a look at this code that builds the square data frame from our example. In a data frame, the observations correspond to the rows and columns correspond to the variables. To find out the dimensions of your dataset you can use the dim() function. The structure function (str) , on the other hand, give some more structured overview of our data also showing how many observations and variables the dataset comprises. Another function you can use to observe your data is the summary() function. This function will also give you information on the distribution of each feature.



R dataframe functions used for machine learning
R dataframe functions used for machine learning

Okay. Let's dig into a more theoretical formulation of our example. The problem here is labeling a square that is actually applying some function on the inputs to generate an output. The size and edge variables of the square go in and the label variable color comes out . A machine learning algorithm tries to find a way of labelling the square, it is actually trying to estimate the function here. This function could be estimated based on the previous observations of how the problem was solved.Ideally, the function you're building is generally applicable and can handle all kinds of reasonable inputs. If we put in the unseen example, the medium Stripe Square with an unknown label, the function will guess a color for us.



It's very important to see when you're actually dealing with the machine learning problem. When you're simply calculating, for example, the most occurring color of squares in your data set or calculating the average size of your squares, you're not doing machine learning. The entire point about machine learning is trying to build a model that can help make predictions about your data or future instances of similar problems. Don't let these general formulations of machine learning confusing. Some very common problems can actually be taught of as machine learning. Do you know about linear regression? You can use it to make predictions on your data.



description about the Regression concept in machine learning
Regression concept in machine learning

Suppose you've got some data about a group of people, their height and our weight. You can use regression to make a function which can predict the height of a new person given their weight. You do this by using the given data about the known height and weight of the first group of people. There are so many other examples to Machine learning, such as shopping basket analysis, movie recommendation systems, decision making for self driving cars and what not. But let's take this step by step . In this data analytics training , we'll consolidate the main ideas about machine learning and help you to take your first gentle steps in this exciting field.


15 views1 comment

Recent Posts

See All
bottom of page