RSSAmplifier

Blog

Searching Gradients with Huy Nguyen

everyhue.meRSS feed ↗15 posts

Latest posts

Preserving Hồ Ngọc Đức's Vietnamese Dictionary Dataset

The Vietnamese Language has a rich and evolving history. For many years I have relied upon Hồ Ngọc Đức’s online Vietnamese Dictionary project as a reference for my studies as well as used it in various language processing tasks. It saddened me to learn that his homepage at the University of Leipzig was no longer being hosted. The project itself started in 1999 and has been publically…

Why Uncertainty Matters in Deep Learning and How to Estimate It

More trustworthy models For safety critical systems and infrastructure, you need to know when to trust a model’s prediction and when you should be more cautious about its output. The problem with conventional deep neural networks is that they only provide point-estimates which are single predictive values given some input data. What you don’t get with these models is a measure of how…

Are your models calibrated?

A calibration curve (sometimes called a “reliability diagram”) tells you whether your model’s predicted probabilities accurately reflect the real chance of your model being right. It’s very common for neural networks to overestimate the confidence in their predictions, and this type of diagram helps us detect when this phenomenon occurs. Here’s an example: On the…

Similarity search 101 - Part 2 (Fast retrieval with vp-trees)

This is the 2nd article in a two part series on similarity search. See part 1 for an overview of the subject. In this second installment of my series on similarity search we’ll figure out how to improve on the speed and efficiency of querying our database for nearest neighbors using a data structure known as a “vantage point tree”. We previously used a brute force approach by…

Similarity search 101 - Part 1 (overview)

In my work applying machine learning technologies, finding “similar” items is one of the most common challenges that people come to my team with: “Can you find me the image that looks like this other image?” “Which webpage is similar to this webpage?” “Which song matches this audio clip I’ve recorded?” To more formally define the similarity…

Faster Numpy Dot Product for Multi-dimensional Arrays

When installed and linked correctly against a blas implementation like ATLAS or OpenBlas, numpy’s dot product can run incredibly fast. What I hadn’t known until recently is that for some special cases, you can perform dot products an order of magnitude faster just by calling the underlying blas routines directly. In order to do so, I’ve written a module called fastdot , whose…

The JSON Streaming Record (JSRec) data format

I’m inventing a new data format (as blasphemous as it sounds). It’s flexible, human readable, easy to produce, and best of all, nearly impossible to screw up parsing. I’m doing it to replace CSV files because you shouldn’t have to worry about quoting, escaping, or deciding whether your “comma” sepearated values turn out to really mean semicolon or even worse,…

A Guide to Analyzing Python Performance

Introduction While it’s not always the case that every Python program you write will require a rigorous performance analysis, it is reassuring to know that there are a wide variety of tools in Python’s ecosystem that one can turn to when the time arises. Analyzing a program’s performance boils down to answering 4 basic questions: How fast is it running? Where are the speed…

My Tmux Setup

If you do a lot of context switching between projects, recreating your terminal environment & window layout can easily eat up hours of your day. Here’s a quick tip to help you create and manage persistent terminal workspaces so that with a few keystrokes, you can jump straight back into whatever you were working on as quickly as possible. How it works The whole idea behind this setup is to…

GGPlot2 theme for Matplotlib

John Hunter, creator of MatPlotlib , originally designed it’s color scheme to be familiar to Matlab users. As it turns out, the color scheme works well for publication material but doesn't work so great for viewing visualizations on the web. I find the default styling for graphs produced using ggplot2 aesthetically pleasing for this purpose, so I spent some time over the weekend to refine…

Don't Hash Your Secrets

Ben Adida suggests that you don't hash your secrets . That means that if you know SHA1(secret || message), then you can compute SHA1(secret || message || ANYTHING), which is a valid signature for message || ANYTHING. So to break this system, you just need to see one signature. Not being a cryptography expert, I was blown away by his article. At the core of his post is the idea that given a hash…

Bashmarks: Directory Bookmarks in the Shell

EDIT 2010-07-01 : This post is left up for context / historical posterity. I've packaged up a shell script to allow you to save and jump to commonly used directories. It's called bashmarks and it has tab completion functionality built-in. Visit the link below to learn more. Bashmarks Do not use the stuff below Before I wrote this script, It felt like I spent half of my time in terminal cd-ing…

Toward an Ergonomic Vim Setup

Here s a brief tip: Rebind your ctrl key to capslock . Save yourself from the pain. The contorted positions we developers strain our hands into will eventually break them - Emacs & Textmate users, you know what I m talking about. Do yourself a favor and rebind your control key to capslock. You can do this under MacOSX by going to System Preferences > Keyboard & Mouse > Keyboard > Modifier Keys .…

About

Bashmarks - directory bookmarks for the shell

Bashmarks is a commandline utility that allows you to save and jump to commonly used directories. github repository installation git clone git://github.com/huyng/bashmarks.git cd bashmarks && make install add source ~/.local/bin/bashmarks.sh from within your ~.bash_profile or ~/.bashrc file shell commands s <bookmark_name> - Saves the current directory as "bookmark_name" g <bookmark_name> - Goes…