Decision Tree Classification in Python with Scikit-Learn

Articles

Experimental studies have shown that a few trees properly placed around buildings can reduce air conditioning needs by 30%, thus reducing energy consumption and bills.

Similarly, tree-based predictive modeling, implemented using decision trees, can increase a business’s profit by predicting, for example, what customers would prefer in future, thus helping them making informed decisions well in advance.

Continue reading Decision Tree Classification in Python with Scikit-Learn

Handling Background Tasks with Kotlin Coroutines in Android

Articles

Most Android apps perform one or more background tasks, often including the ones that are long-running. Examples include making a network call, an I/O request, database read/write — you get the idea.

More often than not, upon completion of these background tasks, we need to take an action that’s visible to the user. These can include:

A confirmation Toast msg — upon a successful DB call Taking the user to a new screen — upon a successful sign-in network call Showing an error msg popup —upon the failure of an I/O operation
…or anything, literally!

Continue reading “Handling Background Tasks with Kotlin Coroutines in Android”

Exploring Activation and Loss Functions in Machine Learning

Articles

In this post, we’re going to discuss the most widely-used activation and loss functions for machine learning models. We’ll take a brief look at the foundational mathematics of these functions and discuss their use cases, benefits, and limitations.

Without further ado, let’s get started!

To learn complex data patterns, the input data of each node in a neural network passes through a function the limits and defines that same node’s output value. In other words, it takes in the output signal from the previous node and converts it into a form interpretable by the next node. This is what an activation function allows us to do.

Continue reading Exploring Activation and Loss Functions in Machine Learning

Exploratory data analysis: Data characteristics and visualizations

Articles

One of the most challenging questions data scientists face is how data can bring value to a specific problem. Before jumping directly into solving a problem using machine learning and AI, it’s important to decide whether that problem is solvable or not.

And to decide this, data analytics comes into the picture. Having the proper insights on your data helps you to obtain the confidence to know that you are ready to engage a machine learning algorithm, hence making it easier to find out the best way to tackle the given problem.

Continue reading Exploratory data analysis: Data characteristics and visualizations

Ensuring app quality in Android with the new Firebase Crashlytics SDK

Articles

This is the follow-up blog post from my previous article on using Google Analytics for Firebase. While GA allows you to measure and understand user behavior, Crashlytics instead allows you to track and keep a log of all the crashes that have happened on the devices using your app—regardless of whether they choose to report the said crash or not.

Continue reading Ensuring app quality in Android with the new Firebase Crashlytics SDK

Error Handling in Swift

Articles

In this article we’ll focus on handling errors in Swift.

Proper error handling is crucial to writing effective production-level code that will get shipped with real apps. Often, while working on an app’s features, developers tend to focus on the “HAPPY PATH” (see the diagram below)—but in reality, we can’t ship any app without properly addressing different error scenarios that might occur in our code flows.

Continue reading Error Handling in Swift

Using Glide to Efficiently Load Images in Android

Articles

Displaying images is one of the most common tasks for any Android developer, but it can become challenging to manage for a variety of reasons.

The process requires loading and displaying the image, handling caches and image manipulations, loading the correct size of the image in the memory, handling network requests if you are loading the image from the internet, much testing, and many other nightmares.

Continue reading Using Glide to Efficiently Load Images in Android

Popular Mobile Machine Learning Projects to Help You Start Building

Articles

Mobile machine learning, relatively speaking, is still in its infancy. While I fully envision a future where hundreds of thousands of mobile apps will seamlessly leverage ML to provide more personalized, responsive, and immersive user experiences, I also recognize that we all have to start somewhere.

Whether you’re a mobile dev who wants to add ML to your toolkit, a hobbyist looking for a new technology to tinker with, or a product manager trying to get a sense of how mobile ML might work within your roadmap, there are some easy ways to jump right in and experiment.

Continue reading Popular Mobile Machine Learning Projects to Help You Start Building

Introduction to Python Magic Methods in Python Classes

Articles

Python magic methods are also known as dunder methods or special methods. But why such dramatic names? They’re used to overwrite or emulate the behavior of built-in functions.

They’re also easy to recognize, as they follow a particular pattern: They have double underscores as prefixes and suffixes. Hence, the name dunder means Double Underscore. They’re referred to as special methods because they add “magic” to your python classes. Common examples are __init__(), __str__(), __call__(), etc. A magic method is generally used to override operations.

Continue reading “Introduction to Python Magic Methods in Python Classes”