Posts

Showing posts with the label supervised learning

Machine Learning: Supervised Learning 2

Image
In the previous post, I talked about Linear Regression which predicts continuous values. But In the real world most of the time we are classifying things to distinguish them from one another. The next algorithm I am going to talk about is a classification algorithm. Naive Bayes It is a really fast classification algorithm based on the Bayes theorem. It works on the Bayes Theorem of probability. Bayes Theorem We make two assumptions when we use this algorithm. One is that each feature is independent of each other and all predictors have an equal effect on the outcome.  What this algorithm does is it first converts the data into a frequency table and calculates the conditional probability for each event. Final function that is used to give prediction is  Types of Naive Bayes Classifiers: Multinomial Naive Bayes: This is mostly used for document classification problem, i.e whether a document belongs to the category of sports, politics, technology...

Machine Learning: Supervised Learning 1

Image
Supervised Learning is a technique in which we train the computer using labeled data which means that some data is already tagged in with the correct answers. We will be implementing these algorithms in python. Here are the steps you need to follow to set up your computer for machine learning. If you don't want to go for deep learning right now you can skip step 4,5,6. The first algorithm we are going to see is: Linear Regression Regression deals with predicting continuous values. It helps to estimate target values such as prices, temperature, population, etc. Linear regression is the simplest form of regression. The predictions that this model will provide in the future will all fall on the regression line that is formed during the training. Let's take an example of predicting income. So, our input data (X) will contain features (columns of information). These features can be numerical (eg. Years of Experience) or categorical (eg. Role). We...