Levenshtein Distance and Text Similarity in Python

Introduction Writing text is a creative process that is based on thoughts and ideas which come to our mind. The way that the text is written reflects our personality and is also very much influenced by the mood we are in, the way we organize our thoughts, the topic itself and by the people we are addressing it to – our readers. In the past it happened that two or more authors had the same idea, wrote it down separately, […]

Read more

Accessing the Twitter API with Python

Introduction One thing that Python developers enjoy is surely the huge number of resources developed by its big community. Python-built application programming interfaces (APIs) are a common thing for web sites. It’s hard to imagine that any popular web service will not have created a Python API library to facilitate the access to its services. A few ideas of such APIs for some of the most popular web services could be found here. In fact, “Python wrapper” is a more […]

Read more

Enhancing Python with Custom C Extensions

Introduction This article is going to highlight the features of CPython’s C API which is used to build C extensions for Python. I will be going over the the general workflow for taking a small library of fairly banal, toy example, C functions and exposing in to a Python wrapper. You might be wondering… Python is a fantastic high level language capable of just about anything, why would I want to deal with messy C code? And I would have […]

Read more

Introduction to Neural Networks with Scikit-Learn

What is a Neural Network? Humans have an ability to identify patterns within the accessible information with an astonishingly high degree of accuracy. Whenever you see a car or a bicycle you can immediately recognize what they are. This is because we have learned over a period of time how a car and bicycle looks like and what their distinguishing features are. Artificial neural networks are computation systems that intend to imitate human learning capabilities via a complex architecture that […]

Read more

The Best Python Books for All Skill Levels

Just about every year is a good year to be investing in Python learning, whether you are a beginner or an expert. Employment opportunities are opening for Python developers in fields beyond traditional web development. An IBM blog post reports that Python is now the dominant language in many data science and machine learning careers. We charted data from DataScienceCentral to see how well Python is doing in this new field. Here is the result. As you can see, it […]

Read more

Linear Regression in Python with Scikit-Learn

There are two types of supervised machine learning algorithms: Regression and classification. The former predicts continuous value outputs while the latter predicts discrete outputs. For instance, predicting the price of a house in dollars is a regression problem whereas predicting whether a tumor is malignant or benign is a classification problem. In this article we will briefly study what linear regression is and how it can be implemented using the Python Scikit-Learn library, which is one of the most popular […]

Read more

Phonetic Similarity of Words: A Vectorized Approach in Python

In an earlier article I gave you an introduction into phonetic algorithms, and shows their variety. In more detail we had a look at the edit distance, which is also known as the Levenshtein Distance. This algorithm was developed in order to calculate the number of letter substitutions to get from one word to the next. As you may have already noted in the previous article, there are different methods to calculate the sound of a word like Soundex, Metaphone, […]

Read more

K-Nearest Neighbors Algorithm in Python and Scikit-Learn

The K-nearest neighbors (KNN) algorithm is a type of supervised machine learning algorithms. KNN is extremely easy to implement in its most basic form, and yet performs quite complex classification tasks. It is a lazy learning algorithm since it doesn’t have a specialized training phase. Rather, it uses all of the data for training while classifying a new data point or instance. KNN is a non-parametric learning algorithm, which means that it doesn’t assume anything about the underlying data. This […]

Read more

Python Metaclasses and Metaprogramming

Imagine if you could have computer programs that wrote your code for you. It is possible, but the machines will not write all your code for you! This technique, called metaprogramming, is popular with code framework developers. This is how you get code generation and smart features in many popular frameworks and libraries like Ruby On Rails or TensorFlow. Functional programming languages like Elixir, Clojure, and Ruby are noted for their metaprogramming capabilities. In this guide, we show you how […]

Read more

Reading Files with Python

To work with stored data, file handling belongs to the core knowledge of every professional Python programmer. Right from its earliest release, both reading and writing data to files are built-in Python features. In comparison to other programming languages like C or Java it is pretty simple and only requires a few lines of code. Furthermore, no extra module has to be loaded to do that properly. Basics of Files in Python The common methods to operate with files are […]

Read more
1 46 47 48 49 50 54