Tuesday, April 22, 2014

What is Data Science?

Like many other technical terminologies, data science has also become a buzz-word that everyone seems to be using it and at the same time no one really knows what it means exactly. I came to this definition a while ago, thought it is nice to blog about it.

The data science terminology was (kind of) invented by Cleveland W.S. (2001) as part of an action plan that focused on technical areas of statistics. Data science was defined by its action, as the single biggest stimulus of new tools and theories of data science is the analysis of data to solve problems. Cleveland stated that historically, the field of data science has concerned itself only with one corner of this large domain — computational algorithms posed in terms of the subject matter under investigation.

Provost F. and Fawcett T. (2013) define data science as a “set of fundamental principles that support and guide the principled extraction of information and knowledge from data. Possibly the most closely related concept to data science is data mining—the actual extraction of knowledge from data via technologies that incorporates these principles“. According to F. and Fawcett T (2013), main application areas of data science include targeted marketing, online advertising and recommendations for cross selling.


  • Provost, F., & Fawcett, T. (2013). Data Science and its Relationship to Big Data and Data-Driven Decision Making. Big Data, 1(1), 51-59.
  • Cleveland, W. S. (2001). Data science: an action plan for expanding the technical areas of the field of statistics. International statistical review, 69(1), 21-26.

Wednesday, April 16, 2014

Python Developer Interview Questions: Fizz-Buzz

Fizz-buzz is a very basic interview question mainly asked to see if a developer/programmer can actually code or not. Nothing too sophisticated.I was asked to code a FizzBuzz today for the second time in my life and I thought why not to blog about it, since it seems to be getting popular to ask from developers. To make it a bit challenging for myself, I coded it in Python, since I have the least skill in coding Python, although I think it is a sexy language.

Interview Question: Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”."

__author__ = 'amir'

for x in range(1, 100):
    if x % 15 == 0:
        print 'fizzbuzz'
    elif x % 3 == 0:
        print 'fizz'
    elif x % 5 == 0:
        print 'buzz'
        print x

Remark: Just remember that a number that is both divisible by three and five is also divisible by 15. Another note is that you need to check if the divisible by 15 condition first of all, if not they end up in divisible by 3 and 5 condition. Makes sense, right? :)