Posts

Credit Card Fraud Detection

Image
It is important that credit card companies are able to recognize fraudulent credit card transactions so that customers are not charged for items that they did not purchase.  The datasets contains transactions made by credit cards in September 2013 by european cardholders.  This dataset presents transactions that occurred in two days, where we have 492 frauds out of 284,807 transactions. The dataset is highly unbalanced, the positive class (frauds) account for 0.172% of all transactions. It contains only numerical input variables which are the result of a PCA transformation. Unfortunately, due to confidentiality issues, we cannot provide the original features and more background information about the data. Features V1, V2, … V28 are the principal components obtained with PCA, the only features which have not been transformed with PCA are 'Time' and 'Amount'. Feature 'Time' contains the seconds elapsed between each transaction and the first transaction in the data...

Exploring Project Euler (76 & 187)

Image
 This weeks blog post will be another continuation of my Project Euler series.   As a reference, I've once again included a link to my first post on this topic where I give an overview.   This post will be dealing with two problems that I worked on, specifically problems 76 and 187.  I will give a brief overview of each problem before diving into the concepts they discuss and my methodology for solving them. Below is the first problem I will be discussing, number 76.  Initially, this seems like a large undertaking.  After all, there are nearly one million pandigital numbers, so checking each one for primality would take quite some time.  This is especially true because we would be examining large numbers first, which generally take longer to check for primality.  There are a few ways that the scope of this problem can be drastically narrowed down though.  The first and most important is by simply adding up the digits.  Since al...

Exploring Project Euler (52 & 54)

Image
This weeks blog post will be another continuation of my Project Euler series.   As a reference, I've once again included a link to my first post on this topic where I give an overview.   This post will be dealing with two problems that I worked on, specifically problems 52 and 54.  I will give a brief overview of each problem before diving into the concepts they discuss and my methodology for solving them. Below is the first problem I will be discussing, number 52.  As can be seen from the title of the problem on the Project Euler archive, this question deals with a phenomenon known as pandigital prime numbers.  This is a number which contains all of the integers from 1 to n exactly once where n is a given base and is also prime.  Zero is generally included in these numbers, but this question has specifically requested we start with one.  An example of a pandigital number under this definition would be 123, in the case that n = 3.  This ...

Exploring Project Euler (46 & 51)

Image
I've decided to continue on with the second installment of my Project Euler series in this most recent blog post, with this one conforming more to the structure that can be expected from now on.  As a reference, I've included a link to my first post on this topic where I give an overview.   This post will be dealing with two problems that I worked on, specifically problems 46 and 51.  I will give a brief overview of each problem before diving into the concepts they discuss and my methodology for solving them. Below is the first problem I will be discussing, number 46.   This problem is a bit more complex than others that I have attempted so far.  The above gives two examples that are actually quite useful in solving the problem.  Normally Project Euler problems will opt to show a more elementary version of the problem they would like us to solve.  For example they might show a summation of the numbers one through ten and then request the sum ...

Exploring Project Euler (41 & 48)

Image
This weeks blog post will be another continuation of my Project Euler series.   As a reference, I've once again included a link to my first post on this topic where I give an overview.   This post will be dealing with two problems that I worked on, specifically problems 41 and 48.  I will give a brief overview of each problem before diving into the concepts they discuss and my methodology for solving them. Below is the first problem I will be discussing, number 41.  As can be seen from the title of the problem on the Project Euler archive, this question deals with a phenomenon known as pandigital prime numbers.  This is a number which contains all of the integers from 1 to n exactly once where n is a given base and is also prime.  Zero is generally included in these numbers, but this question has specifically requested we start with one.  An example of a pandigital number under this definition would be 123, in the case that n = 3.  This ...

Exploring Project Euler (27 & 29)

Image
  I've decided to continue on with the second installment of my Project Euler series in this most recent blog post, with this one conforming more to the structure that can be expected from now on.  As a reference, I've included a link to my first post on this topic where I give an overview.   This post will be dealing with two problems that I worked on, specifically problems 27 and 29.  I will give a brief overview of each problem before diving into the concepts they discuss and my methodology for solving them. Below is the first problem I will be discussing, number 27.   This problem is a bit more complex than others that I have attempted so far.  The above gives two examples that are actually quite useful in solving the problem.  Normally Project Euler problems will opt to show a more elementary version of the problem they would like us to solve.  For example they might show a summation of the numbers one through ten and then request t...

Intro: Exploring Project Euler (#25)

Image
This blog post marks a slight change in direction for me, as well as the introduction to what I hope will become a series here: "Exploring Project Euler."  It is my intention to publish multiple posts on this topic, so if you see some variation of that title multiple times on this blog just know that (1) these are distinct but loosely related posts, and (2) this particular post is the first installment, where I will dedicate some time to introducing and explaining the concept behind this series.  I plan on linking to this blog at the beginning of each subsequent post to prevent any confusion.   To begin with, I will give an overview of what Project Euler is exactly.  It is a website dedicated to hosting a number of computation problems that can be solved using computer programming.  I will specifically be examining the archives which, as of this writing, contain 736 of these problems.  An interesting detail concerning these problems is that they are no...

Supervised vs. Unsupervised Learning

Image
  This week I have decided to take an in depth look at the two main types of machine learning, supervised and unsupervised.  While this is a topic that was covered in my recent data science course, I found myself particularly curious about it and wanted to dig in a bit deeper.  There are a few particular angles from which I would like to approach this subject, so I will lay out my plans here.  First and most importantly, I will provide a satisfactory definition for each of these two terms.  I will then examine the key differences between the two types of machine learning.   Finally, I will examine several different examples and use cases for both of these.  To provide a bit of context for the conversation, machine learning, both supervised and unsupervised, is essentially the use of an algorithm to detect certain patterns within a data set.  While it might sound like there isn't much leeway within that category for significant differences bet...

Iris Classification

Image
  In 1936, Ronald Fisher published his paper  The use of multiple measurements in taxonomic problems , the basis of which was a small data set containing some attributes of iris flowers.  The data set is very straightforward, and describes 150 flowers with four measurements each:  sepal length, sepal width, petal length, and petal width.  Additionally, it lists the species of each iris, of which there were three different types equally represented in the data.  These species are Iris setosa, Iris virginica, and Iris versicolor.  Despite the simple nature of this data set, it would go on to become one of the most commonly used within machine learning, and it remains a standard test case for classification techniques to this day.  It is also the data set that I have decided to examine for my most recent project.  Now to explain a bit about this project.  The primary impetus for it was very basic:  I have worked almost exclusively...

A/B Testing and Statistical Significance

Image
As a future data scientist currently looking for opportunities on places like LinkedIn, I read a large number job postings related to the field.  Occasionally something I see in these job posts will be a surprise to me, and this is one of those cases.  The surprise in question here was the massive amount of job postings that specifically require or recommend knowledge of A/B testing.  During my highly anecdotal and biased research into the subject while looking for job listings, this topic seemed to pop up more frequently than any other technical skill.  While I was initially surprised to see it, after giving it some thought I came to see that this topic is highly relevant and perhaps even under-appreciated by the average data scientist hopeful.  I would like to use this space to give an overview on A/B testing, clarify where it came from and why it continues to be relevant, and discuss the more technical aspects of it (especially with regard to statistical sign...

Revisiting Regression

 After discussing classification algorithms in last week's blog post, I felt that it would only be fair to also dedicate a post to explaining regression in greater detail.  Although my last two projects dealt with this type of problem, I never got around to discussing the particulars of regression.  So in this post, I will explain the primary uses for regression as well as describe a few specific methods.   The primary difference between classification and regression problems is the output they seek to calculate.  As discussed in my previous blog post, classification problems generally seek to reach a discrete output, or in other words one of a few distinct values.  The example used last time dealt with the iris dataset that I'm currently working on.  Here, several plant measurements are taken as inputs which are then used to determine which of the three species is most likely to be the output.  This is known as classification because the pre...

Clarifying Classification

This week I have decided to take an in depth look at classification problems in data science.  Since most of my recent projects have dealt with regression, it seems prudent to thoroughly examine this other equally important aspect of data science.  I will give a brief overview of classification, explain a few important algorithms, and walk through my decision-making process when choosing a topic for my next project.  Finally, I will give a brief outline of my plan for this new undertaking.   Between classification and regression, the former strikes me as a much simpler concept to wrap my head around.  An example of regression would be using historic data to predict future prices of something like a house.  Various inputs are taken into account and weighed based on the strength of their relationship to the output, which can then be used to estimate future data points.  Classification is very similar in that it also weighs inputs in this manner, but...