Machine learning Algorithms and where they are used?

Machine learning Algorithms and where they are used?

https://www.guru99.com/images/tensorflow/082918_1102_WhatisMachi5.webp

Machine learning can be grouped into two broad learning tasks: Supervised and Unsupervised. There are many other algorithms

https://tpc.googlesyndication.com/safeframe/1-0-31/html/container.html Supervised learning

An algorithm uses training data and feedback from humans to learn the relationship of given inputs to a given output. For instance, a practitioner can use marketing expense and weather forecast as input data to predict the sales of cans.

You can use supervised learning when the output data is known. The algorithm will predict new data.

There are two categories of supervised learning:

  • Classification task
  • Regression task

Classification

Imagine you want to predict the gender of a customer for a commercial. You will start gathering data on the height, weight, job, salary, purchasing basket, etc. from your customer database. You know the gender of each of your customer, it can only be male or female. The objective of the classifier will be to assign a probability of being a male or a female (i.e., the label) based on the information (i.e., features you have collected). When the model learned how to recognize male or female, you can use new data to make a prediction. For instance, you just got new information from an unknown customer, and you want to know if it is a male or female. If the classifier predicts male = 70%, it means the algorithm is sure at 70% that this customer is a male, and 30% it is a female.

The label can be of two or more classes. The above example has only two classes, but if a classifier needs to predict object, it has dozens of classes (e.g., glass, table, shoes, etc. each object represents a class)

Regression

When the output is a continuous value, the task is a regression. For instance, a financial analyst may need to forecast the value of a stock based on a range of feature like equity, previous stock performances, macroeconomics index. The system will be trained to estimate the price of the stocks with the lowest possible error.

Algorithm NameDescriptionType
Linear regressionFinds a way to correlate each feature to the output to help predict future values.Regression
Logistic regressionExtension of linear regression that’s used for classification tasks. The output variable 3is binary (e.g., only black or white) rather than continuous (e.g., an infinite list of potential colors)Classification
Decision treeHighly interpretable classification or regression model that splits data-feature values into branches at decision nodes (e.g., if a feature is a color, each possible color becomes a new branch) until a final decision output is madeRegression Classification
Naive BayesThe Bayesian method is a classification method that makes use of the Bayesian theorem. The theorem updates the prior knowledge of an event with the independent probability of each feature that can affect the event.Regression Classification
Support vector machine Support Vector Machine, or SVM, is typically used for the classification task. SVM algorithm finds a hyperplane that optimally divided the classes. It is best used with a non-linear solver.Regression (not very common) Classification
Random forestThe algorithm is built upon a decision tree to improve the accuracy drastically. Random forest generates many times simple decision trees and uses the ‘majority vote’ method to decide on which label to return. For the classification task, the final prediction will be the one with the most vote; while for the regression task, the average prediction of all the trees is the final prediction.Regression Classification
AdaBoostClassification or regression technique that uses a multitude of models to come up with a decision but weighs them based on their accuracy in predicting the outcomeRegression Classification
Gradient-boosting treesGradient-boosting trees is a state-of-the-art classification/regression technique. It is focusing on the error committed by the previous trees and tries to correct it.Regression Classification

Unsupervised learning

In unsupervised learning, an algorithm explores input data without being given an explicit output variable (e.g., explores customer demographic data to identify patterns)

You can use it when you do not know how to classify the data, and you want the algorithm to find patterns and classify the data for you

AlgorithmDescriptionType
K-means clusteringPuts data into some groups (k) that each contains data with similar characteristics (as determined by the model, not in advance by humans)Clustering
Gaussian mixture modelA generalization of k-means clustering that provides more flexibility in the size and shape of groups (clustersClustering
Hierarchical clusteringSplits clusters along a hierarchical tree to form a classification system.Can be used for Cluster loyalty-card customerClustering
Recommender systemHelp to define the relevant data for making a recommendation.Clustering
PCA/T-SNEMostly used to decrease the dimensionality of the data. The algorithms reduce the number of features to 3 or 4 vectors with the highest variances.