A Real Machine Learning App from scratch with Dash

Source: https://unsplash.com/photos/rmWtVQN5RzU

In the following article, I will present a machine learning app I created from scratch.

What I wanted to build was an app that would take as input a brain MRI image. From there, the app would return a prediction, saying if there is or not a tumor present on the image.

I found the idea interesting because the app could be used by anyone to determine the presence (or not) of a brain tumor. No need for coding skills or knowledge about brains.

To achieve this goal, three steps needed to be achieved, i.e. the creation of a model…

Solving MDPs using reinforcement learning


In this article, I will show you how to implement the value iteration algorithm to solve a Markov Decision Process (MDP). It is one of the first algorithm you should learn when getting into reinforcement learning and artifical intelligence.

Reinforcement learning is an area of Machine Learning that focuses on having an agent learn how to behave/act in a specific environment. MDPs are simply meant to be the framework of the problem, the environment itself.

MDPs are composed of 5 elements.

  1. A set of states. This represents all the possible locations for the agent in the environment.
  2. A set of…

Showing you multiple ways to reach out to people using Python

Source: https://unsplash.com/photos/3Mhgvrk4tjM

In this tutorial, I will show you multiple ways of sending emails using Python. This can be useful in many projects or cases where you need to share any type of information to different people in a fast, easy and secure way.

The library is the most popular one when it comes to sending email with Python. It creates a Simple Mail Transfer Protocol (SMTP) session object that can be used to send mail to any internet machine.

Before sending an email using this module, you need to change a setting in your email account. Indeed, you need to “enable…

Using GPT-2 to generate quality song lyrics

Source: https://unsplash.com/photos/gUK3lA3K7Yo

Natural Language Generation (NLG) has made incredible strides in recent years. In early 2019, OpenAI released GPT-2, a huge pretrained model (1.5B parameters) capable of generating text of human-like quality.

Generative Pretrained Transformer 2 (GPT-2) is, like the name says, based on the Transformer. It therefore uses the attention mechanism, which means it learns to focus on previous words that are most relevant to the context in order to predict the next word (for more on this, go here).

The goal of this article is to show you how you can fine-tune GPT-2 to generate context relevant text, based on…

Hands-on Tutorials

Using numbers to show that fans do make a difference

Source: https://unsplash.com/photos/GB9XKDZWwp0

In most countries, people are no longer allowed into stadiums, at least not in their normal capacity.

Any fan, of any sport, will tell you that watching games without fans is just not the same. There is a missing element.

While the spectacle might not be the same, this unlikely situation has allowed us to see one thing. Does home field advantage still matter if fans are not there?

We know through years of observation that home field advantage is a real thing in any sport. …

Arsenal has been declining ever since it’s departure in 2018

Source: https://unsplash.com/photos/SuBb_SiEEM8

Form is temporary, class is permanent. That used to be the saying at Arsenal. The club just lost 7 of its last 9 games. They just lost their 4th home game in a row. They haven’t scored more than one goal in a game since October.

Im not sure if that form can still be classified as temporary. What’s certain is that class is gone.

Most Arsenal fans were attracted to the club because of it’s offensive, free flowing football. Through all the defeats, humiliations, and disappointments, at least, it was always exciting. …

Understanding the revolutionary NLP deep learning model

Source: https://unsplash.com/photos/vuMTQj6aQQ0

If you are here to learn more about the movies, sadly, this is not the article you are looking for. I love Optimus Prime and Megatron as much as the next guy, but here, I will be talking about Transformer, the deep learning model!

The Transformer was first introduced in 2017 in the paper “Attention is all you need”, which can be found right here. You will see, the title is revealing.

It really has revolutionized the NLP world, so you should definitely learn all about it. The issue? It’s not the easiest model to understand.

Thankfully, in this article…

Data cleaning, EDA, feature engineering and Machine Learning with Pyspark

Source: https://unsplash.com/photos/Q1p7bh3SHj8

Pyspark is a Python API that supports Apache Spark, a distributed framework made for handling big data analysis. It’s an amazing framework to use when you are working with huge datasets, and it’s becoming a must-have skill for any data scientist.

In this tutorial, I will present how to use Pyspark to do exactly what you are used to see in a Kaggle notebook (cleaning, EDA, feature engineering and building models).

I used a database containing information about customers for a telecom company. The objective is to predict which clients will leave (Churn) in the upcoming three months. …

Because the 5 traditional positions are no longer enough

Source: https://unsplash.com/photos/UegcSdRtmlg

About 5 months ago, I stumbled upon this article on TheScore. The summary: the traditional 5 positions are no longer enough to describe NBA players. The game has changed after all. The authors come up with a way to classify players in 9 classes, based on the way they play the game.

In this article, I will take another shot at classifying players in various clusters, depending on what they do on the court. However, I will do it using data science and more precisely the K-Means clustering.

I will also take a deeper look at what makes a winning…

Because Virtual Environments can and will save you headaches

Source: https://unsplash.com/photos/wl5AypUmamo

In early 2020, I was working on a school project using Keras/Tensorflow. Everything was working great. Then, I shared my code with my teammate so he could start working on it too. However, for some reason, it was not working for him.

We spent hours trying to figure it out. Eventually, we realized that the problem was caused by the fact we had different packages versions installed. Once we managed to make it all work, I decided to find a way to avoid this problem occuring ever again.

That’s where virtual environments come in.

If you are already familiar with…

François St-Amant

Master’s degree student and aspiring data scientist

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