# Category Archives: Machine Learning

## Machine Learning

What is Machine Learning? The word ‘Machine’ in Machine Learning means computer, as you would expect. So how does a machine learn? Given data, we can do all kind of magic with statistics: so can computer algorithms. These algorithms can solve problems including prediction, classification and clustering. A machine learning algorithm will learn from new […]

All of the Machine Learning algorithms take data as input, but what they want to achieve is different. They can be broadly be classified in a few groups based on the task they are designed to solve. These tasks are: classification, regression and clustering. Related course: Data Science and Machine Learning with Python – Hands […]

## Training and test data

Training and test data are common for supervised learning algorithms. Given a dataset, its split into training set and test set. In Machine Learning, this applies to supervised learning algorithms. Related course: Data Science and Machine Learning with Python – Hands On! Training and test data In the real world we have all kinds of […]

## bag of words

If we want to use text in Machine Learning algorithms, we’ll have to convert then to a numerical representation. It should be no surprise that computers are very well at handling numbers. We convert text to a numerical representation called a feature vector. A feature vector can be as simple as a list of numbers. […]

## bag of words euclidian distance

If we represent text documents as feature vectors using the bag of words method, we can calculate the euclidian distance between them. Vectors always have a distance between them, consider the vectors (2,2) and (4,2). We can use the euclidian distance to automatically calculate the distance. Related course: Data Science and Machine Learning with Python […]

## Decision tree

A decision tree is one of the many machine learning algorithms. A decision tree is a decision tool. Its similar to a tree-like model in computer science. (root at the top, leaves downwards). In this article we’ll implement a decision tree using the Machine Learning module scikit-learn. Its one of the many machine learning modules, […]

## Decision tree visual example

A decision tree can be visualized. A decision tree is one of the many Machine Learning algorithms. It’s used as classifier: given input data, it is class A or class B? In this lecture we will visualize a decision tree using the Python module pydotplus and the module graphviz Related course: Machine Learning A-Z: Hands-On […]

## kmeans clustering algorithm

Do you have observed data? You can cluster it automatically with the kmeans algorithm. In the kmeans algorithm, k is the number of clusters. Clustering is an unsupervised machine learning task. Everything is automatic. Related course: Data Science and Machine Learning with Python – Hands On! kmeans data We always start with data. This is […]

## kmeans clustering centroid

The KMeans clustering algorithm can be used to cluster observed data automatically. All of its centroids are stored in the attribute cluster_centers. In this article we’ll show you how to plot the centroids. Related course: Data Science and Machine Learning with Python – Hands On! KMeans cluster centroids We want to plot the cluster centroids […]

## kmeans elbow method

Find k for kmeans using the elbow method? The KMeans algorithm can cluster observed data. But how many clusters (k) are there? The elbow method finds the optimal value for k (#clusters).   Related course: Data Science and Machine Learning with Python – Hands On! Determine optimal k The technique to determine K, the number […]