Applied Machine Learning Strategies
ML Overview and Workflow
From Idea to Insight
Before writing a single line of code, the most critical step in any machine learning project is framing the problem. This isn't about algorithms yet. It's about translation: turning a business goal into a specific, measurable machine learning task. Are you trying to predict a number, like sales revenue? That’s a regression problem. Or are you trying to sort items into categories, like flagging emails as spam or not spam? That's a classification task.
Getting this step wrong means you could build a perfect model that solves the wrong problem. A classic mistake is trying to predict a customer's exact lifetime value (a difficult regression task) when simply identifying the top 10% of most valuable customers (a simpler classification task) would suffice. Always ask: what decision will this model support, and what outcome are we trying to achieve?
Acquiring the Raw Material
Once you have a clear question, you need data to answer it. Data acquisition can be straightforward, like querying a company's internal database, or complex, like scraping websites or connecting to third-party APIs. The data you gather can come in many forms: numerical (age, price), categorical (city, product type), text, or images.
Ethical considerations are paramount here. Do you have the right to use this data? Does it contain personally identifiable information (PII)? Regulations like GDPR have serious implications for how data is collected, stored, and used. Always prioritise privacy and ensure your data sources are legitimate and ethically sound. The quality of your data will also set a ceiling on your model's performance; the principle of 'garbage in, garbage out' is unforgiving.
The First Conversation with Your Data
With data in hand, you don't immediately start training models. The next step is (EDA). Think of this as getting to know your dataset. You're looking for patterns, spotting anomalies, checking assumptions, and forming hypotheses. It's an investigative process, not a mechanical one.
Simple tools are often the most powerful during EDA. Calculate summary statistics like mean, median, and standard deviation. Create histograms to understand distributions, scatter plots to check for relationships between variables, and box plots to identify outliers. Are there missing values? Do some categories have very few examples? These initial findings will heavily influence how you prepare your data for modelling.
These initial stages—framing, acquisition, and exploration—form the foundation of the machine learning lifecycle. They ensure that the subsequent steps of feature engineering, model training, evaluation, and deployment are built on solid ground. Skipping or rushing these early phases is a common cause of project failure.
Time to check your understanding of the machine learning workflow.
A retail company wants to forecast the exact sales revenue in pounds for the next quarter. What type of machine learning problem is this?
The principle of 'garbage in, garbage out' implies that the quality of the data used for training sets a limit on the model's potential performance.
With this foundational workflow in mind, you're ready to move on to the more technical aspects of preparing data and building models.
