How to choose the right Machine Learning Algorithm?

By admin
5 years ago
Share

Machine Learning Algorithm

There is one thing about the Machine Learning algorithm and that is there is no one approach or one solution that caters to all your problems. But you can always pick an algorithm that nearly solves your problems and then you can customize it to make it one perfect solution for your problem.

Here we are stating some factors that will help you narrow down your list of machine learning algorithm options.

But first things first, you need to have clarity of the data, your constraints, and your exact problem. For achieving clarity of data, do the following:

a) Know your data

To understand your data you need to look at summary statistics and try to point out the central tendency of data. For doing this, you will require to study the averages, medians, and correlation that indicates a strong relationship in data. The next thing to figure out is ‘what to do with outliers’. You can use box plots that can identify outliers. Apart from this, ‘clean your data’. Sort it for relevancy and segregate it on the basis of the problem at hand.

 

b) Categorize the problem

Once you know your data, you need to categorize your problem, which can be done in two steps:

  • Categorize by input:

A supervised learning program is when the data is labeled. If the data in unlabelled and you desire to find an appropriate structure then it is an unsupervised learning program. One should know the type of inputs they can offer in order to choose an appropriate machine learning algorithm.

 

  • Categorize by output.

Now, if the output of your model is in number form then it will be called a regression problem. If you desire classification of data as an output, it’s a classification problem. Another type of problem is clustering problem when the model required to set groups for the inputs given.

 

c) Find the available algorithms

After proper evaluation of your problems, you can opt to identify the applicable algorithms which are practical to implement using the available tools.

Most commonly used Machine Learning Algorithms

In this blog, we have listed out some of the commonly used Machine Learning Algorithms just to give you a heads up. Follow us for more intriguing updates on Machine Learning.

1. Linear Regression

This is the simplest Machine Learning algorithm. It can be used to compute continuous input data as compared to classification in which the output is categoric. In simple words, linear regression can be used to predict some future value of a process that is currently going on. It should be kept in mind that in case of multicollinearity the linear regressions are unstable.

Examples, where linear regression can be used, are:

  • Predicting sales for the coming month
  • The time required in commuting from one place to another

 

2. Logistic Regression

Logistic Regression can be used as a probabilistic framework or to incorporate more training data into the model in future. It is not just a black box method but it will help you to understand the factors behind the predictive outcome and so forth.

Examples, where logistic regression can be used, are:

  • Fraud detection and credit scoring
  • Estimating the effectiveness of marketing campaigns

 

3. Decision trees

Using decision trees alone is done very rarely. Usually, they are combined with others machine learning algorithm to build an efficient algorithm like Gradient Tree or Random Forest.

Examples, where decision trees can be used, are:

  • Investment decisions
  • Buy or build decisions
  • Banks loan defaulters

 

4. K-means

K-means is used for the unlabelled data where the task is to cluster and label them. It is used when the user group is very large and you wish to categorize them on the basis of common attributes.

 

5. Principal component analysis (PCA)

The principal component analysis is used when the data has a high range of features and is highly correlated. In such a situation PCA will help you in dimension reduction.

 

6. Support Vector Machines

Support Vector Machine (SVM) is used on labeled data and is used widely in pattern recognition and classification problems when the input data has exactly two classes.

Examples, where SVM can be used, are:

  • Text categorization
  • Stock market predictions

 

7. Naive Bayes

Naive Bayes is based on Bayes’ theorem. It is a classification technique that is easy to build and works great with large datasets. It is a better classifier than discriminative models like logistic regression because it is quicker and requires less training data.  

Examples, where Naive Bayes can be used, are:

  • Text classification
  • To mark an email as spam or not
  • Face recognition

 

8. Random Forest

Random Forest can solve both classification and regression problems on large data sets. Basically, it is a collection of decision trees. It is highly scalable to any number of dimensions and has usually quite acceptable performances.

Examples, where Random Forest can be used, are:

  • Predict credit loan defaulters
  • Predict patients with high health risks

 

9. Neural networks

Neural networks can be used to train extremely complex models and these models can be utilized as a black box. For example, object recognition is enormously enhanced by deep neural networks only.

Summing up

The above pointers will be a great help to shortlist a few algorithms but it is hard to figure out which algorithm will work best for your problem. Therefore, it is suggested to work iteratively. For picking the best one among the shortlisted alternatives, test the input data with all of them and at the end evaluate the performance of the algorithm.

Also, to develop a perfect solution to a real-life problem you need to be aware of rules and regulations, business demands, and stakeholders’ concerns and you should have considerable expertise in applied mathematics.