Sanjivani Rural Education Society’s
Sanjivani College of Engineering, Kopargaon-423603
(An Autonomous Institute Affiliated to Savitribai Phule Pune University, Pune)
NAAC ‘A’ Grade Accredited, ISO 9001:2015 Certified
Department of Mechanical Engineering
Subject : Foundations of AI and ML
Class : T.Y. Mechanical
Subject Code : PEME 312D
Unit 2 : Problem Solving and Mathematical Foundations
By
V. P. Bhaurkar
Department of Mechanical Engineering
2025 – 26 (sem – 6)
V. P. Bhaurkar AI ML (T. Y. Mechanical)
What is Data in Machine
Learning?
Data is a collection of facts,
measurements, or observations.
In Machine Learning:
 Data is the raw material
 Model learns from data
 Without data, no ML
Introduction to Data and Features
Examples of Data (Mechanical Context)
1. Temperature readings
2. Pressure values
3. Vibration signals
4. Speed of motor
5. Heat transfer rate
6. Fuel consumption
Example:
This table is called a dataset.
Temp Pressure Flow Rate
30 5 0.2
35 6 0.25
V. P. Bhaurkar AI ML (T. Y. Mechanical)
Structure of Dataset
Dataset has:
Rows → Observations / Samples
Columns → Features / Variables
Example:
If we have 100 experiments: 100 rows
3 parameters : 3 columns
Introduction to Data and Features
V. P. Bhaurkar AI ML (T. Y. Mechanical)
(A) Numerical Data
Numbers that can be measured.
Example:
 Temperature = 35°C
 Speed = 120 rpm
 Flow rate = 0.25 kg/s
Numerical data is used directly in
ML.
Types of Data
Based on Nature
(B) Categorical Data
Data in form of labels or categories.
Example:
 Machine type: Lathe / Milling
 Material: Steel / Aluminium
 Condition: Good / Faulty
ML converts categorical data into numbers.
V. P. Bhaurkar AI ML (T. Y. Mechanical)
(A) Discrete Data
Countable values.
Example:
 Number of defects
 Number of machines
Types of Data
Based on Continuity
(B) Continuous Data
Measured values.
Example:
 Temperature
 Pressure
 Vibration
V. P. Bhaurkar AI ML (T. Y. Mechanical)
Definition of Feature
Feature is an input variable used to
predict output.
Simple meaning:
Features are the columns of input
data.
What are Features?
Example (Mechanical)
Predict heat transfer rate.
Inputs:
Inlet temperature
Flow rate
Surface area
Output:
Heat transfer rate
Here:
Features → temperature, flow rate, surface
area
Target → heat transfer rate
V. P. Bhaurkar AI ML (T. Y. Mechanical)
Types of Features
a) Numerical Features
Example:
 Temperature
 Pressure
 Speed
Used in regression problems.
b) Categorical Features
Example:
 Machine type
 Material type
 Failure type
Need encoding before using in ML.
c) Binary Features
Only two values.
Example:
0 → No failure
1 → Failure
d) Derived Features (Advanced Concept)
Sometimes we create new features from existing ones.
Example:
Instead of using temperature and pressure separately,
we calculate: Temperature difference
or
Efficiency
This is called feature engineering.
V. P. Bhaurkar AI ML (T. Y. Mechanical)
Feature Engineering
What is Feature Engineering?
Process of:
 Selecting important features
 Removing unnecessary features
 Creating new meaningful features
Example (Mechanical)
Original features:
1. Speed
2. Feed
3. Depth of cut
New feature:
Material Removal Rate (MRR)
MRR = Speed × Feed × Depth
This improves model accuracy.
V. P. Bhaurkar AI ML (T. Y. Mechanical)
Concept of Training and Testing Data
Why Split Data?
If model sees all data, it may:
 Memorize data
 Not perform well on new data
So we divide data into:
 Training data
 Testing data
Training Data
Used to:
 Teach the model
 Adjust model parameters
 Usually 70% – 80% of data
Testing Data
Used to:
1. Evaluate model performance
2. Check prediction accuracy
3. Usually 20% – 30% of data
Simple Example
Suppose we have 100 heat exchanger readings.
1. 80 used for training
2. 20 used for testing
3. Model learns from 80
4. We test on 20
V. P. Bhaurkar AI ML (T. Y. Mechanical)
Concept of Training and Testing Data
Why Testing is
Important?
Without testing: Model may
overfit.
Overfitting means:
Model performs very well on
training data but performs poorly
on new data
Example:
Student memorizes answers
But fails in exam if question changes
Simple Diagram Explanation
Data → Split → Train Model → Test Model → Evaluate
V. P. Bhaurkar AI ML (T. Y. Mechanical)
Real Mechanical Example (Complete Flow)
Complete Real-Time Mechanical Example
Predicting Heat Transfer Rate in a Shell-and-Tube Heat Exchanger
Problem Statement
In a thermal lab, students perform experiments on a shell-and-tube heat exchanger.
Aim: Predict Heat Transfer Rate (Q) using operating conditions.
Objective: We want to use Machine Learning instead of traditional formula every
time.
Step 1: Understanding the Physical Problem
Heat transfer rate formula:
Where:
m = mass flow rate, Cp = specific heat, T_in = inlet temperature, T_out = outlet temperature
But in real experiments: Measurements have noise, Flow conditions vary, Surface fouling may occur.
So instead of strict formula, we train ML model from experimental data.
V. P. Bhaurkar AI ML (T. Y. Mechanical)
Real Mechanical Example (Complete Flow)
Complete Real-Time Mechanical Example
Predicting Heat Transfer Rate in a Shell-and-Tube Heat Exchanger
Step 2: Data Collection (From Lab Experiments)
Suppose we conduct 100 experiments. For each experiment, we record:
Features (Inputs – X): Inlet temperature, Outlet temperature, Flow rate
Surface area
Target (Output – Y): Heat transfer rate (Q)
Inlet Temp
(°C)
Outlet Temp
(°C)
Flow Rate
(kg/s)
Surface Area
(m²)
Heat Transfer
Rate (kW)
60 45 0.5 2.1 31
65 48 0.6 2.1 40
V. P. Bhaurkar AI ML (T. Y. Mechanical)
Real Mechanical Example (Complete Flow)
Complete Real-Time Mechanical Example
Predicting Heat Transfer Rate in a Shell-and-Tube Heat Exchanger
Step 3: Define ML Objective
This is: a) Supervised Learning Problem, b) Regression Problem (output is continuous number)
Why regression?
Because heat transfer rate is a numerical value.
Step 4: Splitting Data (Very Important)
We divide 100 experiments into:
80% → Training Data, 20% → Testing Data
Why?
If we train and test on same data:
Model may simply memorize.
But, we want model to predict unseen conditions.
V. P. Bhaurkar AI ML (T. Y. Mechanical)
Real Mechanical Example (Complete Flow)
Complete Real-Time Mechanical Example
Predicting Heat Transfer Rate in a Shell-and-Tube Heat Exchanger
Step 5: Model Training
We choose: Linear Regression Model
Model tries to learn relationship:
Where: a, b, c, d, e are learned by model.
Model adjusts these values using training data.
What Actually Happens During Training?
Model: 1) Takes feature values, 2) Makes prediction, 3) Compares with actual Q,
4) Calculates error, 5) Adjusts coefficients, 6) Repeats many times
Why to do so → Minimize error
V. P. Bhaurkar AI ML (T. Y. Mechanical)
Real Mechanical Example (Complete Flow)
Complete Real-Time Mechanical Example
Predicting Heat Transfer Rate in a Shell-and-Tube Heat Exchanger
Step 6: Testing the Model
Now we use 20 unseen experiments.
Model predicts Q.
We compare: Predicted Q vs. Actual Q
Example:
Actual Q Predicted Q
32 31.5
38 39.2
V. P. Bhaurkar AI ML (T. Y. Mechanical)
Real Mechanical Example (Complete Flow)
Complete Real-Time Mechanical Example
Predicting Heat Transfer Rate in a Shell-and-Tube Heat Exchanger
Step 7: Evaluate Performance
We calculate: 1) Mean Absolute Error (MAE), 2) Mean Squared Error (MSE),
3) R² Score
If error is small → Good model, If error is large → Model needs improvement
Step 8: Interpretation
Suppose model shows: Flow rate has highest coefficient.
That means: Flow rate strongly affects heat transfer.
This matches thermal theory:
Higher flow → higher convective heat transfer coefficient.
So ML result supports physics.
V. P. Bhaurkar AI ML (T. Y. Mechanical)
Real Mechanical Example (Complete Flow)
Complete Real-Time Mechanical Example
Predicting Heat Transfer Rate in a Shell-and-Tube Heat Exchanger
Step 9: Final ML Workflow Summary
1. Define physical problem
2. Collect experimental data
3. Identify features and target
4. Clean data
5. Split into train and test
6. Train regression model
7. Evaluate performance
8. Interpret results
V. P. Bhaurkar AI and ML (T. Y. Mechanical)
Thank You !

Problem solving in AI - Data and Features

  • 1.
    Sanjivani Rural EducationSociety’s Sanjivani College of Engineering, Kopargaon-423603 (An Autonomous Institute Affiliated to Savitribai Phule Pune University, Pune) NAAC ‘A’ Grade Accredited, ISO 9001:2015 Certified Department of Mechanical Engineering Subject : Foundations of AI and ML Class : T.Y. Mechanical Subject Code : PEME 312D Unit 2 : Problem Solving and Mathematical Foundations By V. P. Bhaurkar Department of Mechanical Engineering 2025 – 26 (sem – 6)
  • 2.
    V. P. BhaurkarAI ML (T. Y. Mechanical) What is Data in Machine Learning? Data is a collection of facts, measurements, or observations. In Machine Learning:  Data is the raw material  Model learns from data  Without data, no ML Introduction to Data and Features Examples of Data (Mechanical Context) 1. Temperature readings 2. Pressure values 3. Vibration signals 4. Speed of motor 5. Heat transfer rate 6. Fuel consumption Example: This table is called a dataset. Temp Pressure Flow Rate 30 5 0.2 35 6 0.25
  • 3.
    V. P. BhaurkarAI ML (T. Y. Mechanical) Structure of Dataset Dataset has: Rows → Observations / Samples Columns → Features / Variables Example: If we have 100 experiments: 100 rows 3 parameters : 3 columns Introduction to Data and Features
  • 4.
    V. P. BhaurkarAI ML (T. Y. Mechanical) (A) Numerical Data Numbers that can be measured. Example:  Temperature = 35°C  Speed = 120 rpm  Flow rate = 0.25 kg/s Numerical data is used directly in ML. Types of Data Based on Nature (B) Categorical Data Data in form of labels or categories. Example:  Machine type: Lathe / Milling  Material: Steel / Aluminium  Condition: Good / Faulty ML converts categorical data into numbers.
  • 5.
    V. P. BhaurkarAI ML (T. Y. Mechanical) (A) Discrete Data Countable values. Example:  Number of defects  Number of machines Types of Data Based on Continuity (B) Continuous Data Measured values. Example:  Temperature  Pressure  Vibration
  • 6.
    V. P. BhaurkarAI ML (T. Y. Mechanical) Definition of Feature Feature is an input variable used to predict output. Simple meaning: Features are the columns of input data. What are Features? Example (Mechanical) Predict heat transfer rate. Inputs: Inlet temperature Flow rate Surface area Output: Heat transfer rate Here: Features → temperature, flow rate, surface area Target → heat transfer rate
  • 7.
    V. P. BhaurkarAI ML (T. Y. Mechanical) Types of Features a) Numerical Features Example:  Temperature  Pressure  Speed Used in regression problems. b) Categorical Features Example:  Machine type  Material type  Failure type Need encoding before using in ML. c) Binary Features Only two values. Example: 0 → No failure 1 → Failure d) Derived Features (Advanced Concept) Sometimes we create new features from existing ones. Example: Instead of using temperature and pressure separately, we calculate: Temperature difference or Efficiency This is called feature engineering.
  • 8.
    V. P. BhaurkarAI ML (T. Y. Mechanical) Feature Engineering What is Feature Engineering? Process of:  Selecting important features  Removing unnecessary features  Creating new meaningful features Example (Mechanical) Original features: 1. Speed 2. Feed 3. Depth of cut New feature: Material Removal Rate (MRR) MRR = Speed × Feed × Depth This improves model accuracy.
  • 9.
    V. P. BhaurkarAI ML (T. Y. Mechanical) Concept of Training and Testing Data Why Split Data? If model sees all data, it may:  Memorize data  Not perform well on new data So we divide data into:  Training data  Testing data Training Data Used to:  Teach the model  Adjust model parameters  Usually 70% – 80% of data Testing Data Used to: 1. Evaluate model performance 2. Check prediction accuracy 3. Usually 20% – 30% of data Simple Example Suppose we have 100 heat exchanger readings. 1. 80 used for training 2. 20 used for testing 3. Model learns from 80 4. We test on 20
  • 10.
    V. P. BhaurkarAI ML (T. Y. Mechanical) Concept of Training and Testing Data Why Testing is Important? Without testing: Model may overfit. Overfitting means: Model performs very well on training data but performs poorly on new data Example: Student memorizes answers But fails in exam if question changes Simple Diagram Explanation Data → Split → Train Model → Test Model → Evaluate
  • 11.
    V. P. BhaurkarAI ML (T. Y. Mechanical) Real Mechanical Example (Complete Flow) Complete Real-Time Mechanical Example Predicting Heat Transfer Rate in a Shell-and-Tube Heat Exchanger Problem Statement In a thermal lab, students perform experiments on a shell-and-tube heat exchanger. Aim: Predict Heat Transfer Rate (Q) using operating conditions. Objective: We want to use Machine Learning instead of traditional formula every time. Step 1: Understanding the Physical Problem Heat transfer rate formula: Where: m = mass flow rate, Cp = specific heat, T_in = inlet temperature, T_out = outlet temperature But in real experiments: Measurements have noise, Flow conditions vary, Surface fouling may occur. So instead of strict formula, we train ML model from experimental data.
  • 12.
    V. P. BhaurkarAI ML (T. Y. Mechanical) Real Mechanical Example (Complete Flow) Complete Real-Time Mechanical Example Predicting Heat Transfer Rate in a Shell-and-Tube Heat Exchanger Step 2: Data Collection (From Lab Experiments) Suppose we conduct 100 experiments. For each experiment, we record: Features (Inputs – X): Inlet temperature, Outlet temperature, Flow rate Surface area Target (Output – Y): Heat transfer rate (Q) Inlet Temp (°C) Outlet Temp (°C) Flow Rate (kg/s) Surface Area (m²) Heat Transfer Rate (kW) 60 45 0.5 2.1 31 65 48 0.6 2.1 40
  • 13.
    V. P. BhaurkarAI ML (T. Y. Mechanical) Real Mechanical Example (Complete Flow) Complete Real-Time Mechanical Example Predicting Heat Transfer Rate in a Shell-and-Tube Heat Exchanger Step 3: Define ML Objective This is: a) Supervised Learning Problem, b) Regression Problem (output is continuous number) Why regression? Because heat transfer rate is a numerical value. Step 4: Splitting Data (Very Important) We divide 100 experiments into: 80% → Training Data, 20% → Testing Data Why? If we train and test on same data: Model may simply memorize. But, we want model to predict unseen conditions.
  • 14.
    V. P. BhaurkarAI ML (T. Y. Mechanical) Real Mechanical Example (Complete Flow) Complete Real-Time Mechanical Example Predicting Heat Transfer Rate in a Shell-and-Tube Heat Exchanger Step 5: Model Training We choose: Linear Regression Model Model tries to learn relationship: Where: a, b, c, d, e are learned by model. Model adjusts these values using training data. What Actually Happens During Training? Model: 1) Takes feature values, 2) Makes prediction, 3) Compares with actual Q, 4) Calculates error, 5) Adjusts coefficients, 6) Repeats many times Why to do so → Minimize error
  • 15.
    V. P. BhaurkarAI ML (T. Y. Mechanical) Real Mechanical Example (Complete Flow) Complete Real-Time Mechanical Example Predicting Heat Transfer Rate in a Shell-and-Tube Heat Exchanger Step 6: Testing the Model Now we use 20 unseen experiments. Model predicts Q. We compare: Predicted Q vs. Actual Q Example: Actual Q Predicted Q 32 31.5 38 39.2
  • 16.
    V. P. BhaurkarAI ML (T. Y. Mechanical) Real Mechanical Example (Complete Flow) Complete Real-Time Mechanical Example Predicting Heat Transfer Rate in a Shell-and-Tube Heat Exchanger Step 7: Evaluate Performance We calculate: 1) Mean Absolute Error (MAE), 2) Mean Squared Error (MSE), 3) R² Score If error is small → Good model, If error is large → Model needs improvement Step 8: Interpretation Suppose model shows: Flow rate has highest coefficient. That means: Flow rate strongly affects heat transfer. This matches thermal theory: Higher flow → higher convective heat transfer coefficient. So ML result supports physics.
  • 17.
    V. P. BhaurkarAI ML (T. Y. Mechanical) Real Mechanical Example (Complete Flow) Complete Real-Time Mechanical Example Predicting Heat Transfer Rate in a Shell-and-Tube Heat Exchanger Step 9: Final ML Workflow Summary 1. Define physical problem 2. Collect experimental data 3. Identify features and target 4. Clean data 5. Split into train and test 6. Train regression model 7. Evaluate performance 8. Interpret results
  • 18.
    V. P. BhaurkarAI and ML (T. Y. Mechanical) Thank You !