Skip to main content

Posts

Showing posts with the label machine learning

My First Machine Learning Project Submission in Kaggle

Another post starts with you beautiful people! We have learnt basic required algorithms in our previous posts. Now the time has come to apply all our learning in a real world machine learning problem. In the next coming posts you will see step by step how to work on a machine learning project and you will wonder all the previous posts you have read till now, have all the tools to achieve our goal. For all the new members who wants to get the dataset of a real world problem, just get those datasets from our beloved site- Kaggle . In this post we will work on a prediction challenged Titanic Machine Learning  organized in Kaggle and learn how to submit our model there. Competition Description : The sinking of the RMS Titanic is one of the most infamous shipwrecks in history One of the reasons that the shipwreck led to such loss of life was that there were not enough lifeboats for the passengers and crew. Although there was some element of luck involved in surviving the sin...

Machine Learning:Naive Bayes Classifier

Another post starts with you beautiful people! Continuing our Machine Learning track today we will apply the Naive Bayes Classifier but before that we need to understand the Bayes Theorem . So let’s first understand the Bayes Theorem. Bayes Theorem works on conditional probability. Conditional probability is the probability that something will happen, given that something else has already occurred. Using the conditional probability, we can calculate the probability of an event using its prior knowledge. Below is the formula for calculating the conditional probability. where P(H) is the probability of hypothesis H being true. This is known as the prior probability. P(E) is the probability of the evidence(regardless of the hypothesis). P(E|H) is the probability of the evidence given that hypothesis is true. P(H|E) is the probability of the hypothesis given that the evidence is there. We can understand the above concept with a classic example of coin that I su...

Machine Learning-Cross Validation & ROC curve

Another post starts with you beautiful people! Hope you enjoyed my previous post about improving your model performance by  confusion metrix . Today we will continue our performance improvement journey and will learn about Cross Validation (k-fold cross validation) & ROC in Machine Learning. A common practice in data science competitions is to iterate over various models to find a better performing model. However, it becomes difficult to distinguish whether this improvement in score is coming because we are capturing the relationship better or we are just over-fitting the data. To find the right answer of this question, we use cross validation technique. This method helps us to achieve more generalized relationships. What is Cross Validation? Cross Validation is a technique which involves reserving a particular sample of a data set on which we do not train the model. Later, we test the model on this sample before finalizing the model. Here are the steps involved in...

Machine Learning::Confusion Matrix

Another post starts with you beautiful people! Thanks for your overwhelming response on my previous post about  decision trees and random forests . Today in this post we will continue our Machine Learning journey and we will discover the confusion matrix interpretation for use in machine learning. After reading this post we will know: What the confusion matrix is and why we need to use it? How to calculate a confusion matrix? How to create a confusion matrix? A confusion matrix is a technique for summarizing the performance of a classification algorithm . Classification accuracy ( Classification accuracy is the ratio of correct predictions to total predictions made ) alone can be misleading if we have an unequal number of observations in each class or if we have more than two classes in our dataset. For a quick revision remember the following formula - error rate = (1 - (correct predictions / total predictions)) * 100 The main problem with classification acc...