Flocode: Engineering Insights 🌊

Flocode: Engineering Insights 🌊

#062 - Machine Learning for Engineers | When and How Should We Use it?

A Practical Guide to Integrating ML into Professional Engineering Workflows

James O'Reilly's avatar
James O'Reilly
Mar 11, 2025
∙ Paid

Machine learning (ML) is becoming more approachable and useful for engineers.

This article introduces practical applications of machine learning specifically tailored for engineers. You'll learn how ML aligns with engineering intuition, explore realistic structural examples using PyTorch, and gain a structured approach for assessing ML's suitability in your projects.

I’ve discussed this before in relation to Linear Regression models, so check that out for a deeper dive into the nuts and bolts if you are interested in getting started.

#014 - Machine Learning for Civil and Structural Engineers | 02: Linear Regression

#014 - Machine Learning for Civil and Structural Engineers | 02: Linear Regression

James O'Reilly
·
December 10, 2023
Read full story

The space has evolved since then, as ML gains more traction.

One of the most fascinating aspects of ML is the realization of how deeply it aligns with engineering intuition. Consider the intuitive understanding an engineer develops regarding the factors influencing design. Aspects like feature engineering, scaling, and learning rates, which might seem esoteric, are in fact reflections of the inherent understanding we build through practical experience.

Once you begin to explore the theoretical underpinnings, you'll find that this intuition is often validated by rigorous mathematical and statistical methods. It’s a rather satisfying confirmation, at least in my view.

This also sparks other deeper philosophical questions. If you can capture intuition in an algorithm, how long until we can capture thoughts/emotions etc.

The singularity's arrival is, apparently, imminent – accompanied by either the collapse of civilization or our ascension to a higher plane of AI-assisted existence.

Thankfully, these grand pronouncements are beyond the scope of this article, and my expertise, unless I’ve had a few pints. 🍻

Understanding Machine Learning

ML involves algorithms that learn from data, continuously improving performance without explicit programming. Although sometimes viewed as "black boxes," these methods systematically uncover useful patterns and insights.

My own journey into machine learning, and I want to be clear that I'm very much still on that journey – I'm certainly not claiming to be an expert – began with exploring libraries like Scikit-learn. I focused initially on fundamental concepts like linear regression and classification, which are surprisingly approachable. This provided a solid foundation, and I encourage anyone curious to start there. From that base, I expanded into more complex frameworks.

If you're looking for resources:

  • Hands-On Machine Learning with Scikit-Learn, Keras & TensorFlow by Aurélien Géron (O'Reilly)

  • Deep Learning with Python by François Chollet (Manning Publications)

They strike a good balance between theory and practical application. For a structured online learning experience:

  • Machine Learning Specialization course from deeplearning.ai is excellent.

The point I want to emphasize is that this isn't inaccessible material. It's surprisingly approachable, and the learning curve, while real, is manageable.

My own experience, moving beyond the basics and applying PyTorch to real-world engineering in the hydropower sector (structural design optimization, hydraulic modeling, financial and energy forecasting), has convinced me of ML's versatility and value. I'm sharing this not as an expert, but as a fellow engineer who's seen the potential firsthand and believes strongly that more of us can and should explore these tools.

Types of Machine Learning

  • Supervised Learning: Models trained on labeled datasets to predict known outcomes, such as concrete strength or structural damage classification. Common applications include structural monitoring and maintenance planning. Vision models are now using this for damage detection. You can try building such tools yourself with Pytorch and YoloV8.

  • Unsupervised Learning: Identifies hidden patterns or clusters within unlabeled data, useful for material categorization and detecting construction anomalies.

  • Semi-Supervised Learning: Utilizes both labeled and unlabeled data, efficiently addressing tasks like detecting structural issues from limited annotated images.

  • Advanced Learning Methods:

    • Active Learning: Selectively trains on the most informative data to maximize efficiency.

    • Transfer Learning: Adapts pretrained models from one task to related tasks, such as using generic image recognition models to detect specific engineering defects.

    • Reinforcement Learning: Models learn through reward-based systems.

    • Self-Supervised Learning: Uses portions of data to predict other segments, enhancing pattern recognition capabilities.

Comparing ML with Traditional Methods

Traditional engineering methods, including finite element analysis and empirical formulas, depend on explicitly predefined assumptions. These are robust but less flexible when handling complex, real-world variability.

Keep reading with a 7-day free trial

Subscribe to Flocode: Engineering Insights 🌊 to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 James O'Reilly
Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture