Q-learning for beginners

The goal of this article is to teach an AI how to solve the ❄️Frozen Lake environment using reinforcement learning. We’re going to start from scratch and try to recreate the Q-learning algorithm by ourselves. We’ll not just understand how it works, but more importantly, why it was designed that way. By the end of this article, you’ll master the Q-learning algorithm and be able to apply it to other environments. It’s a cool mini-project that gives a better insight […]

Read more

Introduction to Linear Programming in Python

Linear programming is a technique to optimize any problem with multiple variables and constraints. It’s a simple but powerful tool every data scientist should master. Imagine you are a strategist recruiting an army. You have: Three resources: 🌾food, 🪵wood, and 🪙gold Three units: 🗡️swordsmen, 🏹bowmen, and 🐎horsemen. Horsemen are stronger than bowmen, who are in turn stronger than swordsmen. The following table provides the cost and power of each unit: 🗡️Swordsman 60 20 0 70 🏹Bowman 80 10 40 95 […]

Read more

Integer vs. Linear Programming in Python

Why is linear programming called that way? Both terms are confusing: Linear implies that nonlinear programming exists; Programming actually means “planning” in this context. In summary, it has nothing to do with code: linear or not. It’s about optimizing variables with various constraints. In this article, we’re gonna talk about another type of optimization: integer programming. We’ll see why a good understanding of the problem we face is necessary to choose the right solver. Finally, we will write a model […]

Read more

Graph Attention Networks: Self-Attention for GNNs

Graph Attention Networks (GATs) are one of the most popular types of Graph Neural Networks. Instead of calculating static weights based on node degrees like Graph Convolutional Networks (GCNs), they assign dynamic weights to node features through a process called self-attention. The main idea behind GATs is that some neighbors are more important than others, regardless of their node degrees. Node 4 is more important than node 3, which is more important than node 2 In this article, we will […]

Read more

GraphSAGE: Scaling up Graph Neural Networks

What do UberEats and Pinterest have in common? They both use GraphSAGE to power their recommender systems on a massive scale: millions and billions of nodes and edges. 🖼️ Pinterest developed its own version called PinSAGE to recommend the most relevant images (pins) to its users. Their graph has 18 billion connections and three billion nodes. 🍽️ UberEats also reported using a modified version of GraphSAGE to suggest dishes, restaurants, and cuisines. UberEats claims to support more than 600,000 restaurants […]

Read more

GIN: How to Design the Most Powerful Graph Neural Network

Graph Neural Networks are not limited to classifying nodes. One of the most popular applications is graph classification. This is a common task when dealing with molecules: they are represented as graphs and features about each atom (node) can be used to predict the behavior of the entire molecule. However, GNNs only learn node embeddings. How to combine them in order to produce an entire graph embedding? In this article, we will: See a new type of layer, called “global […]

Read more

Introduction to Constraint Programming in Python

Constraint Programming is a technique to find every solution that respects a set of predefined constraints. It is an invaluable tool for data scientists to solve a huge variety of problems, such as scheduling, timetabling, sequencing, etc. In this article, we’ll see how to use CP in two different ways: Satisfiability: the goal is to find one or multiple feasible solutions (i.e., solutions that respect our constraints) by narrowing down a large set of potential solutions; Optimization: the goal is […]

Read more

Optimize Your Marketing Budget with Nonlinear Programming

In the age of digital marketing, businesses face the challenge of allocating their marketing budget across multiple channels to maximize sales. However, as they broaden their reach, these firms inevitably face the issue of diminishing returns – the phenomenon where additional investment in a marketing channel yields progressively smaller increases in conversions. This is where the concept of marketing budget allocation steps in, adding another layer of complexity to the whole process. In this article, we’re going to explore the […]

Read more
1 75 76 77 78 79 908