How to frame a Product Goal as a Machine Learning problem


This post was originally published by Kurtis Pykes at Towards Data Science - Medium Tagged

Reducing the risk of tackling machine learning projects

Photo by Rolands Zilvinskis on Unsplash

Some things are best taught through experience. Such is the case for many tasks in Machine Learning. Machine Learning allows us to learn from large amounts of data and use mathematical formulations to solve problems by optimizing for a given objective. In contrast, traditional programming expects a programmer to write step-by-step instructions to describe how to solve a problem.

“ML is particularly useful to build systems for which we are unable to define a heuristic solution”

— Emmanuel Ameisen, Building Machine Learning Powered Applications. Page 3.

Despite its power, a major caveat with Machine Learning is that it introduces a level of uncertainty that’s not expected in rule-based systems. This is down to the fact that Machine Learning is based on pattern recognition. Therefore, it’s important to recognize what aspects of a product would gain from ML, then consider how to formulate a learning goal that reduces the risk of users having a bad experience.

Determining The Products Feasibility

Machine Learning is able to solve a range of problems, but distinguishing which problems are solvable is extremely hard. Since we can’t determine whether an ML project will be a success beforehand, our best bet is to reduce the risk involved with tackling such a project, and most importantly, starting with the product goal.

Once we have a product goal, the next objective is to decide the best way to solve it. Where I previously went wrong is that I’d instantly have my mind set on using Machine Learning because I wanted to build interesting methods. A better approach is to consider all the available options to solve the problem, regardless of whether ML is needed or not.

Machine Learning is not always needed!

If we do decide to use an ML approach, we must decide whether they are appropriate for the product. The book Building Machine Learning Powered Applications suggests 2 steps to do this:

  • (1) Frame the Product Goal in an ML paradigm — For a single goal, there may be multiple formulations.
  • (2) Evaluate the ML Feasibility — Consider all the potential framings and start one the one deemed to be the simplest.

This process requires us to examine the data and model aspect of a problem.

Framing The Product

For this scenario, I’m going to pretend we want to build a writing assistant. Our writing assistant should be able to accept Medium articles written by writers and improve them so that they are written better. Given this formulation, we’d have to first tackle what is meant by the word “better”. We can do this by asking more questions until we come to a clear definition of what the product goal of our writing assistant is.

Here’s an example of a clearer formulation:

Medium is a social media platform for writers to share insights and readers to learn from writers insights. However, some writers go viral for the articles they write, even without a large following, and one reason for this is based on how well the article is written. This is unfortunate for the writers that have extremely useful insights but aren’t the best at articulating themselves through writing. Consequently, our goal is to build a writing assistance that can help writers to write better articles.

Becoming The Algorithm

Before we implement a Machine Learning algorithm, there’s no harm in attempting to solve a problem manually. This way, we can gain a sense of what sort of problems your learning algorithm would have to successfully solve. In our scenario, we’d have to consider how we would go about improving articles the article’s readability, and odds of going viral.

One approach may involve research to identify some attributes that can be used to help Medium bloggers write more clearly. Examples of such features are:

  • Prose Simplicity: Prose means language follows the natural patterns of everyday speech. Hence, any work that follows a basic grammatical structure is said to be prose. We can take this feature to establish a criterion on the appropriate sentence and word length, to enable us to recommend changes where required.
  • Tone: Tone is in reference to the writer’s attitude towards the reader and the subject of the message. By evaluating the language we can measure the polarity of the article and determine whether an article strikes the emotional cords of the reader since these are articles that tend to do well in some context.
  • Structural Features: The structure describes how text is arranged on the page and how all the parts come together to form the article. Writers typically like to structure their articles deliberately as this has an effect on the reader.

Note: We’d also want to speak to viral Medium writers to understand some of the writing tricks they use to make their work go viral.

By identifying and generating useful features, we are able to build a simple solution that relies on these features to provide recommendations to our readers. Covering this process may be boring because it does not involve Machine Learning, but it’s crucial for coming up with a quick baseline that other experiments can be measured against.

Building On What We’ve Learned

With our preliminary features in order, we can leverage them to learn a model of style from an article. To carry out this step we’d need to build a dataset and extract the features that we described, then train a classifier to separate the good and bad examples.

After building a classifier to separate the text, we want to analyze the features that are highly predictive since those are what we will use as a recommended changes to our system.

Final Thoughts

Machine Learning is not always necessary for all products. It’s important to build simple solutions to test the feasibility of the product and access whether Machine Learning is needed before moving to ML solutions. If indeed ML is required, starting with a simple solution is a good idea to provide you with a baseline and feedback to make further progression.

Thanks for Reading!

If you enjoyed this article, connect with me by subscribing to my FREE weekly newsletter. Never miss a post I make about Artificial Intelligence, Data Science, and Freelancing.

Related Articles

Spread the word

This post was originally published by Kurtis Pykes at Towards Data Science - Medium Tagged

Related posts