Articles About Machine Learning

Python Classes and Their Use in Keras

Classes are one of the fundamental building blocks of the Python language, which may be applied in the development of machine learning applications. As we shall see, the Python syntax for developing classes is simple and can be applied to implement callbacks in Keras.  In this tutorial, you will discover the Python classes and their functionality.  After completing this tutorial, you will know: Why Python classes are important How to define and instantiate a class and set its attributes  How […]

Read more

Understanding Traceback in Python

When an exception occurs in a Python program, often a traceback will be printed. Knowing how to read the traceback can help you easily identify the error and make a fix. In this tutorial, we are going to see what the traceback can tell you. After completing this tutorial, you will know: How to read a traceback How to print the call stack without an exception What is not shown in the traceback Kick-start your project with my new book […]

Read more

Running and Passing Information to a Python Script

Running your Python scripts is an important step in the development process because it is in this manner that you’ll get to find out if your code works as you intended it to. Also, it is often the case that we would need to pass information to the Python script for it to function. In this tutorial, you will discover various ways of running and passing information to a Python script. After completing this tutorial, you will know: How to […]

Read more

Anomaly Detection with Isolation Forest and Kernel Density Estimation

Anomaly detection is to find data points that deviate from the norm. In other words, those are the points that do not follow expected patterns. Outliers and exceptions are terms used to describe unusual data. Anomaly detection is important in a variety of fields because it gives valuable and actionable insights. An abnormality in an MR imaging scan, for instance, might indicate tumorous region in the brain, while an anomalous readout from a manufacturing plant sensor could indicate a broken […]

Read more

Python Debugging Tools

In all programming exercises, it is difficult to go far and deep without a handy debugger. The built-in debugger, pdb, in Python is a mature and capable one that can help us a lot if you know how to use it. In this tutorial, we are going to see what the pdb can do for you as well as some of its alternatives. In this tutorial, you will learn: What a debugger can do How to control a debugger The […]

Read more

More Special Features in Python

Python is an awesome programming language! It is one of the most popular languages for developing AI and machine learning applications. With a very easy-to-learn syntax, Python has some special features that distinguish it from other languages. In this tutorial, we’ll talk about some unique attributes of the Python programming language. After completing this tutorial, you will know: Constructs for list and dictionary comprehension How to use the zip and enumerate functions What are function contexts and decorators What is […]

Read more

Comments, Docstrings, and Type Hints in Python Code

The source code of a program should be readable to humans. Making it run correctly is only half of its purpose. Without a properly commenting code, it would be difficult for one, including the future you, to understand the rationale and intent behind the code. It would also make the code impossible to maintain. In Python, there are multiple ways to add descriptions to the code to make it more readable or make the intent more explicit. In the following, […]

Read more

Duck Typing, Scope, and Investigative Functions in Python

Python is a duck typing language. It means the data types of variables can change as long as the syntax is compatible. Python is also a dynamic programming language. Meaning we can change the program while it runs, including defining new functions and the scope of the name resolution. These give us not only a new paradigm in writing Python code but also a new set of tools for debugging. In the following, we will see what we can do […]

Read more

Easier Experimenting in Python

When we work on a machine learning project, we quite often need to experiment with multiple alternatives. Some features in Python allow us to try out different options without much effort. In this tutorial, we are going to see some tips to make our experiments faster. After finishing this tutorial, you will learn: How to leverage a duck-typing feature to easily swap functions and objects How making components into drop-in replacements for  each other can help experiments run faster Kick-start […]

Read more

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
1 19 20 21 22 23 226