Machine Learning, Programming

Image for post
Image for post

Introduction

In this article, I will share a Docker-based approach for using a GPU to train chatbots built on the Rasa 2.1.x framework.

All the code to set up the environment can be found here.

This article builds on the setup described in my other article titled My VS Code Setup To Prototype Rasa Chatbots, so be sure to check it out for more context.

Motivation

Training a Rasa bot on a GPU is be a popular question in the Rasa forum (e.g., see here, here, here, and here). …


Programming

Some VS Code Features To Streamline The Development Workflow

Image for post
Image for post

Introduction

In this article, I will share my workflow for creating conversational AI agents using the Rasa framework. It uses VS Code and Docker to automate repetitive tasks and code in an OS-agnostic way.

The code to reproduce the results can be found here.

I assume the reader has a basic familiarity with Rasa and Docker.

Prerequisites

You will need to have the following software installed to follow along:

The Setup

Overview

Prototyping a chatbot on the Rasa framework revolves around 3 distinct tasks:

  • Writing (and debugging) custom actions
  • Training a model to perform NLU and dialog management
  • Chatting with the…


Explained Using TensorFlow 2.0

Image for post
Image for post

Introduction

In this article, I will explain the sequence of steps to convert a piece of text into a dense vector representation.

The code to reproduce the results can be found in this notebook.

Motivation

This idea for this article came about as a result of a discussion in the comments section of [1].

There was a question in the comments section in [1] where a reader asked how one-hot encoded vectors come into play when converting text to embeddings.

Prerequisites

Before diving into the details we need to define the following:

  • A vocabulary table
  • An embedding table

The Vocabulary Table

The role of the vocabulary…


Data Science, Probability, Statistics

Part 7: Beyond Linear Models And Generalized Linear Models

Image for post
Image for post

Introduction

Let’s divide the universe of models into two types: statistical and scientific. Both classes of models aims to understand the relationship between a target variable i.e. the y, and a set of features i.e. the x. The former aims to find statistically sound relationships based on data while the latter has the property of being able to describe a cause and effect relationship.

All the examples in this series have used statistical models e.g. GLMs to illustrate a concept in Bayesian inference. However, Bayesian inference is just as relevant to building scientific models.

This article will show how to incorporate…


Programming, Software Engineering

Image for post
Image for post
Source: https://bit.ly/3ihHJKz

Introduction

In this article, I share how I iteratively develop custom actions in Rasa using VS Code.

The code to reproduce the results described in this article can be found here.

I assume the reader is familiar with Rasa and VS Code.

Motivation

Imagine you work for a pizza establishment and are tasked with building a chatbot to order pizza.

You’ve got the intent and entity recognition part working decently well and now it’s time to move on to payment processing. This involves computing the total amount to bill based on the slots collected during the conversation and interfacing with a payment…


Data Science

Part 6: When Missing Data Leads To Biased Estimates

Image for post
Image for post

Introduction

In this article, I will show how missing values can lead to biased estimates by working through a common dataset in 4 scenarios where the missing value mechanism differs. The content in this article is based on Chapter 15 in [1].

The code to reproduce the results in this article can be found in this notebook.

I assume the reader is familiar with building generalized linear models (GLMs) and using directed acyclic graphs (DAGs) to illustrate causality.

Dataset

Suppose we want to study the effect of student diligence and homework quality. Let’s imagine that we were somehow able to assign a…


Cloud Computing, Software Engineering

When Your IT Department Bans The Creation Of Public EC2 Instances

Image for post
Image for post

Introduction

In this article, I will share a method that uses VS Code to connect to a private EC2 instance i.e. instances without a public IP address. The main idea is to connect to that instance using an SSH connection managed by AWS SSM.

I assume the reader has a basic familiarity with coding in VS Code and creating EC2 instances on AWS.

The code to reproduce the environment to run the AWS commands can be found here.

Let’s begin by understanding why one would even want to connect VS Code to a remote machine.

Why?

Connecting to a remote EC2 instance…


Natural Language Processing

Based On What I Learned At The 2nd Workshop on NLP for ConvAI

Image for post
Image for post
Source: https://sites.google.com/view/2ndnlp4convai/home

Introduction

In this article, I will summarize 5 ideas to improve the various components that make up a task-oriented conversational agent. I learned about these ideas while attending the 2nd Workshop on NLP for Conversational AI which was held in conjunction with ACL 2020.

If you are interested in the ideas I learned at the main ACL 2020 conference, check out my 5 Machine Learning Ideas I Learned At ACL 2020 article.

Overview

The following are the ideas that will be covered in this article:

  1. Building embeddings that are robust to automatic speech recognition (ASR) errors
  2. A data augmentation technique to build…


Data Science

Image for post
Image for post
Source: https://juliacon.org/2020/

Introduction

In this article, I will share 13 data science-related things I learned about Julia at JuliaCon 2020.

Overview

I’ve grouped my learnings into 4 categories namely machine learning, tools, coding in Julia, and miscellaneous. Here’s a list of them:

Machine learning

  1. How to do machine learning on tabular data
  2. The Open Machine Learning (OpenML) project
  3. Exploring graph neural networks with Julia
  4. How AlphaGo Zero works
  5. What is scientific machine learning and how Julia can help

Tools

6. IDEs for Julia

7. How to do interactive data visualizations

8. How to call Julia code from R

9. Interactive notebooks for Julia

Coding…


Data Science, Statistics

Part 5: An Overview Of The Maximum Entropy Principle

Image for post
Image for post

Introduction

In this article, I will explain what the maximum entropy principle is, how to apply it and why it’s useful in the context of Bayesian inference.

The code to reproduce the results and figures can be found in this notebook.

Overview

The maximum entropy principle is a method to create probability distributions that is most consistent with a given set of assumptions and nothing more. The rest of the article will explain what this means.

Entropy

First, we need to a way to measure the uncertainty in a probability distribution. …

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