Python tutorials

Top 5 Data Science GitHub Repositories and Reddit Discussions (January 2019)

Introduction There’s nothing quite like GitHub and Reddit for data science. Both platforms have been of immense help to me in my data science journey. GitHub is the ultimate one-stop platform for hosting your code. It excels at easing the collaboration process between team members. Most leading data scientists and organizations use GitHub to open-source their libraries and frameworks. So not only do we stay up-to-date with the latest developments in our field, we get to replicate their models on our […]

Read more

Comprehensive Guide to Text Summarization using Deep Learning in Python

Introduction “I don’t want a full report, just give me a summary of the results”. I have often found myself in this situation – both in college as well as my professional life. We prepare a comprehensive report and the teacher/supervisor only has time to read the summary. Sounds familiar? Well, I decided to do something about it. Manually converting the report to a summarized version is too time taking, right? Could I lean on Natural Language Processing (NLP) techniques […]

Read more

A Comprehensive Guide to Build your own Language Model in Python!

Overview Language models are a crucial component in the Natural Language Processing (NLP) journey These language models power all the popular NLP applications we are familiar with – Google Assistant, Siri, Amazon’s Alexa, etc. We will go from basic language models to advanced ones in Python here   Introduction We tend to look through language and not realize how much power language has. Language is such a powerful medium of communication. We have the ability to build projects from scratch […]

Read more

Create your Own Image Caption Generator using Keras!

Overview Understand how image caption generator works using the encoder-decoder Know how to create your own image caption generator using Keras   Introduction Image caption Generator is a popular research area of Artificial Intelligence that deals with image understanding and a language description for that image. Generating well-formed sentences requires both syntactic and semantic understanding of the language. Being able to describe the content of an image using accurately formed sentences is a very challenging task, but it could also […]

Read more

Python: How to Flatten a List of Lists

Introduction A list is the most flexible data structure in Python. Whereas, a 2D list which is commonly known as a list of lists, is a list object where every item is a list itself – for example: [[1,2,3], [4,5,6], [7,8,9]]. Flattening a list of lists entails converting a 2D list into a 1D list by un-nesting each list item stored in the list of lists – i.e., converting [[1, 2, 3], [4, 5, 6], [7, 8, 9]] into [1, […]

Read more

Python: Slice Notation on Tuple

Introduction The term slicing in programming usually refers to obtaining a substring, sub-tuple, or sublist from a string, tuple, or list respectively. Python offers an array of straightforward ways to slice not only these three but any iterable. An iterable is, as the name suggests, any object that can be iterated over. In this article, we’ll go over everything you need to know about Slicing Tuples in Python. Slicing a Tuple in Python There are a couple of ways to […]

Read more

Change Tick Frequency in Matplotlib

Introduction Matplotlib is one of the most widely used data visualization libraries in Python. Much of Matplotlib’s popularity comes from its customization options – you can tweak just about any element from its hierarchy of objects. In this tutorial, we’ll take a look at how to change the tick frequency in Matplotlib. We’ll do this on the figure-level as well as the axis-level. How to Change Tick Frequency in Matplotlib? Let’s start off with a simple plot. We’ll plot two […]

Read more

How to Sort a Dictionary by Value in Python

Introduction A dictionary in Python is a collection of items that stores data as key-value pairs. In Python 3.7 and later versions, dictionaries are sorted by the order of item insertion. In earlier versions, they were unordered. Let’s have a look at how we can sort a dictionary on basis of the values they contain. Sort Dictionary Using a for Loop We can sort a dictionary with the help of a for loop. First, we use the sorted() function to […]

Read more

6 Practices to enhance the performance of a Text Classification Model

Introduction A few months back, I was working on creating a sentiment classifier for Twitter data. After trying the common approaches, I was still struggling to get good accuracy on the results. Text classification problems and algorithms have been around for a while now. They are widely used for Email Spam Filtering by the likes of Google and Yahoo, for conducting sentiment analysis of twitter data and automatic news categorization in google alerts. However, while dealing with enormous amount of text […]

Read more

Extracting information from reports using Regular Expressions Library in Python

Introduction Many times it is necessary to extract key information from reports, articles, papers, etc. For example names of companies – prices from financial reports, names of judges – jurisdiction from court judgments, account numbers from customer complaints, etc. These extractions are part of Text Mining and are essential in converting unstructured data to a structured form which are later used for applying analytics/machine learning. Such entity extraction uses approaches like ‘lookup’, ‘rules’ and ‘statistical/machine learning’. In ‘lookup’ based approaches, […]

Read more
1 142 143 144 145 146 182