In a previous example, we saw how we can use the MLPClassifier to classify data using a neural network. However, what if we wish to use a neural network to solve a regression problem; i.e. one where the dependent variable […]

Continue reading »# Category: Python

# Neural Networks in Python: MLP Classifiers

Neural networks are commonly used to solve classification problems, as we saw with the wine detection example in R. If you read the last post on logistic regressions (which I recommend you do first as this example follows directly on […]

Continue reading »# Logistic Regression Modelling in Python

Previously, we saw how to run a linear regression in Python using statsmodels and sklearn. In this type of regression, we dealt with interval variables, ones where there is order and there is a meaningful difference between the two values. […]

Continue reading »# statsmodels and sklearn: Generating linear regressions 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 […]

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

Continue reading »# kNN: K-Nearest Neighbours Algorithm in R and Python

The purpose of a k-nearest neighbours algorithm (kNN) is to classify information. kNN is one of the most simplistic machine learning algorithms, and is very useful when it comes to solving classification problems. kNN: R Let’s start off by examining […]

Continue reading »# psycopg2: Connect Python to PostgreSQL Database – Part II

In a previous tutorial, we looked at how to create a simple PostgreSQL database of temperature across different world cities. The PostgreSQL database was created through a Linux terminal, and the same was then connected to R to import data/commit […]

Continue reading »# Python: Implementing a K-Means Algorithm With sklearn

The below is an example of how sklearn in Python can be used to develop a k-means clustering algorithm. The purpose of k-means clustering is to be able to partition observations in a dataset into a specific number of clusters […]

Continue reading »# Implement an ARIMA model using statsmodels

In a previous tutorial, I elaborated on how an ARIMA model can be implemented using R. The model was fitted on a stock price dataset, with a (0,1,0) configuration being used for ARIMA. Here, I detail how to implement an […]

Continue reading »# Normal Distributions, Monte Carlo Simulations and Random Walks

A key concept in dealing with statistical data is the law of large numbers; meaning that the more observations we have across any particular dataset, the more that the data will resemble a normal distribution where the majority of results […]

Continue reading »