We have already seen how a neural network can be used to solve classification problems by attempting to group data based on its attributes. However, what if we wish to solve a regression problem using a neural network? i.e. one […]

Continue reading »# Category: R

# neuralnet: Train and Test Neural Networks Using R

A neural network is a computational system frequently employed in machine learning to create predictions based on existing data. In this example, we will train and test a neural network using the neuralnet library in R. A typical neural network […]

Continue reading »# Cumulative Binomial Probability with R and Shiny

In conducting probability analysis, the two variables that take account of the chance of an event happening are N (number of observations) and λ (lambda – our hit rate/chance of occurrence in a single interval). When we talk about a […]

Continue reading »# plyr and dplyr: Data Manipulation in R

The purpose of the plyr and dplyr libraries in R is to manipulate data with ease. As we’ve seen in a previous post, there are various methods of wrangling and summarising data in R. However, wouldn’t it be great if […]

Continue reading »# tidytext: Word Clouds and Sentiment Analysis in R

The tidytext library in R is one of the most innovative I’ve come across within the language. tidytext is the cornerstone library for developing text mining algorithms in R (developed by Julia Silge and David Robinson). We will see how […]

Continue reading »# 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 […]

Continue reading »# 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 […]

Continue reading »# Creating functions and using lapply in R

Functions are used to simplify a series of calculations. For instance, let us suppose that there exists an array of numbers which we wish to add to another variable. Instead of carrying out separate calculations for each number in the […]

Continue reading »# Creating maps in R using ggplot2 and maps libraries

Here is how we can use the maps, mapdata and ggplot2 libraries to create maps in R. In this particular example, we’re going to create a world map showing the points of Beijing and Shanghai, both cities in China. For […]

Continue reading »# K-Means Clustering and Unsupervised Learning: Python and R

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. Supervised vs. Unsupervised Learning An important distinction in data science is […]

Continue reading »