Reinforcement learning Reinforcement learning is an area of Machine Learning. It is about taking suitable action to maximize reward in a particular situation . It is employed by various software and machines to find the best possible behavior or path it should take in a specific situation. Reinforcement learning differs from supervised learning in a way that in supervised learning the training data has the answer key with it so the model is trained with the correct answer itself whereas in reinforcement learning, there is no answer but the reinforcement agent decides what to do to perform the given task.
Example: The problem is as follows: We have an agent and a reward, with many hurdles in between . The agent is supposed to find the best possible path to reach the reward. The following problem explains the problem more easily.
Main points in Reinforcement learning Input : The input should be an initial state from which the model will start Output: There are many possible outputs as there are a variety of solutions to a particular problem Training: The training is based upon the input, The model will return a state and the user will decide to reward or punish the model based on its output. The model keeps continues to learn.The best solution is decided based on the maximum reward.
Types of Reinforcement 1. Positive – Positive Reinforcement is defined as when an event, occurs due to a particular behavior, increases the strength and the frequency of the behavior. In other words, it has a positive effect on behavior. Advantages of reinforcement learning are: Maximizes Performance Sustain Change for a long period of time Too much Reinforcement can lead to an overload of states which can diminish the results 2. Negative – Negative Reinforcement is defined as strengthening of behavior because a negative condition is stopped or avoided. Advantages of reinforcement learning: Increases Behavior Provide defiance to a minimum standard of performance It Only provides enough to meet up the minimum behavior
Markov Decision Process Reinforcement Learning : Reinforcement Learning is a type of Machine Learning. It allows machines and software agents to automatically determine the ideal behavior within a specific context, in order to maximize its performance. Simple reward feedback is required for the agent to learn its behavior; this is known as the reinforcement signal. There are many different algorithms that tackle this issue. As a matter of fact, Reinforcement Learning is defined by a specific type of problem, and all its solutions are classed as Reinforcement Learning algorithms. In the problem, an agent is supposed to decide the best action to select based on his current state. When this step is repeated, the problem is known as a Markov Decision Process.
A Markov Decision Process (MDP) model contains: A set of possible world states S. A set of Models. A set of possible actions A. A real-valued reward function R( s,a ). A policy the solution of Markov Decision Process.
Hidden Markov Models Simplified Hidden Markov Models (HMMs) are a class of probabilistic graphical model that allow us to predict a sequence of unknown (hidden) variables from a set of observed variables. A simple example of an HMM is predicting the weather (hidden variable) based on the type of clothes that someone wears (observed). An HMM can be viewed as a Bayes Net unrolled through time with observations made at a sequence of time steps being used to predict the best sequence of hidden states. The below diagram from Wikipedia shows an HMM and its transitions. The scenario is a room that contains urns X1, X2 and X3, each of which contains a known mix of balls, each ball labeled y1, y2, y3 and y4. A sequence of four balls is randomly drawn. In this particular case, the user observes a sequence of balls y1,y2,y3 and y4 and is attempting to discern the hidden state which is the right sequence of three urns that these four balls were pulled from.
Generally, the term “states” are used to refer to the hidden states and “observations” are used to refer to the observed states. 1. Transition data — the probability of transitioning to a new state conditioned on a present state. 2. Emission data — the probability of transitioning to an observed state conditioned on a hidden state. 3. Initial state information — the initial probability of transitioning to a hidden state. This can also be looked at as the prior probability.
Decision Tree Classification Algorithm Decision Tree is a Supervised learning technique that can be used for both classification and Regression problems, but mostly it is preferred for solving Classification problems. It is a tree-structured classifier, where internal nodes represent the features of a dataset, branches represent the decision rules and each leaf node represents the outcome.
Why use Decision Trees? There are various algorithms in Machine learning, so choosing the best algorithm for the given dataset and problem is the main point to remember while creating a machine learning model. Below are the two reasons for using the Decision tree: Decision Trees usually mimic human thinking ability while making a decision, so it is easy to understand.The logic behind the decision tree can be easily understood because it shows a tree-like structure.
Decision Tree Terminologies Root Node: Root node is from where the decision tree starts. It represents the entire dataset, which further gets divided into two or more homogeneous sets. Leaf Node: Leaf nodes are the final output node, and the tree cannot be segregated further after getting a leaf node. Splitting: Splitting is the process of dividing the decision node/root node into sub-nodes according to the given conditions. Branch/Sub Tree: A tree formed by splitting the tree. Pruning: Pruning is the process of removing the unwanted branches from the tree. Parent/Child node: The root node of the tree is called the parent node, and other nodes are calledthe child nodes.
Random Forest Algorithm Random Forest is a popular machine learning algorithm that belongs to the supervised learning technique. It can be used for both Classification and Regression problems in ML. It is based on the concept of ensemble learning, which is a process of combining multiple classifiers to solve a complex problem and to improve the performance of the model.
How does Random Forest algorithm work? Random Forest works in two-phase first is to create the random forest by combining N decision tree, and second is to make predictions for each tree created in the first phase. The Working process can be explained in the below steps and diagram: Step-1: Select random K data points from the training set. Step-2: Build the decision trees associated with the selected data points (Subsets). Step-3: Choose the number N for decision trees that you want to build. Step-4: Repeat Step 1 & 2. Step-5: For new data points, find the predictions of each decision tree, and assign the new data points to the category that wins the majority votes.
Applications of Random Forest There are mainly four sectors where Random forest mostly used: 1. Banking: Banking sector mostly uses this algorithm for the identification of loan risk. 2. Medicine: With the help of this algorithm, disease trends and risks of the disease can beidentified . 3. Land Use: We can identify the areas of similar land use by this algorithm. 4. Marketing: Marketing trends can be identified using this algorithm.
Advantages of Random Forest Random Forest is capable of performing both Classification and Regression tasks. It is capable of handling large datasets with high dimensionality. It enhances the accuracy of the model and prevents the overfitting issue.
Disadvantages of Random Forest Although random forest can be used for both classification and regression tasks, it is not more suitable for Regression tasks.
Bayesian Belief Network in artificial intelligence Bayesian belief network is key computer technology for dealing with probabilistic events and to solve a problem which has uncertainty. We can define a Bayesian network as:& quot ; A Bayesian network is a probabilistic graphical model which represents a set of variables and their conditional dependencies using a directed acyclic graph.& quot ; It is also called a Bayes network, belief network, decision network, or Bayesian model.
Bayesian Network can be used for building models Directed Acyclic Graph Table of conditional probabilities.
A Bayesian network graph is made up of nodes and Arcs (directed links)
The Bayesian network has mainly two components: Causal Component Actual numbers
Artificial Neural Network The term & quot;Artificial Neural Network" ; is derived from Biological neural networks that develop the structure of a human brain. Similar to the human brain that has neurons interconnected to one another, artificial neural networks also have neurons that are interconnected to one another in various layers of the networks. These neurons are known as nodes.
Architecture and Learning process in neural network ANN is a computational system consisting of many interconnected units called artificial neurons. The connection between artificial neurons can transmit a signal from one neuron to another. So, there are multiple possibilities for connecting the neurons based on which the architecture we are going to adopt for a specific solution. Some permutations and combinations are as follows:
There may be just two layers of neuron in the network – the input and output layer. There can be one or more intermediate ‘hidden’ layers of a neuron. The neurons may be connected with all neurons in the next layer and so on …..
The typical Artificial Neural Network looks something like the given figure. An Artificial Neural Network in the field of Artificial intelligence where it attempts to mimic the network of neurons makes up a human brain so that computers will have an option to understand things and make decisions in a human-like manner. The artificial neural network is designed by programming computers to behave simply like interconnected brain cells.
What is the Perceptron model in Machine Learning? Perceptron is Machine Learning algorithm for supervised learning of various binary classification tasks. Further, Perceptron is also understood as an Artificial Neuron or neural network unit that helps to detect certain input data computations in business intelligence.
Basic Components of Perceptron
How does Perceptron work? Perceptron model works in two important steps as follows: Step-1 In the first step first, multiply all input values with corresponding weight values and then add them to determine the weighted sum. Mathematically, we can calculate the weighted sum as follows: ∑ wi *xi = x1*w1 + x2*w2 +… wn * xn Add a special term called bias 'b' to this weighted sum to improve the model's performance. ∑ wi *xi + b
Step-2 In the second step, an activation function is applied with the above-mentioned weighted sum, which gives us output either in binary form or a continuous value as follows: Y = f(∑ wi *xi + b)
Types of Perceptron Models Based on the layers, Perceptron models are divided into two types. These are as follows: 1. Single-layer Perceptron Model 2. Multi-layer Perceptron model
Advantages of Multi-Layer Perceptron: A multi-layered perceptron model can be used to solve complex non-linear problems. It works well with both small and large input data. It helps us to obtain quick predictions after the training. It helps to obtain the same accuracy ratio with large as well as small data.
Disadvantages of Multi-Layer Perceptron: In Multi-layer perceptron, computations are difficult and time-consuming. In multi-layer Perceptron, it is difficult to predict how much the dependent variable affects each independent variable. The model functioning depends on the quality of the training.
Characteristics of Perceptron The perceptron model has the following characteristics. 1. Perceptron is a machine learning algorithm for supervised learning of binary classifiers. 2. In Perceptron, the weight coefficient is automatically learned. 3. Initially, weights are multiplied with input features, and the decision is made whether the neuron is fired or not. 4. The activation function applies a step rule to check whether the weight function is greater than zero. 5. The linear decision boundary is drawn, enabling the distinction between the two linearly separable classes +1 and -1. 6. If the added sum of all input values is more than the threshold value, it must have an output signal; otherwise, no output will be shown.
Limitations of Perceptron Model A perceptron model has limitations as follows: The output of a perceptron can only be a binary number (0 or 1) due to the hard limit transfer function. Perceptron can only be used to classify the linearly separable sets of input vectors. If input vectors are non-linear, it is not easy to classify them properly.
Future of Perceptron The future of the Perceptron model is much bright and significant as it helps to interpret data by building intuitive patterns and applying them in the future. Machine learning is a rapidly growing technology of Artificial Intelligence that is continuously evolving and in the developing phase; hence the future of perceptron technology will continue to support and facilitate analytical behavior in machines that will, in turn, add to the efficiency of computers. The perceptron model is continuously becoming more advanced and working efficiently on complex problems with the help of artificial neurons.
Radial Basis Function Networks The popular type of feed-forward network is the radial basis function (RBF) network. It has two layers, not counting the input layer, and contrasts from a multilayer perceptron in the method that the hidden units implement computations. Each hidden unit significantly defines a specific point in input space, and its output, or activation, for a given instance based on the distance between its point and the instance, which is only a different point. The closer these two points, the better the activation.