Portfolio

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”

Kalman Filter: Modelling Time Series Shocks with KFAS in R

We have already seen how time series models such as ARIMA can be used to make time series forecasts. While these models can prove to have high degrees of accuracy, they have one major shortcoming – they do not account for “shocks”, or sudden changes in a time series. Let’s see how we can potentially alleviate this problem using a model known as the Kalman Filter.

Continue reading “Kalman Filter: Modelling Time Series Shocks with KFAS in R”

Working with panel data in R: Fixed vs. Random Effects (plm)

Panel data, along with cross-sectional and time series data, are the main data types that we encounter when working with regression analysis.

Continue reading “Working with panel data in R: Fixed vs. Random Effects (plm)”

Robust Regressions: Dealing with Outliers

It is often the case that a dataset contains significant outliers – or observations that are significantly out of range from the majority of other observations in our dataset. Let us see how we can use robust regressions to deal with this issue.

Continue reading “Robust Regressions: Dealing with Outliers”

Variance-Covariance Matrix: Stock Price Analysis in R (corpcor, covmat)

The purpose of a variance-covariance matrix is to illustrate the variance of a particular variable (diagonals) while covariance illustrates the covariances between the exhaustive combinations of variables.

Continue reading “Variance-Covariance Matrix: Stock Price Analysis in R (corpcor, covmat)”