MITB Banner

A Complete Guide On How To Approach A Machine Learning Problem For Beginners

In this article, you will learn step-by-step how to answer these questions by yourself whilst solving machine learning problems.

Share

Machine Learning Problems

Machine Learning has become a boom lately, everyone is doing it, everyone’s learning it and implementing it. Although there are many things which still need to be cleared in terms of concepts and approach.

There are a few questions that one must surely ask while delving into machine learning and solving problems of the same. These questions are, what is the approach? How to start off? What is the underlying problem? Which algorithm would fit the problem, the best? Etc.

In this article, you will learn step-by-step how to answer these questions by yourself whilst solving machine learning problems.

In the first step, we will learn more about where to use machine learning. In the second part, we will learn which algorithm to use, on a specific use case. And lastly, we will use how to have clean visualizations so that it gives the best results in terms of pictorial representation.

Step 1. Where to use Machine Learning?

Not every problem which has numbers involved in it is a machine learning problem. There’s a great saying, if the only tool you have is a hammer, you tend to see every problem as a nail.

Machine Learning can only be used in the following problems:

  1. Learning from the data is required.
  2. Prediction of an outcome is asked for.
  3. Automation is involved.
  4. Understanding the pattern is required like that in the case of user sentiments.
  5. Same as point d for building recommendation systems.
  6. Identification/Detection of an entity/object is required.

There are many other bullets to it too but the fundamentals are the ones mentioned above. A use case may have more than one bullet. There may be things where one might simply not need to have machine learning practice for the same in such a case he should go with one because simplicity is what is valued everywhere.

Now coming up with how to solve a machine learning problem. A following stepwise approach would help you solve almost any machine learning problem. 

Step 1(a). How to solve a Machine Learning problem?

Stepwise approach

  1. Read the data (from csv, json etc)
  2. Identify the dependent and independent variables.
  3. Check if the data has missing values or the data is categorical or not.
  4. If yes, apply basic data preprocessing operations to bring the data in a go to go format.
  5. Now split the data into the groups of training and testing for the respective purpose.
  6. After splitting data, fit it to a most suitable model. (How to find a suitable model is answered below)
  7. Validate the model. If satisfactory, then go with it, else tune the parameters and keep testing. In a few cases, you can also try different algorithms for the same problem to understand the difference between the accuracies. 
  8. From step 7 one can also learn about accuracy paradox.
  9. Visualize the data. 

Visualising the data is important because we need to understand where our data is heading and also it looks more representative while storytelling about the data.

This 9 step approach is a beginner-friendly approach and would surely help you out.

Step 2. Which Algorithm to use?

To understand the basics of it we need to understand what labelling really is. In layman terms, we can understand labels as the values that we need to predict or as the y variable in a machine learning problem which is often called as the dependent variable.

Let’s understand this with a small example. 

if dependent_variable_exists==True:

supervised learning()

else:

unsupervised learning()

Supervised learning is the term we use when we need supervision whilst training. How do we give that supervision? Well, it means the output has a frame to be compared from. That frame is what we call as the dependent variable.

And since we don’t have that frame of reference in unsupervised learning, thus the name.

Now let us see how the algorithms can be served for different purposes.

Note: the following algorithms are used for most of their respective cases and thus are generalized, situations may vary and the choice of algorithms.

Linear Regression-Numeric data

Logistic regression-when the output variable is binary.

Linear Discriminant analysis-multi category classification

Decision tree-Regression and Classification

Ensembles– Regression and Classification

Naive Bayes– Regression and Classification

KNN – Regression and Classification

In ensembles we can take random forest, Adaboost, XG boost and other algorithms combined. These can be used for both classification and regression.

The ensemble can be understood as a group of more than one classifier/regressor irrespective of whether it is the same or not, working for the same purpose.

Step 3. Preparing Clean Visualizations

Now coming to visualizations:

Things that one needs to keep in mind whilst visualizing the reports.

  1. Can show clustering of classes using scatter plot
  2. Scatter plot shouldn’t be used when there are too many data points.
  3. A class comparison can be demonstrated via histograms.
  4. Pie charts can be used for a comparative breakdown.
  5. Simple line charts can be used for analysing reports who have frequent deviations like that of stocks.

Having a lot of data points on a scatter plot just makes it look clumsy and thus is not a good report to show in front of all the stakeholders. So it is advised not to use scatter charts in such cases. 

Conclusion

The article was aimed to create a general awareness of machine learning tips for beginners. The article covers some general dos and don’ts for the same.

The article covered some basic doubts/questions a beginner generally asks.

Hope you found this article useful. 

Share
Picture of Bhavishya Pandit

Bhavishya Pandit

Understanding and building fathomable approaches to problem statements is what I like the most. I love talking about conversations whose main plot is machine learning, computer vision, deep learning, data analysis and visualization. Apart from them, my interest also lies in listening to business podcasts, use cases and reading self help books.
Related Posts

CORPORATE TRAINING PROGRAMS ON GENERATIVE AI

Generative AI Skilling for Enterprises

Our customized corporate training program on Generative AI provides a unique opportunity to empower, retain, and advance your talent.

Upcoming Large format Conference

May 30 and 31, 2024 | 📍 Bangalore, India

Download the easiest way to
stay informed

Subscribe to The Belamy: Our Weekly Newsletter

Biggest AI stories, delivered to your inbox every week.

AI Courses & Careers

Become a Certified Generative AI Engineer

AI Forum for India

Our Discord Community for AI Ecosystem, In collaboration with NVIDIA. 

Flagship Events

Rising 2024 | DE&I in Tech Summit

April 4 and 5, 2024 | 📍 Hilton Convention Center, Manyata Tech Park, Bangalore

MachineCon GCC Summit 2024

June 28 2024 | 📍Bangalore, India

MachineCon USA 2024

26 July 2024 | 583 Park Avenue, New York

Cypher India 2024

September 25-27, 2024 | 📍Bangalore, India

Cypher USA 2024

Nov 21-22 2024 | 📍Santa Clara Convention Center, California, USA

Data Engineering Summit 2024

May 30 and 31, 2024 | 📍 Bangalore, India

Subscribe to Our Newsletter

The Belamy, our weekly Newsletter is a rage. Just enter your email below.