Posts

Hyperparameter tuning for machine learning models.

Image
When creating a machine learning model, you'll be presented with design choices as to how to define your model architecture. Often times, we don't immediately know what the optimal model architecture should be for a given model, and thus we'd like to be able to explore a range of possibilities. In true machine learning fashion, we'll ideally ask the machine to perform this exploration and select the optimal model architecture automatically. Parameters which define the model architecture are referred to as  hyperparameters  and thus this process of searching for the ideal model architecture is referred to as  hyperparameter tuning . Whereas the model parameters specify how to transform the input data into the desired output, the hyperparameters define how our model is actually structured. Unfortunately, there's no way to calculate “which way should I update my hyperparameter to reduce the loss?” (ie. gradients) in order to find the optimal model architecture; thu...

What is a Confusion Matrix in Machine Learning

Image
A confusion matrix is a technique for summarizing the performance of a classification algorithm. Classification accuracy alone can be misleading if you have an unequal number of observations in each class or if you have more than two classes in your dataset. Calculating a confusion matrix can give you a better idea of what your classification model is getting right and what types of errors it is making. In this post, you will discover the confusion matrix for use in machine learning. After reading this post you will know: What the confusion matrix is and why you need to use it. How to calculate a confusion matrix for a 2-class classification problem from scratch. How create a confusion matrix in Weka, Python and R. Classification Accuracy and its Limitations Classification accuracy is the ratio of correct predictions to total predictions made. 1 classification accuracy = correct predictions / total predictions It is often presented as a percenta...