Artificial Intelligence and Machine Learning Practical Guide offers a comprehensive overview of essential tools and libraries used in AI and ML. This guide includes detailed laboratory exercises focusing on supervised learning techniques like classification and regression, as well as unsupervised learning methods such as anomaly detection. Students will explore convolutional neural networks and deep learning applications in engineering systems. Ideal for computer engineering students at the University of Uyo, this practical guide serves as a valuable resource for hands-on learning and application of AI concepts in real-world scenarios.

Key Points

  • Covers essential tools and libraries for artificial intelligence and machine learning applications.
  • Includes hands-on laboratory exercises on supervised learning, including classification and regression.
  • Explores convolutional neural networks and their application in pattern recognition.
  • Discusses unsupervised learning techniques, focusing on anomaly detection in engineering systems.
Ekemini Tom
Author:Department of Computer Engineering, University of Uyo
111 pages
Language:English
Type:Study Guide
Ekemini Tom
Author:Department of Computer Engineering, University of Uyo
111 pages
Language:English
Type:Study Guide
311
/ 111
DEPARTMENT OF COMPUTER ENGINEERING
FACULTY OF ENGINEERING
UNIVERSITY OF UYO
GET 324
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
(PRACTICAL GUIDE)
[ NOT FOR SALE ]
DEPT
.
OF COMP
.
ENGG
.
(
NOT FOR SALE
)
TABLE OF CONTENTS
Tools and Libraries 2
Lab Review 4
Laboratory Exercise 1:
Introduction to Artificial Intelligence and Python AI Libraries 6
Laboratory Exercise 2:
Engineering Data Analytics and Machine Learning Workflow 21
Laboratory Exercise 3:
Supervised Learning (Regression): Engineering Regression Problems 27
Laboratory Exercise 4:
Supervised Learning (Classification): Engineering Fault Classification 34
Laboratory Exercise 5:
Unsupervised and Semi-Supervised Learning: Anomaly Detection 45
Laboratory Exercise 6:
Nature-Inspired Computing and Optimisation for Engineering Systems 55
Laboratory Exercise 7:
Deep Learning (Artificial Neural Networks): HVAC Fault Detection 62
Laboratory Exercise 8:
Pattern Recognition: Convolutional Neural Networks and Transfer Learning 70
Laboratory Exercise 9:
Natural Language Processing: Sentiment Analysis and Text Classification 86
Laboratory Exercise 10:
Cloud Computing for Artificial Intelligence: Deploying a ML Model as a Web Service 106
1
DEPT
.
OF COMP
.
ENGG
.
(
NOT FOR SALE
)
TOOLS AND LIBRARIES
1. NumPy is a Python library used for scientific computing. It provides support for
multi-dimensional arrays and matrix data structures, along with a large collection of high-level
mathematical functions to operate on these arrays.
2. Pandas stands for Python Data Analysis Library. It is a fast, powerful, flexible, and easy-to-use
open-source data analysis and manipulation tool built on top of Python. Pandas introduces the
DataFrame (a two-dimensional, size-mutable, tabular data structure with labelled axes), which is
used throughout the labs to load, clean, explore, and manipulate datasets .
3. Matplotlib is one of the most popular Python libraries for data visualisation. It provides a
MATLAB-like interface for creating static, animated, and interactive plots. In these labs,
Matplotlib is used to plot histograms, training and validation loss/accuracy curves, regression
and cluster scatter plots, genetic-algorithm convergence curves, and confusion-matrix heatmaps,
helping students visualise data distributions and model performance.
4. Seaborn is a Python data visualisation library built on top of Matplotlib. It provides a high-level
interface for drawing attractive and informative statistical graphics. In these labs, Seaborn is used
to generate pair plots, correlation heatmaps, box plots, count plots, and confusion-matrix
visualisations, supporting exploratory data analysis across the experiments.
5. Scikit-Learn is one of the most useful libraries for machine learning in Python. It contains a
large collection of efficient tools for machine learning and statistical modelling, including
classification, regression, clustering, and dimensionality reduction. In these labs, Scikit-Learn is
used to implement linear and multiple linear regression, logistic regression, K-nearest neighbours
(KNN), support vector machines (SVM), decision trees, random forests, and clustering and
anomaly-detection methods (K-Means, DBSCAN, Isolation Forest, Local Outlier Factor, and
One-Class SVM), as well as preprocessing tools such as StandardScaler and LabelEncoder and
evaluation metrics including accuracy, precision, recall, F1-score, and confusion matrices.
6. TensorFlow is an open-source library for numerical computation and large-scale machine
learning, developed by Google. It provides a comprehensive ecosystem of tools and libraries for
building and deploying machine learning and deep learning models. In these labs, TensorFlow is
used to build and train artificial neural networks (ANNs) for HVAC fault detection,
convolutional neural networks (CNNs) and transfer-learning models for image pattern
recognition, and bidirectional LSTMs for sentiment analysis.
7. Keras is a high-level deep learning API built on top of TensorFlow 2. It is a powerful and
easy-to-use open-source Python library for developing and evaluating deep learning models.
Keras provides intuitive building blocks such as the Sequential model and Input, Dense, LSTM,
2
/ 111
End of Document
311

FAQs

What are the key Python libraries used in AI and machine learning?
The document outlines several key Python libraries essential for artificial intelligence and machine learning. These include NumPy for scientific computing, Pandas for data analysis and manipulation, Matplotlib for data visualization, and Scikit-Learn for machine learning tasks. TensorFlow is highlighted as an open-source library for numerical computation and large-scale machine learning, while Keras serves as a high-level API for building deep learning models. Each library plays a crucial role in the AI development workflow.
What is the purpose of data preprocessing in machine learning?
Data preprocessing is a critical step in machine learning workflows as it prepares raw data for modeling. The document emphasizes the importance of handling missing values, normalizing data, and performing feature engineering to enhance model performance. Techniques such as label encoding and standardization are discussed, which help in transforming categorical data into numerical formats and ensuring that features contribute equally to the model training process.
What are the main types of machine learning covered in the guide?
The guide covers three primary types of machine learning: supervised learning, unsupervised learning, and semi-supervised learning. Supervised learning involves training models on labeled datasets to predict outcomes, while unsupervised learning focuses on finding patterns in unlabeled data. Semi-supervised learning combines both approaches, utilizing a small amount of labeled data alongside a larger set of unlabeled data to improve model accuracy.
How is deep learning applied in HVAC fault detection?
Deep learning is applied in HVAC fault detection through the use of artificial neural networks (ANNs). The document explains that ANNs can learn complex patterns from operational data collected from HVAC systems, enabling them to identify faults effectively. The guide details the architecture of these networks and how they are trained using historical data to improve diagnostic accuracy in real-time monitoring of HVAC systems.
What methodologies are used for evaluating machine learning models?
The document outlines several methodologies for evaluating machine learning models, including the use of metrics such as accuracy, precision, recall, and F1-score. It explains the significance of confusion matrices in assessing model performance and highlights the importance of cross-validation techniques to ensure that models generalize well to unseen data. These evaluation methods are essential for determining the effectiveness of predictive models in real-world applications.