Evaluating and selecting appropriate ML solutions
Now that we've explored the mathematical foundations of ML and how they apply to various algorithms, let's put this knowledge into practice. In this section, you’ll learn how to evaluate and select the most appropriate ML solutions for diverse business problems. By combining insights from the ML lifecycle, mathematical principles and algorithm characteristics, you'll develop the critical thinking skills needed to make informed decisions in real-world scenarios.

Mapping business problems to ML approaches
When solving business problems with ML, it's important to understand the nature of the problem and choose the appropriate ML approach. Each type of problem requires specific algorithms and techniques based on the desired outcome.
Predicting continuous outcomes
Problem type: You want to predict a continuous outcome (e.g. sales revenue, house prices).ML approach: Regression models are used to predict a continuous dependent variable.Key algorithms:
- Linear regression: Assumes a linear relationship; minimises sum of squared errors.
- Polynomial regression: Models non-linear relationships through polynomial terms.
- Ridge/Lasso regression: Regularised versions to reduce overfitting by shrinking coefficients.Mathematical considerations:
- Model complexity: Linear models are simple but may underfit complex data.
- Computational cost: Linear models are inexpensive; non-linear models require more resources.
- Interpretability: Linear models offer clear interpretability.
Predicting categories
Problem type: You want to predict discrete categories or classes (e.g. customer purchase yes/no).ML approach: Classification models are used to assign labels to input data.Key algorithms:
- Logistic regression: Effective for binary outcomes; uses a logistic function to map probabilities.
- Decision trees: Non-linear model; splits determined by Entropy or Gini Impurity.
- Random forest: Ensemble method using multiple trees to improve accuracy and prevent overfitting.Mathematical considerations:
- Model complexity: Logistic regression is simple; decision trees capture complex non-linear patterns.
- Computational cost: Forests can be intensive for large datasets.
- Interpretability: Logistic regression is highly interpretable; ensembles lose interpretability.
Predicting groups
Problem type: You want to identify groups or clusters within data without prior knowledge of labels.ML approach: Clustering algorithms (unsupervised learning) find natural groupings.Key algorithms:
- K-means: Assigns points to clusters based on proximity to centroids.
- DBSCAN: Identifies clusters based on density; handles noise and irregular shapes effectively.Mathematical considerations:
- Model complexity: K-Means assumes spherical clusters; DBSCAN is more flexible.
- Computational cost: K-Means is fast but needs K pre-specified; DBSCAN can be more expensive.
- Interpretability: K-Means is easy to understand.
Recommendations
Problem type: You want to recommend products or content based on user preferences.ML approach: Recommendation systems (collaborative, content-based or hybrid).Key algorithms:
- Collaborative filtering: Based on preferences of similar users or items.
- Matrix factorisation (SVD): Breaks down user-item interaction matrix into lower-dimensional matrices.Mathematical considerations:
- Model complexity: Can become expensive as the dataset grows.
- Computational cost: Matrix factorisation is intensive but high-quality.
- Interpretability: Recommendations provided based on behavior patterns; can lack transparency.
Mathematical considerations in ML solution selection
- Model complexity: More complex models capture intricate patterns but require more data and tuning.
- Computational cost: Trade-off between accuracy and resource consumption (important for real-time systems).
- Interpretability: High-stakes fields (finance, healthcare) require explainable decisions.
- Overfitting vs underfitting: Use regularisation (Ridge/Lasso) to mitigate noise capture.
Lifecycle-based evaluation framework
The ML lifecycle stages provide an evaluation framework for choosing solutions at each step.

- Data collection: Quality and quantity are critical.
- Preprocessing: normalisation and handling missing data significantly affect success.
- Model training: Hyperparameter tuning (Grid search, random search) and cross-validation.
- Deployment: Evaluation using metrics like accuracy, recall, precision or F1-score; ongoing monitoring for drift.