Python’s doctest: Document and Test Your Code at Once

Are you interested in writing usage examples for your code that work as documentation and test cases simultaneously? If your answer is yes, then Python’s doctest module is for you. This module provides a testing framework that doesn’t have too steep a learning curve. It’ll allow you to use code examples for two purposes: documenting and testing your code. Apart from allowing you to use your code’s documentation for testing the code itself, doctest will help you keep your code […]

Read more

What went wrong with Tay, the Twitter bot that turned racist?

Of late, we’ve been hearing about Twitter bots in the news due to the whole saga of Elon Musk buying Twitter. One of the reasons the deal took so long to pan out was Musk’s concerns about the number of spam bots running rampant on the platform. While Musk believes that bots make up more than 20% of accounts on Twitter, Twitter states that the number of bots on its platform is marginal. So, what’s this Twitter bot thing? A […]

Read more

The Business Case For AI: A Review by Customer Contact Week Conference & Magazine

“Stop using AI.” This is how Dr. Kavita Ganesan, an AI expert since 2005, begins her book The Business Case for AI. In a refreshingly direct tone, Ganesan goes on to deliver the news that, yes, you probably need to rethink your use of AI and, no, it does not need to be this difficult or this expensive. While AI is a necessary tool for businesses to remain competitive, many find themselves worried about the investment, and the consequences– what […]

Read more

What are Precision & Recall in Machine Learning?

Precision and recall are commonly used metrics to measure the performance of machine learning models or AI solutions in general. It helps understand how well models are making predictions. Let’s use an email SPAM prediction example. Say you have a model that looks at an email and decides whether it’s SPAM or NOT SPAM. To see how well it’s doing, you want to compare it with human-generated labels, which we will call the actual labels. To demonstrate this, the table […]

Read more

My “Aha Moment” About Python

I’ve been programming for about 20 years now, and my “aha moment” with python came to me last night. It was a pretty simple one — I started with Python 2 because that’s what we’re using at work (and it was free). But after some trial and error, I figured out how to get started quickly with Python 3.

Read more
1 147 148 149 150 151 936