Image Recognition with Keras: Convolutional Neural Networks

Image recognition and classification is a rapidly growing field in the area of machine learning.

In particular, object recognition is a key feature of image classification, and the commercial implications of this are vast.

Continue reading “Image Recognition with Keras: Convolutional Neural Networks”

Keras: Regression-based neural networks

Keras is an API used for running high-level neural networks. The model runs on top of TensorFlow, and was developed by Google.

The main competitor to Keras at this point in time is PyTorch, developed by Facebook. While PyTorch has a somewhat higher level of community support, it is a particularly verbose language and I personally prefer Keras for greater simplicity and ease of use in building and deploying models.

Continue reading “Keras: Regression-based neural networks”

Cross Correlation Analysis: Analysing Currency Pairs in Python

When working with a time series, one important thing we wish to determine is whether one series “causes” changes in another. In other words, is there a strong correlation between a time series and another given a number of lags? The way we can detect this is through measuring cross correlation.

Continue reading “Cross Correlation Analysis: Analysing Currency Pairs in Python”

Decision Trees with Python

Let’s take a look at how we can construct decision trees in Python.

A decision tree is a model used to solve classification and regression tasks. As we saw in our example for R, the model allows us to generate various outcomes using the model, allowing us to make a decision with the data.

Continue reading “Decision Trees with Python”

Linear and Logistic Regression Modelling in Python

The statsmodels and sklearn libraries are frequently used when it comes to generating regression output. While these libraries are frequently used in regression analysis, it is often the case that a user needs to work with different libraries depending on the extent of the analysis.

Continue reading “Linear and Logistic Regression Modelling in Python”

How To Create a Twitter App and API Interface Via Python

This tutorial illustrates how to use a Python API to connect to a Twitter account using the Twitter library. Specifically, this API allows a user to extract high quantities of data pertaining to a specific Twitter account, as well as directly control Twitter posts from the Python platform (such as posting multiple tweets at once).

Click here to read the rest of my tutorial at Sitepoint.

ARIMA Models: Stock Price Forecasting with Python and R

ARIMA (Autoregressive Integrated Moving Average) is a major tool used in time series analysis to attempt to forecast future values of a variable based on its present value. For this particular example, I use a stock price dataset of Johnson & Johnson (JNJ) from 2006-2016, and use the aforementioned model to conduct price forecasting on this time series.

Continue reading “ARIMA Models: Stock Price Forecasting with Python and R”

PostgreSQL Databases: Connect To R and Python

PostgreSQL is a commonly used database language for creating and managing large amounts of data effectively.

Here, you will see how to:

  1. create a PostgreSQL database using the Linux terminal
  2. connect the PostgreSQL database to R using the “RpostgreSQL” library, and to Python using the “psycopg2” library

Continue reading “PostgreSQL Databases: Connect To R and Python”

K-Means Clustering: Analysing City of London Traffic

A K-Means Clustering algorithm allows us to group observations in close proximity to the mean. This allows us to create greater efficiency in categorising the data into specific segments.

In this instance, K-Means is used to analyse traffic clusters across the City of London.

Continue reading “K-Means Clustering: Analysing City of London Traffic”

MySQLdb: Connect Python and mySQL Databases Together

In a previous tutorial, we set up a financial database using a range of mySQL queries, and used such queries to create separate tables and discriminate among data in those tables. However, there are many occasions when a user needs to connect to a mySQL database through an external program. This is particularly the case with Python, which integrates quite well with mySQL through the MySQLdb library. If you are not familiar with the workings of mySQL, then I strongly recommend reading the previous tutorial, which provides a guide for the commands being used here.

Continue reading “MySQLdb: Connect Python and mySQL Databases Together”