How to Learn Python for Machine Learning

Python has become a de facto lingua franca for machine learning. It is not a difficult language to learn, but if you are not particularly familiar with the language, there are some tips that can help you learn faster or better. In this post, you will discover what the right way to learn a programming language is and how to get help. After reading this post, you will know: The right mentality to learn Python for use in machine learning […]

Read more

Some Language Features in Python

The Python language syntax is quite powerful and expressive. Hence it is concise to express an algorithm in Python. Maybe this is the reason why it is popular in machine learning, as we need to experiment a lot in developing a machine learning model. If you’re new to Python but with experience in another programming language, you will sometimes find Python syntax understandable but weird. If you are used to writing in C++ or Java and then transitioning to Python, […]

Read more

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

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
1 2 3 4