Indian Institute of Technology Patna
ME3101: Data Analytics and Machine Learning for Engineers
Tutorial 1 – Submission Due: 06/08/2025
Instructions
• Complete this tutorial using Python (preferably in a Jupyter Notebook) or
MATLAB.
• Ensure all code is executable, well-commented, and neatly organized.
• Answer all parts and save results/plots in the specified folders.
• Use the file and directory structure given in the checklist at the end.
• Complete the provided worksheets before attempting this tutorial.
• Data file link: Download Data (Google Drive)
Part 1: Arrays and Matrix Operations [10]
Use Python with NumPy or MATLAB to perform the following:
1.1 Create Arrays
• Create two one-dimensional arrays, x and y, each with 6 elements.
1.2 Array Operations
• Compute and print:
o The sum and mean of each array
o The dot product of x and y
1.3 Matrix Operations
• Create a 3×3 matrix and compute:
o Its transpose
o Its determinant
o Its inverse
Part 2: Image Processing [10]
Use MATLAB’s Image Processing Toolbox or Python libraries such as PIL, OpenCV,
Matplotlib, or skimage.
2.1 Image Upsampling (Digital Zoom)
• Read the image from the /clock folder
• Print the original width and height of the image.
• Apply digital zoom by upsampling the image by a factor of 5 (i.e., both width and
height ×5)
• Upsample the image by a factor of 5 (i.e., both width and height ×5).
• Display the original and upsampled images
• Compare the file sizes (in bytes) of the original and upsampled images
2.2 Binary Thresholding
• Read the image from the /cat folder and convert it to grayscale (if not already)
• For each of the thresholds [50, 100, 150, 200], perform binary thresholding:
o Pixels > threshold → 255 (white)
o Pixels ≤ threshold → 0 (black)
• Display the four binary images in a single figure
Part 3: Audio Signal Operations [10]
• Load sample.wav
• Print the sampling rate and total duration (in seconds) of the audio
• Plot the first 2,000 samples of the waveform (amplitude vs. sample index)
Indian Institute of Technology Patna
ME3101: Data Analytics and Machine Learning for Engineers
Tutorial 1 – Submission Due: 06/08/2025
• Briefly explain:
➤ What is the importance of the sampling rate in audio analysis?
Part 4: Data Analysis with Excel [10]
A file temp_data.xlsx contains thousands of sensor readings with the following columns:
Date & Time, Temperature_C, Humidity_%, Status, Sensor_ID
Perform the following:
• Load the data from the Excel file
• Filter and print only the rows where:
o Status = 'OK'
o Temperature_C > 25
• Plot a time series of Temperature for Sensor_ID = 'A1' only.
• Compute and print:
o The mean and maximum Humidity_%
o For Sensor_ID 'A1' during periods where Status = 'OK'
Submission Checklist [10]
Name your compressed file:
ROLLNUMBER_NAME_week1.zip
Folder structure inside the zip:
[ROLLNUMBER]_[NAME]_week1/
│
├── report.pdf ← Summary + screenshots (if needed)
├── answers.ipynb ← Jupyter notebook (if using Python)
├── answers.m ← MATLAB script (if using MATLAB)
├── images/ ← Images or plots (e.g., fruits.png)
│ └── fruits.png
├── audio/ ← Audio files (e.g., sample.wav)
│ └── sample.wav
└── outputs/ ← Output figures or plots (e.g., Q1.png, Q2.png)
Ensure:
• All code is executable and well-commented
• All figures and data are saved in the correct folders
• You maintain the given structure for easy evaluation
Submit your .zip file here:
Click here to upload via Microsoft Form