Skip to main content

Posts

Decision Tree - Information Gain & Gain Ratio

ID3 uses information gain as its attribute selection measure. The attribute with the highest information gain is chosen as the splitting attribute for node N. The average amount of information needed to identify the class label, where p i - non zero probability p i is estimated by |C i,D | / |D| Info(D) is also known as the entropy of D. The required more information is derived from where  |D j | / |D| - weight of jth partition Information gain is defined as the difference between the original information requirement and the new requirement. Gain(A) = Info(D) - Info A (D) The information gain measure is biased toward tests with many outcomes. C4.5, a successor of ID3, uses an extension to information gain known as gain ratio , which attempts to overcome this bias. Gain ratio differs from information gain, which measures the information with respect to classification that is acquired based on the same partitioning. Gain ration can be calculated by The attribute with the maxim...

Decision Tree Classification

 A decision tree is a flowchart-like tree structure. The topmost node in a tree is the root node. The each internal node (non-leaf node) denotes a test on an attribute and each branch represents an outcome of the test. The each leaf node (or terminal node) holds a class label. Decision trees can handle multidimensional data.  Some of the decision tree algorithms are Iterative Dichotomiser (ID3), C4.5 (a successor of ID3), Classification and Regression Trees (CART). Most algorithms for decision tree induction  follow a top-down approach.  The tree starts with a training set of tuples and their associated class labels. The algorithm is called with data partition, attribute list, and attribute selection method, where the data partition is the complete set of training tuples and their associated class labels. The splitting criterion is determined by attribute selection method which indicates the splitting attribute that may be splitting point or splitting subset. Attribu...

Classification Concept

 Classification is a form of data analysis that extracts models describing important data classes. The models predict categorical class labels for the given data. Fraud detection, Target marketing are few examples for classification. The classification models are constructed through learning steps which is called training phase.  The learning step builds the classifier by analyzing the training set made up of data sets and their associated class labels. The class label attribute is discrete-valued and unordered. As the class labels of training data are provided, the learning is called supervised learning. The accuracy of a classifier on a given test set is the percentage of test set that are correctly classified.

Matrix Eigenvalues & Eigenvectors

The process of finding an unknown scalar, λ and a nonzero vector, x for a given non zero square matrix, A of dimension n x n is called matrix eigenvalue or eigenvalue. Ax = λ x The λ and x which satisfies the above equation is called eigen value and eigenvector. Ax should be proportional to x. The multiplication will produce a new vector that will have the same or opposite direction as the original vector. The set of all the eigenvalues of A is called the  spectrum of A. The largest of the absolute values of the  eigenvalues of A is called the spectral radius of A. To determine eigenvalue and eigenvector, the equation can be written in matrix notation, (A - λI)x = 0 By Cramer's theorem,  the  homogeneous linear system of equations has a  nontrivial solution if and only if the corresponding determinant of the coefficients is zero. A - λI is called characteristic matrix and D( λ) is characteristic determinant of A. The above equation is called characteristic ...

Logarithmic Properties

The logarithm is the inverse function to exponentiation. It means the logarithm of a given number x is the exponent to which another fixed number, the base b, must be raised, to produce that number x. eg.,  log b  x = y which is same to b y = x log 2 8 = 3 same as 2 3 = 8 The following are the properties of logarithm. log b xy = log b x + log b y log b (x/y) = log b x - log b y log b x n = n log b x log b a = log c a / log c b log b a = 1 / log a b Some basic values of logarithm log b 1 = 0 log b b = 1 log b b 2 = 2