Category Archives: Programming

Analysis of 2012 Presidential Election Polls

Here, my goal is to predict 2012 US Presidential election results based on multiple polls. I used online data for polls and Electoral College votes. As long as the links do not change, these codes should work on any machine. This … Continue reading

Posted in Data Science, Programming | Tagged , , | Comments Off on Analysis of 2012 Presidential Election Polls

Predict 2012 Presidential Elections Based on Occupation and Employer

My code and description can be found here: http://nbviewer.ipython.org/github/sergulaydore/DataScienceProjects/blob/master/Predict2012Elections.ipynb

Posted in Data Science, Programming | Tagged , , , , | Comments Off on Predict 2012 Presidential Elections Based on Occupation and Employer

Data Loading, Storage and file formats using Pandas

Pandas is a very useful library in Python for data analysis. Here is my python notebook script to get started with pandas. I used Wes McKinney’s book “Python for data analysis”. Chapter 6 – Data Loading, Storage and file formats

Posted in Data Science, Programming | Tagged , , , | Comments Off on Data Loading, Storage and file formats using Pandas

Getting Started with pandas

Pandas is a very useful library in Python for data analysis. Here is my python notebook script to get started with pandas. I used Wes McKinney’s book “Python for data analysis”. Chapter 5 – Getting started with pandas  

Posted in Data Science, Programming | Tagged , , | Comments Off on Getting Started with pandas

How to install IPython Notebook in MAC OSX?

IPython Notebook seems to a new way of scientific computing with fantastic features. It is very easy to install for Linux but might be a headache for MAC OS X (at least for me). After searching and failing many times … Continue reading

Posted in Programming | Comments Off on How to install IPython Notebook in MAC OSX?

The Perceptron

The perceptron is  one of the earliest  supervised classification algorithms in machine learning. It was introduced by Frank Rosenblatt in 1958 [1]. The idea of perceptron was inspired by the neurons in the brain. The inputs of the perceptron that … Continue reading

Posted in Data Science, Programming | Tagged , , , , , | Comments Off on The Perceptron

C++ Programming: Functions (Lesson 5)

Let’s have a look at this simple code to understand syntax of functions in C++. #include using namespace std; int add(int x, int y) { return x+y; } int main() { int result = add(1,2); cout << "The result is … Continue reading

Posted in Programming | Tagged , | Comments Off on C++ Programming: Functions (Lesson 5)

C++ Programming: Loops (Lesson 4)

C++ has three kinds of loops: while, for, and do-while. Here is a program demonstrating while loops by displaying numbers from 0 to 9. #include using namespace std; int main() { int i=0; while (i<10) { cout << i <<"n"; … Continue reading

Posted in Programming | Tagged , | Comments Off on C++ Programming: Loops (Lesson 4)

C++ Programming: If Statements (Lesson 3)

If statements allow you to control whether a program enters a section of code or not based on whether a condition is true or false. The structure of an if statement is simple: if() { Execute everything in this block … Continue reading

Posted in Programming | Tagged , | Comments Off on C++ Programming: If Statements (Lesson 3)

C++ Programming: User Interaction and Working with Variables (Lesson 2)

In programming, input, as well as other data, is stored in variables. There are several different types of variables that store different kinds of information; when you tell the compiler you are declaring a variable, you must include the data … Continue reading

Posted in Programming | Tagged , , , , | Comments Off on C++ Programming: User Interaction and Working with Variables (Lesson 2)