Tips

Tips and tricks based on first hand experience

python code snippets - cheat sheet

My Python Cheat Sheet

These are some python code snippets that I use very often. Topics include: list manipulation, json manipulation, data frame and etc. Python List Manipulation Concatenate two python lists listone = [1,2,3] listtwo = [4,5,6] joinedlist = listone + listtwo Convert a python string to a list of characters word = ‘abc’ the_list = list(word) JSON …

My Python Cheat Sheet Read More »

how to preprocess text data for machine learning and nlp

Text Preprocessing for Machine Learning & NLP

Learn what text preprocessing is, the different techniques for text preprocessing and a way to estimate how much preprocessing you may need. For those interested, I’ve also made some text preprocessing code snippets in python for you to try. Now, let’s get started!

How to compute precision and recall for a multi-class classification problem

In evaluating multi-class classification problems, we often think that the only way to evaluate performance is by computing the accuracy which is the proportion or percentage of correctly predicted labels over all predictions.  However, we can always compute precision and recall for each class label and analyze the individual performance on class labels or average the …

How to compute precision and recall for a multi-class classification problem Read More »