Posts

Linear Regression with multiple variables

  Linear Regression with multiple variables: The multiple linear regression explains the relationship between  one continuous dependent variable  ( y ) and  two or more independent variables  ( x 1,  x 2,  x 3… etc) . Note that it says  CONTINUOUS   dependant variable. Since   y   is the sum of   beta ,   beta 1   x 1,   beta 2   x 2   etc , the resulting   y   will be a number, a continuous variable, instead of a “yes”, “no” answer (categorical). For example, with linear regression, I would be trying to find out   how much Decibels of  noise is being produced, and not if it’s noisy or not (Noisy | Not).

Linear Regression with single variable

Image
Linear Regression Algorithm From Andrew Ng’s Machine learning course The above diagram conveniently gives a brief overview of the Linear Regression Algorithm. We feed our learning algorithm with some data set(training set), which then outputs a function called Hypothesis. Hypothesis approximates a target function for mapping inputs to outputs. For linear regression in one variable, our hypothesis function is of the form — h(x) = θ0 + θ1x where θ0 and θ1 are the parameters.

Concept Learning

  Concept Learning We learn our surrounding through 5 senses — eye, ear, nose, tongue and skin. We learn a lot of things during the entire life. Some of them are based on experience and some of them are based on memorization. On the basis of that we can divide learning methods into five types: Rote Learning (memorization):  Memorizing things without knowing the concept/ logic behind them. Passive Learning (instructions):  Learning from a teacher/expert. Analogy (experience):  Learning new things from our past experience. Inductive Learning (experience):  On the basis of past experience, formulating a generalized concept. Deductive Learning:  Deriving new facts from past facts. Tom Mitchell defines the concept learning as  —  “Problem of searching through a predefined space of potential hypotheses for the hypothesis that best fits the training examples” For detailed concept learning :

Data Preprocessing

  Data Preprocessing In any Machine Learning process, Data Preprocessing is that step in which the data gets transformed, or  Encoded , to bring it to such a state that now the machine can easily parse it. In other words, the  features  of the data can now be easily interpreted by the algorithm. For detailed data preprocessing :

Decision Tree

Decision Tree Classification Algorithm A 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. In a Decision tree, there are two nodes, which are the  Decision Node  and  Leaf Node.  Decision nodes are used to make any decision and have multiple branches, whereas Leaf nodes are the output of those decisions and do not contain any further branches. The decisions or the test are performed on the basis of features of the given dataset. It is a graphical representation for getting all the possible solutions to a problem/decision based on given conditions. It is called a decision tree because similar to a tree, it starts with the root node, which e...

Naive Bayes Classifier

Image
Naive Bayes algorithm It is classification technique Bayes’ Theorem with an assumption of independence among predictors. In simple terms, a Naive Bayes classifier assumes that the presence of a particular feature in a class is unrelated to the presence of any other feature. For example, a fruit may be considered to be an apple if it is red, round, and about 3 inches in diameter. Even if these features depend on each other or upon the existence of the other features, all of these properties independently contribute to the probability that this fruit is an apple and that is why it is known as ‘Naive’. Naive Bayes model is easy to build and particularly useful for very large data sets. Along with simplicity, Naive Bayes is known to outperform even highly sophisticated classification methods. Bayes theorem provides a way of calculating posterior probability P(c|x) from P(c), P(x) and P(x|c). Look at the equation below: Above, P ( c|x ) is the posterior probability of  class ...

K-nearest neighbors (KNN)

K-nearest neighbors (KNN) algorithm is a type of supervised ML algorithm which can be used for both classification as well as regression predictive problems. However, it is mainly used for classification predictive problems in industry.  The following two properties would define KNN well  Lazy learning algorithm   − KNN is a lazy learning algorithm because it does not have a specialized training phase and uses all the data for training while classification. Non-parametric learning algorithm   − KNN is also a non-parametric learning algorithm because it doesn’t assume anything about the underlying data. Working of KNN Algorithm K-nearest neighbours (KNN) algorithm uses ‘feature similarity’ to predict the values of new datapoints which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. We can understand its working with the help of the following steps − Step 1  − For implementing any algor...