In this article, I am going to delve into some metrics used to measure how well classifiers do their job. So after reading this article you will know how to evaluate classification models and know the difference between the different metrics that we can encounter evaluating classifier models.

In the image shown above, we can see a classification problem. How can we know if this model is good or bad? Let’s delve into this in the following paragraphs.

The most common metric.

The goal of each classifier is to assign one label to one input according to their characteristics, in other words, classifiers can…

This article will show how to use TensorFlow Embedding Layers to implement a movie review text classification.

Processing Text Data

As we know, most machine learning algorithms cannot understand characters, words, or sentences. They can only take numbers as inputs. However, the nature of text data is unstructured and noisy, this characteristic makes it impossible to feed machine learning models directly with text data.

There are many ways to convert text data into numerical features, and the process to follow will depend on the kind of feature engineering technique selected.

One How Encoding

One of the most popular techniques for feature engineering is One Hot Encoding

In this article, I will show you how to use the popular Python library scikit-learn to implement a movie review classifier.

First, we will see how to prepare text data to feed a machine learning model, next, we will see how to use scikit-learn to implement a classification model, and, finally, we will discuss the model performance.

Data overview.

The dataset I will use can be found in the following link. It is a binary dataset for sentiment classification, divided into two folders: positive and negative reviews, each of them containing 1000 reviews. Since the movie reviews are text files, we need…

In this post, I will show you how to use callbacks with TensorFlow. These callbacks will allow you to have more control over your training process.

Table of Content.

  • Introduction
  • What is a callback?
  • Implementing callbacks.
  • Using custom callbacks
  • Conclusions.


Training a machine learning model implies, in most cases, dedicating a lot of time and computational resources to this task. For this reason, it is important to control the training process at a deeper level. So, you will spend less time fitting the model.

For example, let’s say that you set up the training process with a specific number of epochs, but after…

In this article, I am going to talk about deploying machine learning models in production environments, using APIs.

Why is Machine Learning deployment so important?

Based on my experience as a data scientist, I realized that many Machine Learning models remain in the research stage, so many hours of training are wasted since these models never see the production environment. Very often these models die in the Jupyter Notebook in which they were created. This scenario is in contrast to the traditional software development process which has a long time of improvements.

Then, unlike conventional software development, the Machine Learning field has little time and still doesn’t…

This problem was taken from the specialization course TensorFlow: Advanced Techniques on Coursera.

Table of Content

  1. Introduction.
  2. Dataset Overview.
  3. Exploratory Data Analysis.
  4. Data preparation.
  5. Building the model.
  6. Train the model.
  7. Predictions.
  8. Conclusions.


Many times, it is necessary to predict the behavior of several variables using the same features. One possible approach involves creating as many models as variables we need to predict. However, this approach is not the most efficient.

Using the functional TensorFlow API we are able to create models with several inputs and outputs, at the same time, so we can create one model that is able to predict the behavior…

Manuel Gil

I am an engineer and I am passionate about the computer science field. I have two years working as a Data scientist, using data to solve industrial problems.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store