ML Unit-5
ML Unit-5
In an MLP, the perceptron units are organized into layers, typically including an
input layer, one or more hidden layers, and an output layer. Each layer is
composed of multiple perceptron units, also called neurons. Neurons in one
layer are connected to neurons in the next layer, forming a directed graph-like
structure.
The input layer receives the input data, which can be in the form of feature
vectors or raw data. Each input neuron represents a feature, and the values of
these neurons are passed to the next layer. The hidden layers perform
computations on the input data by applying an activation function to the
weighted sum of the inputs. The output layer produces the final result or
prediction based on the computations performed in the hidden layers.
MLPs are known as feedforward neural networks because the information flows
only in one direction, from the input layer through the hidden layers to the
output layer. The weights and biases associated with the connections between
neurons are adjusted during the training process using algorithms such as
backpropagation, which involves calculating the gradients of the error with
respect to the network's parameters and updating them accordingly to minimize
the error.
MLPs have been widely used in various domains, including image and speech
recognition, natural language processing, and financial modeling. While they
have been successful in many applications, more advanced architectures, such
as convolutional neural networks (CNNs) for image processing and recurrent
Backpropagation has been a key algorithm in training neural networks and has
played a significant role in the success of deep learning.
Radial Basis Function (RBF) networks are a type of neural network that use
radial basis functions as activation functions. They are known for their ability to
approximate complex functions and are particularly useful in applications such
as function approximation, classification, and pattern recognition.
However, RBF networks may suffer from issues such as overfitting and the
choice of the number and positions of the centers. Regularization techniques
and careful selection of the centers can help mitigate these challenges.
Decision tree learning is a popular machine learning technique used for both
classification and regression tasks. It builds a predictive model in the form of a
tree structure, where internal nodes represent features or attributes, branches
represent decisions or rules, and leaf nodes represent the output or predicted
values.
However, decision trees are prone to overfitting, especially when the tree
becomes too complex or the dataset has noisy or irrelevant features. Techniques
like pruning, setting proper stopping criteria, or using ensemble methods like
random forests can help mitigate overfitting.
In decision tree algorithms, impurity measures are used to evaluate the quality
of a split at each node. The impurity measure helps determine which feature to
use for splitting and where to place the resulting branches. Here are some
commonly used impurity measures for evaluating splits in decision trees:
ID3:
1. Start with the entire training dataset and calculate the entropy (or
impurity) of the target variable.
2. For each attribute, calculate the information gain by splitting the data
based on that attribute. Information gain is calculated as the difference between
the entropy of the target variable before and after the split.
It's worth noting that the ID3 algorithm has some limitations, such as its
tendency to overfit on training data and its inability to handle missing values.
Various extensions and improvements, such as C4.5 and CART, have been
developed to address these limitations and build upon the concepts introduced
by ID3.
C4.5:
C4.5 retains the top-down, greedy approach of ID3 but incorporates several
enhancements. Here are the key features and improvements of C4.5:
C4.5 has become widely adopted due to its improved handling of various data
types and ability to handle missing values. It has had a significant impact on
decision tree learning and has paved the way for further enhancements, such as
the C5.0 algorithm.
C4.5 retains the top-down, greedy approach of ID3 but incorporates several
enhancements. Here are the key features and improvements of C4.5:
C4.5 has become widely adopted due to its improved handling of various data
types and ability to handle missing values. It has had a significant impact on
decision tree learning and has paved the way for further enhancements, such as
the C5.0 algorithm.
Pruning the tree:
Pruning is a technique used to prevent decision trees from overfitting, where the
model becomes too complex and overly specialized to the training data. Pruning
involves removing or collapsing nodes in the decision tree to simplify it, leading
to improved generalization and better performance on unseen data. Here are two
common approaches to pruning decision trees:
The decision tree approach has several strengths and weaknesses that should be
considered when applying this algorithm to a given problem. Let's explore
them: