Author: Rodolfo Mendes

  • Classification Applications: Spam Detection

    Spam detection is one of the classical applications of classification algorithms. It simply consists of assigning a received email one of two labels: spam or not spam.

    By automatically classifying received emails as spam or not spam, email services provide a cleaner and safer mail Inbox.

    The training data is obtained by collecting samples of emails kept in Inbox or archived and emails manually labeled as spam.

    Using NLP techniques like bag-of-words, for example, it’s possible to map the email content to a vector of features and then apply machine learning classification algorithms to obtain a model capable of distinguishing spam and non-spam emails.

    By deploying the model and exposing it as an API, the email software can get the classification and place the new email in the Inbox or Spam folder.

    Finally, suppose the model misclassifies some emails. In that case, we may collect the correct classification to monitor and measure the performance of our model and collect new data, so we can retrain the model if necessary.

  • Machine Learning Applications: Natural Language Processing

    Natural Language Processing is the ability of a computer to interpret human language. So NLP it’s not only about text processing but also about understanding sentences and documents.

    By giving computers the ability to interpret human language, we can build better human-machine interfaces, extract information from non-structured data, and increment automation.

    Like Apple’s Siri and Amazon’s Alexa, virtual assistants are examples of how we can use NLP to build better human-machine interfaces.

    Spam detectors are an example of how NLP can automatize the task of keeping our mailboxes clean.

    Machine Learning models are in the core of these solutions. Spam detectors and an example of how we can apply Machine Learning algorithms to build models capable of classifying an email as spam or not.

  • Machine Learning Applications: Computer Vision

    Computer Vision is a field of Artificial Intelligence that includes methods and techniques to enable computer programs to interpret and understand visual information, including images and videos.

    Typical Computer Vision tasks are image classification, object recognition, and Optical Character Recognition.

    The availability of large amounts of visual data, and computational power, combined with the advance of machine learning techniques like convolutional neural networks, allowed a giant leap in the adoption of computer vision.

    Autonomous cars, facial recognition, social networks, and many other fields use computer vision as base technology nowadays. Medicine is using computer vision in many types of diagnoses based on images.

  • When should we use Machine Learning to solve a problem?

    We use Machine Learning for problems that traditional programming can’t solve.

    In other words, we use Machine Learning for problems in which we can’t infer a logical sequence of steps or rules to solve the problem.

    For example, let’s say that we want to build a program to recognize the fruit contained in a picture. We may try to set some simple rules to identify an apple from its characteristics: red and rounded.

    However, cherries are also red and rounded, and then this program would recognize cherries as apples.

    As human beings, we also don’t use any set of rules to recognize fruits. We know by intuition. We know that an apple is an apple and how different it is from a cherry. We learn that by example.

    Thus, whenever we can’t set clear rules to solve a problem, we should try to simulate human intuition. Then, using a dataset with examples of inputs and the expected outputs, we can apply Machine Learning algorithms to them and learn by example.

  • So, what is Machine Learning?

    Machine Learning is an alternative approach to create computer programs to solve problems.

    In the traditional approach, a programmer needs to design an algorithm and writes explicit instructions for the computer to execute.

    In other words, the programmer needs to know (or design) a priori what are the required steps to produce an output y from an input x.

    In Machine Learning, a learning algorithm generates another program to solve a problem. The programmer does not need to specify an explicit algorithm.

    On the other hand, we need to provide a dataset containing examples of the required output for each input to the learning algorithm.

    The amount of data required will vary on the chosen learning algorithm and the complexity of the problem to be solved.

  • The Best Algorithm to Start with Machine Learning

    A good start point for Machine Learning is Linear Regression. By studying the Linear Regression algorithm, you will learn:

    • Supervised Learning
    • Loss Functions
    • Loss Functions minimization
    • Regularization

    These concepts are not exclusive to Linear Regression. They apply to other learning algorithms as well.

    By creating and deploying Linear Regression models, you acquire engineering skills that are common to most Machine Learning systems.

    Also, you won’t need advanced math to start with Machine Learning nor memorize Machine Learning algorithms details.

    Just a brush on Calculus and Linear Algebra will do the job. And most programming languages have Machine Learning libraries that already implemented these algorithms for you. 

    Therefore, you can focus on the engineering process of cleaning data, feature engineering, model selection, and deployment.

  • 5 Reasons to Adopt FastAPI to build REST Web Services

    5 Reasons to Adopt FastAPI to build REST Web Services

    A common way of deploying our machine learning models is exposing them through a REST Web Service API. And because our focus is not creating web tools, we prefer to adopt a well-tested, ready-to-use framework to shorten our time to market.

    When choosing a framework, we want to get the right balance between performance and productivity. Usually, as a tool is more specific and closer to the bare metal, it will perform better. However, low-level libraries leave most of the work to us. On the other hand, if a framework provides too much abstraction, it could degrade performance. 

    This article briefly discusses five reasons to adopt FastAPI as the framework for our REST API and why it offers an outstanding balance between performance and productivity. 

    (more…)
  • Basic Setup For a Machine Learning Project With Python

    Basic Setup For a Machine Learning Project With Python

    In this tutorial, we present the process for configuring a basic Machine Learning project using the Python programming language.

    (more…)
  • What are Machine Learning Tasks? (part 2)

    What are Machine Learning Tasks? (part 2)

    You can find the Part 1 of this post here:
    https://launchyourintelligentapphome.wordpress.com/2020/11/30/machine-learning-tasks-part-1/

    Unsupervised Learning

    Unsupervised Learning aims to find patterns like similarity, structure, or correlation among our data. Thus, we don’t need to select an attribute of our dataset as a target output. Typical Unsupervised Learning tasks include clustering, dimensionality reduction, and association rules discovery.

    (more…)
  • What are Machine Learning Tasks? (part 1)

    What are Machine Learning Tasks? (part 1)

    Machine Learning is a set of computational techniques that allows us to extract patterns from data. In other words, these algorithms can learn the information contained in datasets like tabular data, text, images, or even videos. However, there is no universal algorithm capable of learning every pattern from every kind of data. Each machine learning algorithm solves a specific type of learning problem. We call machine learning tasks the particular learning problems solved by machine learning algorithms.

    (more…)