Python: Get Number of Elements in a List

Introduction Getting the number of elements in a list in Python is a common operation. For example, you will need to know how many elements the list has whenever you iterate through it. Remember that lists can have a combination of integers, floats, strings, booleans, other lists, etc. as their elements: # List of just integers list_a = [12, 5, 91, 18] # List of integers, floats, strings, booleans list_b = [4, 1.2, “hello world”, True] If we count the […]

Read more

Issue #103 – LEGAL-BERT: The Muppets straight out of Law School

16 Oct20 Issue #103 – LEGAL-BERT: The Muppets straight out of Law School Author: Akshai Ramesh, Machine Translation Scientist @ Iconic Introduction BERT (Bidirectional Encoder Representations from Transformers) is a large-scale pre-trained autoencoding language model that has made a substantial contribution to natural language processing (NLP) and has been studied as a potentially promising way to further improve neural machine translation (NMT). “Given that BERT is based on a similar approach to neural MT in Transformers, there’s considerable interest and […]

Read more

Nearest Shrunken Centroids With Python

Nearest Centroids is a linear classification machine learning algorithm. It involves predicting a class label for new examples based on which class-based centroid the example is closest to from the training dataset. The Nearest Shrunken Centroids algorithm is an extension that involves shifting class-based centroids toward the centroid of the entire training dataset and removing those input variables that are less useful at discriminating the classes. As such, the Nearest Shrunken Centroids algorithm performs an automatic form of feature selection, […]

Read more

Quick Guide: Steps To Perform Text Data Cleaning in Python

Introduction Twitter has become an inevitable channel for brand management. It has compelled brands to become more responsive to their customers. On the other hand, the damage it would cause can’t be undone. The 140 character tweets has now become a powerful tool for customers / users to directly convey messages to brands. For companies, these tweets carry a lot of information like sentiment, engagement, reviews and features of its products and what not. However, mining these tweets isn’t easy. Why? Because, before you mine this data, you need […]

Read more

Introduction to Structuring Customer complaints explained with examples

Introduction In past, if you were not particularly happy with a service or a product, you would go to the service provider or the shop and lodge a complaint. With services-businesses going online and due to enormous scale, lodging complaints in-person may not be always possible. Electronic ways such as emails, social media and particularly websites like www.consumercomplaints.in focusing on such issues, are widely used platforms to vent out the anger as well as publicizing the issue in expectancy of […]

Read more

Novel object captioning surpasses human performance on benchmarks

Consider for a moment what it takes to visually identify and describe something to another person. Now imagine that the other person can’t see the object or image, so every detail matters. How do you decide what information is important and what’s not? You’ll need to know exactly what everything is, where it is, what it’s doing in relation to other objects, and note other attributes like color or position of objects in the foreground or background. This exercise shows […]

Read more

Simple NLP in Python With TextBlob: Tokenization

Introduction The amount of textual data on the Internet has significantly increased in the past decades. There’s no doubt that the processing of this amount of information must be automated, and the TextBlob package is one of the fairly simple ways to perform NLP – Natural Language Processing. It provides a simple API for diving into common natural language processing (NLP) tasks such as part-of-speech tagging, noun phrase extraction, tokenization, sentiment analysis, classification, translation, and more. No special technical prerequisites […]

Read more

Add Legend to Figure in Matplotlib

Introduction Matplotlib is one of the most widely used data visualization libraries in Python. Typically, when visualizing more than one variable, you’ll want to add a legend to the plot, explaining what each variable represents. In this article, we’ll take a look at how to add a legend to a Matplotlib plot. Creating a Plot Let’s first create a simple plot with two variables: import matplotlib.pyplot as plt import numpy as np fig, ax = plt.subplots() x = np.arange(0, 10, […]

Read more

Automated Machine Learning (AutoML) Libraries for Python

AutoML provides tools to automatically discover good machine learning model pipelines for a dataset with very little user intervention. It is ideal for domain experts new to machine learning or machine learning practitioners looking to get good results quickly for a predictive modeling task. Open-source libraries are available for using AutoML methods with popular machine learning libraries in Python, such as the scikit-learn machine learning library. In this tutorial, you will discover how to use top open-source AutoML libraries for […]

Read more

Multi-Core Machine Learning in Python With Scikit-Learn

Many computationally expensive tasks for machine learning can be made parallel by splitting the work across multiple CPU cores, referred to as multi-core processing. Common machine learning tasks that can be made parallel include training models like ensembles of decision trees, evaluating models using resampling procedures like k-fold cross-validation, and tuning model hyperparameters, such as grid and random search. Using multiple cores for common machine learning tasks can dramatically decrease the execution time as a factor of the number of […]

Read more
1 747 748 749 750 751 906