Text Mining and Sentiment Analysis with Keras

When it comes to text mining, sentiment analysis – or gauging sentiment of a particular chunk of text based on its words – is becoming increasingly popular within this area.

Here is how we can conduct sentiment analysis using Keras.

Continue reading “Text Mining and Sentiment Analysis with Keras”

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”

K-Nearest Neighbors (KNN): Solving Classification Problems

In this tutorial, we are going to use the K-Nearest Neighbors (KNN) algorithm to solve a classification problem. Firstly, what exactly do we mean by classification?

Classification across a variable means that results are categorised into a particular group. e.g. classifying a fruit as either an apple or an orange.

Continue reading “K-Nearest Neighbors (KNN): Solving Classification Problems”

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”

Huber vs. Ridge Regressions: Accounting for Outliers

In a previous tutorial, we saw how we can use Huber and Bisquare weightings to adjust for outliers in a dataset.

These weightings allow us to adjust our regression analysis to give less weight to extreme values.

Continue reading “Huber vs. Ridge Regressions: Accounting for Outliers”

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”

Voice Recognition with Python (speech_recognition and PyAudio)

Python has quite a handy library called speech_recognition, which we can use to create a program where a user’s voice can be transcribed into text.

Let’s have a look at how we can do this. Note that I’m using Python version 3.6.0 at the time of writing to run the below.

Continue reading “Voice Recognition with Python (speech_recognition and PyAudio)”

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.