Python: How to Add Key to a Dictionary

Introduction A dictionary in Python is a collection of items that store data as key-value pairs. We can access and manipulate dictionary items based on their key. Dictionaries are mutable and allow us to add new items to them. The quickest way to add a single item to a dictionary is by using referencing a dictionary’s index with a new key and assigning a value. For example, we add a new key-value pair like this: snacks[‘chocolate’] = 5 Python allows […]

Read more

Python: How to Remove a Key from a Dictionary

Introduction In this article, we’ll take a look at how to remove keys from Python dictionaries. This can be done with the pop() function, the del keyword, and with dict comprehensions. Remove a Key Using pop(key,d) The pop(key, d) function removes a key from a dictionary and returns its value. It takes two arguments, the key is removed and the optional value to return if the key isn’t found. Here’s an example of popping an element with only the required […]

Read more

Customer Sentiments Analysis of Pepsi and Coca-Cola using Twitter Data in R

This article was published as a part of the Data Science Blogathon. Introduction Coca-Cola and PepsiCo are well-established names in the soft drink industry with both in the fortune 500. The companies that own a wide spectrum of product lines in a highly competitive market have a fierce rivalry with each other and constantly competing for market share in almost all subsequent product verticals. We will analyze the sentiment of customers of these two companies with the help of 5000 […]

Read more

How to Use Optimization Algorithms to Manually Fit Regression Models

Regression models are fit on training data using linear regression and local search optimization algorithms. Models like linear regression and logistic regression are trained by least squares optimization, and this is the most efficient approach to finding coefficients that minimize error for these models. Nevertheless, it is possible to use alternate optimization algorithms to fit a regression model to a training dataset. This can be a useful exercise to learn more about how regression functions and the central nature of […]

Read more

How to Develop a Neural Net for Predicting Disturbances in the Ionosphere

It can be challenging to develop a neural network predictive model for a new dataset. One approach is to first inspect the dataset and develop ideas for what models might work, then explore the learning dynamics of simple models on the dataset, then finally develop and tune a model for the dataset with a robust test harness. This process can be used to develop effective neural network models for classification and regression predictive modeling problems. In this tutorial, you will […]

Read more

Issue #117 – Subword Segmentation and a Single Bridge Language Affect Zero-Shot Neural Machine Translation

11 Feb21 Issue #117 – Subword Segmentation and a Single Bridge Language Affect Zero-Shot Neural Machine Translation Author: Dr. Jingyi Han, Machine Translation Scientist @ Iconic Introduction Nowadays, zero-shot machine translation is receiving more and more attention due to the expensive cost of building new engines for different language directions. The underlying principle of this strategy is to build a single model that can learn to translate between different language pairs without involving direct training for such combinations. Following the […]

Read more

Hugging Face – Issue 7 – Feb 9th 2021

News New Year, New Website! Our vision for the future of machine learning is one step closer to reality thanks to the 1,000+ researchers & open-source contributors, thousands of companies & the fantastic Hugging Face team! Last month, we announced the launch of the latest version of huggingface.co and we couldn’t be more proud. 🔥 Play live with >10 billion parameters models for tasks including translation, NER, zero-shot classification, and

Read more

Introduction to Hugging Face’s Transformers v4.3.0 and its First Automatic Speech Recognition Model – Wav2Vec2

Overview Hugging Face has released Transformers v4.3.0 and it introduces the first Automatic Speech Recognition model to the library: Wav2Vec2 Using one hour of labeled data, Wav2Vec2 outperforms the previous state of the art on the 100-hour subset while using 100 times less labeled data Using just ten minutes of labeled data and pre-training on 53k hours of unlabeled data Wav2Vec2 achieves 4.8/8.2 WER Understand Wav2Vec2 implementation using transformers library on audio to text generation   Introduction Transformers has been […]

Read more

Function Optimization With SciPy

Optimization involves finding the inputs to an objective function that result in the minimum or maximum output of the function. The open-source Python library for scientific computing called SciPy provides a suite of optimization algorithms. Many of the algorithms are used as a building block in other algorithms, most notably machine learning algorithms in the scikit-learn library. These optimization algorithms can be used directly in a standalone manner to optimize a function. Most notably, algorithms for local search and algorithms […]

Read more
1 678 679 680 681 682 912