Command Line Arguments for Your Python Script

Working on a machine learning project means we need to experiment. Having a way to configure your script easily will help you move faster. In Python, we have a way to adapt the code from a command line. In this tutorial, we are going to see how we can leverage the command line arguments to a Python script to help you work better in your machine learning project. After finishing this tutorial, you will learn Why we would like to […]

Read more

A Gentle Introduction to Serialization for Python

Serialization refers to the process of converting a data object (e.g., Python objects, Tensorflow models) into a format that allows us to store or transmit the data and then recreate the object when needed using the reverse process of deserialization. There are different formats for the serialization of data, such as JSON, XML, HDF5, and Python’s pickle, for different purposes. JSON, for instance, returns a human-readable string form, while Python’s pickle library can return a byte array. In this post, […]

Read more

A Gentle Introduction to Unit Testing in Python

Unit testing is a method for testing software that looks at the smallest testable pieces of code, called units, which are tested for correct operation. By doing unit testing, we can verify that each part of the code, including helper functions that may not be exposed to the user, works correctly and as intended. The idea is that we are independently checking each small piece of our program to ensure that it works. This contrasts with regression and integration testing, […]

Read more

Exploring the Python Ecosystem

Python is a neat programming language because its syntax is simple, clear, and concise. But Python would not be so successful without its rich third-party libraries. Python is so famous for data science and machine learning that it has become a de facto lingua franca just because we have so many libraries for those tasks. Without those libraries, Python is not too powerful. After finishing this tutorial, you will learn: Where the Python libraries are installed in your system What is […]

Read more

Data Visualization in Python with matplotlib, Seaborn, and Bokeh

Data visualization is an important aspect of all AI and machine learning applications. You can gain key insights into your data through different graphical representations. In this tutorial, we’ll talk about a few options for data visualization in Python. We’ll use the MNIST dataset and the Tensorflow library for number crunching and data manipulation. To illustrate various methods for creating different types of graphs, we’ll use Python’s graphing libraries, namely matplotlib, Seaborn, and Bokeh. After completing this tutorial, you will […]

Read more

A Guide to Obtaining Time Series Datasets in Python

Datasets from real-world scenarios are important for building and testing machine learning models. You may just want to have some data to experiment with an algorithm. You may also want to evaluate your model by setting up a benchmark or determining its weaknesses using different sets of data. Sometimes, you may also want to create synthetic datasets, where you can test your algorithms under controlled conditions by adding noise, correlations, or redundant information to the data. In this post, we’ll […]

Read more

A Guide to Getting Datasets for Machine Learning in Python

Compared to other programming exercises, a machine learning project is a blend of code and data. You need both to achieve the result and do something useful. Over the years, many well-known datasets have been created, and many have become standards or benchmarks. In this tutorial, we are going to see how we can obtain those well-known public datasets easily. We will also learn how to make a synthetic dataset if none of the existing datasets fits our needs. After […]

Read more

A Gentle Introduction to Decorators in Python

When working on code, whether we know it or not, we often come across the decorator design pattern. This is a programming technique to extend the functionality of classes or functions without modifying them. The decorator design pattern allows us to mix and match extensions easily. Python has a decorator syntax rooted in the decorator design pattern. Knowing how to make and use a decorator can help you write more powerful code. In this post, you will discover the decorator […]

Read more

Scientific Functions in NumPy and SciPy

import datetime   import tensorflow as tf import matplotlib.pyplot as plt import numpy as np import numba   def tSNE(X, ndims=2, perplexity=30, seed=0, max_iter=500, stop_lying_iter=100, mom_switch_iter=400):     “”“The t-SNE algorithm   Args: X: the high-dimensional coordinates ndims: number of dimensions in output domain     Returns:         Points of X in low dimension     ““”     momentum =

Read more

Massaging Data Using Pandas

When we talk about managing data, it is quite inevitable to see data presented in tables. With column header, and sometimes with names for rows, it makes understanding data easier. In fact, it often happens that we see data of different types staying together. For example, we have quantity as numbers and name as strings in a table of ingredients for a recipe. In Python, we have the pandas library to help us handle tabular data. After finishing this tutorial, […]

Read more
1 2 3 4