Logical operators don’t return boolean values in Python
Here's a quick question for you. If you "and" two values in Python, what is the type of the return? A boolean, right? Nope.
TIL
Here's a quick question for you. If you "and" two values in Python, what is the type of the return? A boolean, right? Nope.
Every now and then, I’m working on a project, when I’m amazed by the sheer power of reusable code. This happened with my last project, where I became interested in how the Arab media reports news compared to its American counterparts.
Deep learning-based comuter vision models like Inception Net have achieved state-of-the-art performance on image recognition. However, that doesn't mean that they don't have blindspots and biases. Here's a few of them, along with interactive aplications for you to try it out yourself.
Deep learning remains somewhat of a mysterious art even for frequent practitioners, because we usually run complex experiments on large datasets, which obscures basic relationships between dataset, hyperparameters, and performance. The goal of this notebook is to provide some basic intuition of deep neural networks by running very simple experiments on small datasets that help understand trends…
We all know that deep neural networks (DNNs) are great for image recognition and speech processing. What about good ol' numerical datasets? I compared DNNs to other standard ML algorithms on many public classification datasets from the UCI ML repository, and here are the results.
If you have an imbalanced dataset, the typical strategies to train a classifier are to oversample the minority class, or modify the loss function to penalize mis-classifications of the minority class more than mis-classifications of the majority class. If you think about it, these methods are mathematically equivalents?
Today, I spent some understanding the Expectation-Maximization (EM) algorithm. It was the 8th or 9th time I had tried to understand it, because even though there are many nice tutorials about it online, about three quarters of the way through them, my eyes start to glaze over the math, and I end up leaving with only a “high-level understanding” of the algorithm. Today, I think I truly get it, and…
In the Node2Vec paper, the authors propose that an embedding for every node in a graph can be learned by trying to maximize the dot product between the feature representation of a node and its neighbors, as determined by BFS (useful for structural equivalence) or DFS (useful for learning homophily, or finding nodes that are connected together).