Automation solutions are implemented to transform business processes, drive efficiency, make intelligent business decisions, and explore new business opportunities. Of all the automation solutions, Artificial Intelligence (AI) is the most adopted and Machine Learning (ML) is an important part of AI solutions. Machine Learning enables AI systems with capability to analyze, interpret and make decisions. ML algorithms enable AI applications to learn on their own to achieve automation. Machine Learning has many real-time applications which include data mining, natural language processing, and image recognition.
To have a successful automation strategy with machine learning capabilities, the business must decide on processes to be automated with ML algorithms. Based on the process and application type, choosing an appropriate ML model is essential.
Types of Machine Learning Models
Supervised Learning involves a series of functions that map an input to an output based on a series of input-output pairs. For example, if we have a data set of two variables one being age which is the input, and the other being the shoe size as output. One could implement a Supervised Learning model to predict the shoe size of a person based on their age. Supervised Learning can be Regression and Classification based models.
In the regression model, we find a target value based on independent predictors. We can use this to discover the relationship between a dependent variable and an independent variable. In regression models the output is continuous. Some of the most common types of regression models include:
- Linear Regression: Extensions include multiple linear regression that is finding a plane of best fit.
- Decision Tree: It looks something like a tree where each square above is called a node and the more nodes you have the more accurate your decision tree will be.
- Random Forest: These are assembling learning techniques that are built over decision trees. The multiple decision trees are created using bootstrap data sets and randomly select a subset of variables at each step of the decision tree. The model then selects the mode of all the predictions of each decision tree and reduces the risk of error from an individual tree.
- Neural Network: A multi-layered model inspired by the human neural system. It consists of an input layer, hidden layer, an output layer, node, and function. (More about Neural Networks, here.
In classification the output is discrete. Types of classification models include:
- Logistic Regression: This is more of a linear regression model and is used to model the probability of a finite number of outcomes, typically two. The output values can only be between 0 and 1.
- Support Vector Machine: This technique finds a hyper lane in n-dimensional space that can distinctly classify data points.
- Naive Bayes: This is a probabilistic Machine Learning model used for classification tasks and based on the Bayes theorem.
Unlike Supervised Learning, Unsupervised Learning is used to derive inferences and discover patterns from input data without references to the labeled outcome. Methods are used in Unsupervised Learning are:
- Clustering: Data points are grouped together and used for segmentation, fraud detection, and document classification. Common clustering techniques include k-means clustering, hierarchical clustering, means shape clustering, and density-based clustering.
- Dimensionality Reduction: Process of reducing the dimensions of a feature set auto states by simply reducing the number of features. This technique involves feature elimination or feature extraction.
This technique is about taking suitable action to maximize reward in a particular situation. As stated by Scholarpedia, "Reinforcement learning (RL) is defined as the process of learning by interacting with an environment. An RL agent learns from the consequences of its actions, rather than from being explicitly taught and it selects its actions on the basis of its past experiences (exploitation) and also by new choices (exploration), which is essentially trial and error learning."
This Machine Learning method trains applications with set of actions to be performed based on certain contexts or situations. The efficiency of the reinforcement learning ability improves with the number of contexts or feedback it's provided which is called a reinforcement signal. Based on the stored patterns, the results are generated by the ML application.
Learn more about the Reinforcement Learning Technique.
Common Metrics to Evaluate Models
- Classification metrics (also called confusion matrix), when using classification predictions, there are 4 outcomes: true positives, true negatives, false positives, and false negatives.
- Accuracy precision and recall are other three metrics used to evaluate a classification model.
Developing a Machine Learning System
After training a new model, produce an evaluation report that includes the performance of established metrics on a dataset; plots, operational statistics, and precision & recall curves. Then review the ML model with a validation data set, inspect all the metrics and plots to analyze the model performance, and compare performance between multiple models and make a decision based on the data.
To build a high-quality ML model, it's important to run model tests and model evaluations. Model testing verifies the model's expected behavior and model evaluation involves metrics and plots. To accurately evaluate a model is to not train the model on the entire dataset, use 70% of the data for training and 30% of the data for testing.
Machine Learning Testing
In traditional applications, the developer develops the code which interacts with data to produce the desired behavior and the tester will test the application to verify actual behavior with the expected behavior. Traditional software testing methods include system testing, integration testing, and regression testing. Whereas testing of ML applications involve testing the model used to develop the application.